diff --git a/defaults/main.yml b/defaults/main.yml index 9d38ea0a..3faa736d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -205,12 +205,21 @@ octavia_glance_image_tag: octavia-amphora-image octavia_amp_image_owner_id: # add here the glance image id if tagging is not used (not recommended for prod) octavia_amp_image_id: -# add here the file name of the image if it should be uplaoded automatically -# Note: This does not support image tags so don't use for prod +# download the image from an artefact server +# Note: The default is the Octavia test image so don't use that in prod +octavia_download_artefact: True +# The host to download images to if enabled +# Options are ['deployment-host', 'target-host'] +octavia_image_downloader: "deployment-host" +# The URL to downlaod from +octavia_artefact_url: http://tarballs.openstack.org/octavia/test-images/test-only-amphora-x64-haproxy-ubuntu-xenial.qcow2 +# the directory to store the downloaded file to +octavia_amp_image_path: "~/" +# add here the file name of the image if it should be uploaded automatically octavia_amp_image_file_name: # enable uploading image to glance automatically -# Note: This does not support image tags so don't use for prod -octavia_amp_image_upload_enabled: False +octavia_amp_image_upload_enabled: "{{ octavia_download_artefact }}" + # Name of the Octavia security group octavia_security_group_name: octavia_sec_grp # Restrict access to only authorized hosts diff --git a/doc/source/configure-octavia.rst b/doc/source/configure-octavia.rst index 248f2f23..9aac629d 100644 --- a/doc/source/configure-octavia.rst +++ b/doc/source/configure-octavia.rst @@ -76,6 +76,16 @@ ips which overlap with ips assigned to hosts or containers (see the Building Octavia images ~~~~~~~~~~~~~~~~~~~~~~~ +.. note:: + The default behavior is to download a test image from the OpenStack artifact + storage the Octavia team provides daily. Because this image doesn't apply + operating system security patches in a timely manner it is unsuited + for production use. + + Some Operating System vendors might provide official amphora builds or an + organization might maintain their own artifact storage - for those cases the + automatic download can be leveraged, too. + Images using the ``diskimage-builder`` must be built outside of a container. For this process, use one of the physical hosts within the environment. @@ -115,6 +125,10 @@ For this process, use one of the physical hosts within the environment. glance image-create --name amphora-x64-haproxy --visibility private --disk-format qcow2 \ --container-format bare --tags octavia-amphora-image =1.3" - - dib-utils - - PyYAML - name: Clone Octavia git: repo: "https://git.openstack.org/openstack/octavia" @@ -53,19 +36,6 @@ version: "{{ octavia_git_install_branch }}" tags: - skip_ansible_lint - - name: Clone Diskimage-Builder - git: - repo: "https://git.openstack.org/openstack/diskimage-builder" - dest: "{{ octavia_system_home_folder }}/diskimage-builder" - version: "2.9.0" - - name: Create amphora image - shell: "./diskimage-create.sh -o {{ octavia_system_home_folder }}/amphora-x64-haproxy.qcow2" - args: - chdir: "{{ octavia_system_home_folder }}/octavia/diskimage-create" - creates: "{{ octavia_system_home_folder }}/amphora-x64-haproxy.qcow2" - when: test_octavia_amphora | bool - tags: - - skip_ansible_lint - name: Change permission file: path: "{{ octavia_system_home_folder }}/octavia/bin/create_certificates.sh" diff --git a/tests/test-octavia.yml b/tests/test-octavia.yml index 8ae51f53..58efcd46 100644 --- a/tests/test-octavia.yml +++ b/tests/test-octavia.yml @@ -77,17 +77,6 @@ network_name: "public" name: "public-subnet" cidr: "10.1.3.0/24" - - name: Upload image to glance - shell: >- - glance image-create --name amphora-x64-haproxy --visibility private --disk-format qcow2 \ - --container-format bare --tags octavia-amphora-image <{{ octavia_system_home_folder }}/amphora-x64-haproxy.qcow2 \ - && touch {{ octavia_system_home_folder }}/image - args: - creates: "{{ octavia_system_home_folder }}/image" - environment: "{{ env }}" - when: test_octavia_amphora | bool - tags: - - skip_ansible_lint - name: Create ssh-key shell: > cat /dev/zero | ssh-keygen -q -N ""