diff --git a/.kitchen.dokken.yml b/.kitchen.dokken.yml index 528d758..c8d3ef1 100644 --- a/.kitchen.dokken.yml +++ b/.kitchen.dokken.yml @@ -1,8 +1,11 @@ --- driver: name: dokken - privileged: true # because Docker and SystemD - chef_version: 12 + privileged: true + chef_version: current + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro + - /sys/fs/selinux:/sys/fs/selinux:rw transport: name: dokken @@ -15,39 +18,26 @@ verifier: name: inspec platforms: - # from environments/allinone-ubuntu16.json - name: ubuntu-16.04 driver: image: dokken/ubuntu-16.04 pid_one_command: /bin/systemd - attributes: - apache: - listen: [] - openstack: - is_release: true - apt: - update_apt_cache: true - dashboard: - server_hostname: localhost - memcached_servers: ['127.0.0.1:11211'] - # from environments/allinone-centos7.json + intermediate_instructions: + - RUN /usr/bin/apt-get update + - RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools sudo -y - name: centos-7 platform: rhel driver: image: dokken/centos-7 pid_one_command: /usr/lib/systemd/systemd - attributes: - openstack: - is_release: true - mariadb: - mysqld: - lc_messages_dir: '/usr/share/mariadb' + intermediate_instructions: + - RUN yum -y install which net-tools suites: - name: default run_list: # run_list taken from roles/allinone.json - - recipe[build-essential] + - recipe[selinux::disabled] - recipe[openstack-common] - recipe[openstack-common::logging] - recipe[openstack-common::sysctl] @@ -105,10 +95,17 @@ suites: verifier: inspec_tests: - test/tempest/default - # from environments/allinone-ubuntu16.json, environments/allinone-centos7.json + # from environments/allinone.json attributes: - # Attributes copied from environments/integration-ubuntu16.json + # Attributes copied from environments/integration.json + apache: + listen: [] openstack: + is_release: true + apt: + update_apt_cache: true + dashboard: + server_hostname: localhost telemetry: conf: DEFAULT: @@ -116,6 +113,7 @@ suites: mq: user: admin network: + tun_network_bridge_interface: eth0 conf: DEFAULT: service_plugins: router @@ -124,6 +122,7 @@ suites: compute: conf: libvirt: + cpu_type: none virt_type: qemu secret: key_path: /opt/kitchen/encrypted_data_bag_secret diff --git a/.kitchen.yml b/.kitchen.yml index c09fdd3..aed33c2 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -4,6 +4,10 @@ driver: customize: memory: 12000 +client_rb: + treat_deprecation_warnings_as_errors: true + resource_cloning: false + provisioner: name: chef_zero # You may wish to disable always updating cookbooks in CI or other testing @@ -11,7 +15,7 @@ provisioner: # For example: # always_update_cookbooks: <%= !ENV['CI'] %> always_update_cookbooks: true - require_chef_omnibus: 12 + require_chef_omnibus: 13 # Copy secret to /tmp/kitchen on test VM. Kitchen tries to gather secrets # before any recipes had a chance to run -> we cannot use a recipe to put the # secrets file in place. @@ -21,31 +25,13 @@ verifier: name: inspec platforms: - # from environments/allinone-ubuntu16.json - name: ubuntu-16.04 - attributes: - apache: - listen: [] - apt: - compile_time_update: true - openstack: - apt: - update_apt_cache: true - dashboard: - server_hostname: localhost - memcached_servers: ['127.0.0.1:11211'] - # from environments/allinone-centos7.json - - name: centos-7.3 - attributes: - mariadb: - mysqld: - lc_messages_dir: '/usr/share/mariadb' + - name: centos-7.4 suites: - name: default run_list: # run_list taken from roles/allinone.json - - recipe[build-essential] - recipe[openstack-common] - recipe[openstack-common::logging] - recipe[openstack-common::sysctl] @@ -106,7 +92,15 @@ suites: # from environments/allinone-ubuntu16.json, environments/allinone-centos7.json attributes: # Attributes copied from environments/integration-ubuntu16.json + apache: + listen: [] openstack: + is_release: true + apt: + update_apt_cache: true + dashboard: + server_hostname: localhost + memcached_servers: ['127.0.0.1:11211'] telemetry: conf: DEFAULT: @@ -122,6 +116,7 @@ suites: compute: conf: libvirt: + cpu_type: none virt_type: qemu secret: key_path: /tmp/kitchen/encrypted_data_bag_secret diff --git a/environments/allinone-centos7.json b/environments/allinone-centos7.json deleted file mode 100644 index db0d721..0000000 --- a/environments/allinone-centos7.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "allinone-centos7", - "description": "Environment used in testing the upstream cookbooks and reference Chef repository with vagrant. To be used with the vagrantfile-allinone vagrantfile. Defines the necessary attributes for a working all-in-one openstack deployment, using neutron for the networking component, and the openvswitch neutron plugin", - "cookbook_versions": { - }, - "json_class": "Chef::Environment", - "chef_type": "environment", - "override_attributes": { - "mariadb": { - "mysqld": { - "lc_messages_dir": "/usr/share/mariadb" - } - }, - "openstack": { - "yum": { - "uri": "https://trunk.rdoproject.org/centos7-master/current-passed-ci/", - "gpgcheck": false - }, - "telemetry": { - "conf": { - "DEFAULT": { - "meter_dispatchers": "database" - } - } - }, - "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_mode": "none", - "virt_type": "qemu" - } - } - } - } - } -} diff --git a/environments/allinone-ubuntu16.json b/environments/allinone.json similarity index 86% rename from environments/allinone-ubuntu16.json rename to environments/allinone.json index f996175..595e8df 100644 --- a/environments/allinone-ubuntu16.json +++ b/environments/allinone.json @@ -1,5 +1,5 @@ { - "name": "allinone-ubuntu16", + "name": "allinone", "description": "Environment used in testing the upstream cookbooks and reference Chef repository with vagrant. To be used with the vagrantfile-allinone vagrantfile. Defines the necessary attributes for a working all-in-one openstack deployment, using neutron for the networking component, and the openvswitch neutron plugin", "cookbook_versions": { }, @@ -8,15 +8,13 @@ "default_attributes": { "apache": { "listen": [] - }, - "apt": { - "compile_time_update" : true } }, "override_attributes": { "openstack": { + "is_release": true, "apt": { - "update_apt_cache": true + "update_apt_cache": "true" }, "telemetry": { "conf": { @@ -28,11 +26,10 @@ "dashboard": { "server_hostname": "localhost" }, - "memcached_servers": [ "127.0.0.1:11211" ], "mq": { "user": "admin" }, - "network":{ + "network": { "conf": { "DEFAULT": { "service_plugins": "router" diff --git a/test/tempest/default/default_test.rb b/test/tempest/default/default_test.rb index 17e7a86..4040a5f 100644 --- a/test/tempest/default/default_test.rb +++ b/test/tempest/default/default_test.rb @@ -6,8 +6,7 @@ # found at http://inspec.io/docs/reference/resources/ # There is no console output during runtime, check log file instead. -describe command('sudo bash -c "cd /opt/tempest && ' \ - 'sudo /opt/tempest-venv/tempest.sh | ' \ +describe command('sudo bash -c "sudo tempest run --smoke --serial --config-file /etc/tempest/tempest.conf | ' \ 'tee /root/inspec-tempest-$(date -Iminutes).log &&' \ 'exit \${PIPESTATUS[0]}"') do its('exit_status') { should eq 0 }