diff --git a/defaults/main.yml b/defaults/main.yml index d89cee04..6553d3c4 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -76,9 +76,6 @@ tempest_public_subnet_allocation_pools: "" tempest_compute_ssh_user: cirros tempest_compute_image_ssh_user: cirros -tempest_compute_image_alt_ssh_user: cirros -tempest_compute_image_ssh_password: cubswin:) -tempest_compute_image_alt_ssh_password: cubswin:) tempest_compute_run_ssh: True tempest_compute_console_output_enabled: True tempest_compute_resize_enabled: True @@ -105,9 +102,6 @@ tempest_service_available_zaqar: False tempest_image_api_v1_enabled: true tempest_image_api_v2_enabled: True -tempest_boto_s3_url: "http://{{ external_lb_vip_address }}:3333" -tempest_boto_ec2_url: "http://{{ external_lb_vip_address }}:8773/services/Cloud" - tempest_swift_enabled: true tempest_swift_container_sync: True tempest_swift_object_versioning: True @@ -153,17 +147,14 @@ tempest_pip_packages: # Please update SHA in tempest_images below when changing the cirros version. cirros_version: 0.3.4 -cirros_tgz_url: "http://download.cirros-cloud.net/{{ cirros_version }}/cirros-{{ cirros_version }}-x86_64-uec.tar.gz" -cirros_img_url: "{{ cirros_tgz_url|replace('uec.tar.gz','disk.img') }}" -cirros_img_disk_format: qcow2 - +tempest_img_url: "http://download.cirros-cloud.net/{{ cirros_version }}/cirros-{{ cirros_version }}-x86_64-disk.img" tempest_image_dir: "/opt/images" tempest_images: - - url: "{{ cirros_tgz_url }}" - sha256: "95e77c7deaf0f515f959ffe329918d5dd23e417503d1d45e926a888853c90710" - - url: "{{ cirros_img_url }}" + - url: "{{ tempest_img_url }}" sha256: "34987d0d5702f8813f3ff9efe90e9e39e6926ec78658763580a79face67f3394" - +tempest_image_file: "cirros-{{ cirros_version }}-x86_64-disk.img" +tempest_img_disk_format: qcow2 +tempest_img_name: 'cirros' tempest_enable_instance_password: True ## Tunable overrides diff --git a/releasenotes/notes/broader-image-support-69241983e5a36018.yaml b/releasenotes/notes/broader-image-support-69241983e5a36018.yaml new file mode 100644 index 00000000..bb7b5867 --- /dev/null +++ b/releasenotes/notes/broader-image-support-69241983e5a36018.yaml @@ -0,0 +1,30 @@ +--- +features: + - Added new variable ``tempest_img_name``. + - Added new variable ``tempest_img_url``. + This variable replaces ``cirros_tgz_url`` and ``cirros_img_url``. + - Added new variable ``tempest_image_file``. + This variable replaces the hard-coded value + for the ``img_file`` setting in tempest.conf.j2. This will + allow users to specify images other than cirros. + - Added new variable ``tempest_img_disk_format``. + This variable replaces ``cirros_img_disk_format``. +deprecations: + - Removed ``cirros_tgz_url`` and in most places replaced + with ``tempest_img_url``. + - Removed ``cirros_img_url`` and in most places replaced + with ``tempest_img_url``. + - Removed deprecated variable ``tempest_compute_image_alt_ssh_user`` + - Removed deprecated variable ``tempest_compute_image_ssh_password`` + - Removed deprecated variable + ``tempest_compute_image_alt_ssh_password`` + - Renamed ``cirros_img_disk_format`` to ``tempest_img_disk_format`` + - Downloading and unarchiving a .tar.gz has been removed. The + related tempest options ``ami_img_file``, ``aki_img_file``, and + ``ari_img_file`` have been removed from tempest.conf.j2. + - The ``[boto]`` section of tempest.conf.j2 has been removed. These + tests have been completely removed from tempest for some time. +fixes: + - Removed various deprecated / no longer supported + features from tempest.conf.j2. Some variables have been moved + to their new sections in the config. diff --git a/tasks/tempest_post_install.yml b/tasks/tempest_post_install.yml index dd9a69b2..9666e1cb 100644 --- a/tasks/tempest_post_install.yml +++ b/tasks/tempest_post_install.yml @@ -62,28 +62,6 @@ - tempest-config - tempest-image -- name: Locate archives - shell: | - ls -1 {{ tempest_image_dir }} | grep '.gz' - register: tempest_archives - when: tempest_service_available_glance | bool - tags: - - tempest-config - - tempest-image - - tempest-image-unarchive - -- name: Image(s) unarchive - unarchive: - src: "{{ tempest_image_dir }}/{{ item }}" - dest: "{{ tempest_image_dir }}" - copy: "no" - with_items: "{{ tempest_archives.stdout | default([]) }}" - when: tempest_service_available_glance | bool - tags: - - tempest-config - - tempest-image - - tempest-image-unarchive - - name: Copy tempest config config_template: src: "tempest.conf.j2" diff --git a/tasks/tempest_resources.yml b/tasks/tempest_resources.yml index dba9ccd5..ed57cd7b 100644 --- a/tasks/tempest_resources.yml +++ b/tasks/tempest_resources.yml @@ -13,18 +13,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Ensure cirros image +- name: Ensure tempest image glance: command: 'image-create' openrc_path: /root/openrc - image_name: cirros - image_url: "{{ cirros_img_url }}" + image_name: "{{ tempest_img_name }}" + image_url: "{{ tempest_img_url }}" image_container_format: bare - image_disk_format: "{{ cirros_img_disk_format }}" + image_disk_format: "{{ tempest_img_disk_format }}" image_is_public: True insecure: "{{ keystone_service_internaluri_insecure }}" - register: cirros_image_create - until: cirros_image_create | success + register: tempest_image_create + until: tempest_image_create | success retries: 5 delay: 15 when: tempest_service_available_glance | bool @@ -32,9 +32,9 @@ - tempest-setup - tempest-config -- name: Store cirros image id +- name: Store tempest image id set_fact: - tempest_glance_image_id: "{{ glance_images.cirros.id }}" + tempest_glance_image_id: "{{ glance_images[tempest_img_name].id }}" when: tempest_service_available_glance | bool tags: - tempest-setup @@ -50,14 +50,14 @@ - tempest-setup - tempest-config -- name: Ensure alt cirros image +- name: Ensure alt tempest image glance: command: 'image-create' openrc_path: /root/openrc - image_name: cirros_alt - image_url: "{{ cirros_img_url }}" + image_name: "{{ tempest_img_name }}_alt" + image_url: "{{ tempest_img_url }}" image_container_format: bare - image_disk_format: "{{ cirros_img_disk_format }}" + image_disk_format: "{{ tempest_img_disk_format }}" image_is_public: True insecure: "{{ keystone_service_internaluri_insecure }}" when: tempest_service_available_glance | bool @@ -65,9 +65,9 @@ - tempest-setup - tempest-config -- name: Store alt cirros image id +- name: Store alt tempest image id set_fact: - tempest_glance_image_alt_id: "{{ glance_images.cirros_alt.id }}" + tempest_glance_image_alt_id: "{{ glance_images[tempest_img_name + '_alt'].id }}" when: tempest_service_available_glance | bool tags: - tempest-setup diff --git a/templates/tempest.conf.j2 b/templates/tempest.conf.j2 index 73676254..01f0be92 100644 --- a/templates/tempest.conf.j2 +++ b/templates/tempest.conf.j2 @@ -9,23 +9,13 @@ use_stderr = false [auth] tempest_roles = remote_image -allow_tenant_isolation = True +use_dynamic_credentials = True [baremetal] endpoint_type = internalURL -[boto] -aki_manifest = cirros-{{ cirros_version }}-x86_64-vmlinuz.manifest.xml -ami_manifest = cirros-{{ cirros_version }}-x86_64-blank.img.manifest.xml -ari_manifest = cirros-{{ cirros_version }}-x86_64-initrd.manifest.xml -ec2_url = {{ tempest_boto_ec2_url }} -s3_url = {{ tempest_boto_s3_url }} -instance_type = tempest1 -s3_materials_path = /opt/images/s3-materials/cirros-{{ cirros_version }} - - [cli] enabled = true cli_dir = /usr/local/bin @@ -38,11 +28,6 @@ image_ref = {{ tempest_glance_image_id }} image_ref_alt = {{ tempest_glance_image_alt_id }} flavor_ref = 201 flavor_ref_alt = 202 -image_ssh_user = {{ tempest_compute_image_ssh_user }} -image_ssh_password = {{ tempest_compute_image_ssh_password }} -image_alt_ssh_user = {{ tempest_compute_image_alt_ssh_user }} -ssh_user = {{ tempest_compute_ssh_user }} -auth_method = keypair fixed_network_name = private endpoint_type = internalURL floating_ip_range = 10.0.0.0/29 @@ -110,7 +95,7 @@ trust = false [image] endpoint_type = internalURL -http_image = {{ cirros_tgz_url }} +http_image = {{ tempest_img_url }} [image-feature-enabled] @@ -163,12 +148,10 @@ lock_path = {{ tempest_venv_bin | dirname }}/locks [scenario] -aki_img_file = cirros-{{ cirros_version }}-x86_64-vmlinuz -ari_img_file = cirros-{{ cirros_version }}-x86_64-initrd -ami_img_file = cirros-{{ cirros_version }}-x86_64-blank.img img_dir = {{ tempest_image_dir }} -img_file = cirros-{{ cirros_version }}-x86_64-disk.img -ssh_user = {{ tempest_compute_image_ssh_user }} +img_file = {{ tempest_image_file }} +img_container_format = bare +img_disk_format = {{ tempest_img_disk_format }} [service_available] @@ -197,7 +180,8 @@ endpoint_type = internalURL [validation] run_validation = {{ tempest_compute_run_ssh }} - +auth_method = keypair +image_ssh_user = {{ tempest_compute_image_ssh_user }} [volume] endpoint_type = internalURL