From 1808bcbacff1ab6e20ce8666638bf27fea02f846 Mon Sep 17 00:00:00 2001 From: Jens Harbott Date: Fri, 22 Mar 2019 12:17:33 +0000 Subject: [PATCH] Fix integration testing for deploying Queens on Bionic Change-Id: I28d93b04804bf3ee593b9dfee86f4be0e4713e7d --- .zuul.yaml | 2 + Rakefile | 3 +- environments/integration-xenial.json | 67 ++++++++++++++++++++++++++++ environments/integration.json | 12 ++++- playbooks/integration.yaml | 1 + 5 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 environments/integration-xenial.json diff --git a/.zuul.yaml b/.zuul.yaml index bf33fbf..1b40e0c 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -23,6 +23,8 @@ parent: openstack-chef-integration-bionic nodeset: ubuntu-xenial description: Run integration tests with openstack-chef on Ubuntu Xenial + vars: + chef_test_env: integration-xenial - project-template: name: openstack-chef-jobs diff --git a/Rakefile b/Rakefile index ef41932..cd7cc65 100644 --- a/Rakefile +++ b/Rakefile @@ -141,6 +141,7 @@ task integration: %i(create_key berks_vendor) do # This is a workaround for allowing chef-client to run in local mode sh %(sudo mkdir -p /etc/chef && sudo cp .chef/encrypted_data_bag_secret /etc/chef/openstack_data_bag_secret) _run_env_queries + test_env = ENV['TEST_ENVIRONMENT'] # Three passes to ensure idempotency. prefer each to times, even if it # reads weird @@ -148,7 +149,7 @@ task integration: %i(create_key berks_vendor) do begin puts "####### Pass #{i}" # Kick off chef client in local mode, will converge OpenStack right on the gate job "in place" - sh %(sudo chef-client #{client_opts} -E integration -r 'role[minimal]' > #{log_dir}/chef-client-pass#{i}.txt 2>&1 ) + sh %(sudo chef-client #{client_opts} -E #{test_env} -r 'role[minimal]' > #{log_dir}/chef-client-pass#{i}.txt 2>&1 ) _run_basic_queries rescue => e raise "####### Pass #{i} failed with #{e.message}" diff --git a/environments/integration-xenial.json b/environments/integration-xenial.json new file mode 100644 index 0000000..5178f59 --- /dev/null +++ b/environments/integration-xenial.json @@ -0,0 +1,67 @@ +{ + "name": "integration-xenial", + "description": "Chef environment file for building OpenStack in CI settings running on Ubuntu Xenial. Certain Tempest services are disabled in this scenario", + "default_attributes": { + "apache": { + "listen": [ + + ] + }, + "yum": { + "epel": { + "enabled": false + } + } + }, + "override_attributes": { + "openstack": { + "is_release": true, + "apt": { + "update_apt_cache": true + }, + "telemetry": { + "conf": { + "DEFAULT": { + "meter_dispatchers": "database" + } + } + }, + "integration-test": { + "conf": { + "service_available": { + "ceilometer": false, + "heat": false, + "horizon": false + } + } + }, + "dashboard": { + "server_hostname": "localhost" + }, + "memcached_servers": [ + "127.0.0.1:11211" + ], + "mq": { + "user": "admin" + }, + "network": { + "conf": { + "DEFAULT": { + "service_plugins": "router" + } + } + }, + "image": { + "image_upload": true + }, + "compute": { + "conf": { + "libvirt": { + "cpu_type": "none", + "virt_type": "qemu" + } + } + } + } + } +} diff --git a/environments/integration.json b/environments/integration.json index 56f83e7..f4602a7 100644 --- a/environments/integration.json +++ b/environments/integration.json @@ -7,6 +7,16 @@ ] }, + "mariadb": { + "install": { + "version": "10.1" + } + }, + "openstack": { + "apt": { + "live_updates_enabled": false + } + }, "yum": { "epel": { "enabled": false @@ -64,4 +74,4 @@ } } } -} \ No newline at end of file +} diff --git a/playbooks/integration.yaml b/playbooks/integration.yaml index c80643b..b966d14 100644 --- a/playbooks/integration.yaml +++ b/playbooks/integration.yaml @@ -5,4 +5,5 @@ cmd: chef exec rake integration chdir: '{{ ansible_user_dir }}/src/git.openstack.org/openstack/openstack-chef' environment: + TEST_ENVIRONMENT: '{{ chef_test_env | default("integration") }}' WORKSPACE: '{{ ansible_user_dir }}'