From 8d5fe5e9529f6d6bdb94af81bcfd07c554cdce0e Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Sat, 2 Jan 2016 07:24:27 -0500 Subject: [PATCH] Deploy & Test Ironic * Create manifest to deploy Ironic services with 'fake' driver. * Add bits to tempest class to enable the service. * Update README. * Add api.baremetal tests so we actually test Ironic. Depends-On: I93fd4740d09b0c7e926c4dba7a7602f4d295d2ea Depends-On: I01c83a6daa3909d4d9b1cb559836b7b5e54c7c7e Change-Id: Ice03be261e687af43e677a9f60a1cc3c79acdf8b --- README.md | 1 + fixtures/scenario002.pp | 17 ++++++++++++++++- manifests/ironic.pp | 39 +++++++++++++++++++++++++++++++++++++++ manifests/tempest.pp | 6 ++++++ run_tests.sh | 3 ++- 5 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 manifests/ironic.pp diff --git a/README.md b/README.md index 948627829..a9189f464 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ scenario](#All-In-One). | sahara | | X | | | trove | X | | | | horizon | | X | X | +| ironic | | X | | When the Jenkins slave is created, the *run_tests.sh* script will executed. This script will execute *install_modules.sh* that prepare /etc/puppet/modules diff --git a/fixtures/scenario002.pp b/fixtures/scenario002.pp index a0123d65a..e2d6992c0 100644 --- a/fixtures/scenario002.pp +++ b/fixtures/scenario002.pp @@ -26,12 +26,27 @@ include ::openstack_integration::heat include ::openstack_integration::horizon include ::openstack_integration::sahara include ::openstack_integration::swift +include ::openstack_integration::ironic include ::openstack_integration::provision +case $::osfamily { + 'Debian': { + # ironic-conductor is broken for Ubuntu Trusty + # https://bugs.launchpad.net/cloud-archive/+bug/1530869 + $ironic_enabled = false + } + 'RedHat': { + $ironic_enabled = true + } + default: { + fail("Unsupported osfamily (${::osfamily})") + } +} + class { '::openstack_integration::tempest': horizon => true, sahara => true, heat => true, swift => true, - require => Class['::rabbitmq'], + ironic => $ironic_enabled, } diff --git a/manifests/ironic.pp b/manifests/ironic.pp new file mode 100644 index 000000000..581a2a343 --- /dev/null +++ b/manifests/ironic.pp @@ -0,0 +1,39 @@ +class openstack_integration::ironic { + + rabbitmq_user { 'ironic': + admin => true, + password => 'an_even_bigger_secret', + provider => 'rabbitmqctl', + require => Class['::rabbitmq'], + } + rabbitmq_user_permissions { 'ironic@/': + configure_permission => '.*', + write_permission => '.*', + read_permission => '.*', + provider => 'rabbitmqctl', + require => Class['::rabbitmq'], + } + + class { '::ironic': + rabbit_userid => 'ironic', + rabbit_password => 'an_even_bigger_secret', + rabbit_host => '127.0.0.1', + database_connection => 'mysql+pymysql://ironic:ironic@127.0.0.1/ironic?charset=utf8', + debug => true, + verbose => true, + enabled_drivers => ['fake', 'pxe_ssh', 'pxe_ipmitool'], + } + class { '::ironic::db::mysql': + password => 'ironic', + } + class { '::ironic::keystone::auth': + password => 'a_big_secret', + } + class { '::ironic::client': } + class { '::ironic::api': + admin_password => 'a_big_secret', + workers => '2', + } + class { '::ironic::conductor': } + +} diff --git a/manifests/tempest.pp b/manifests/tempest.pp index 6538f04e0..1dee34fbb 100644 --- a/manifests/tempest.pp +++ b/manifests/tempest.pp @@ -24,6 +24,10 @@ # (optional) Define if Horizon needs to be tested. # Default to false. # +# [*ironic*] +# (optional) Define if Ironic needs to be tested. +# Default to false. +# # [*neutron*] # (optional) Define if Neutron needs to be tested. # Default to true. @@ -51,6 +55,7 @@ class openstack_integration::tempest ( $glance = true, $heat = false, $horizon = false, + $ironic = false, $neutron = true, $nova = true, $sahara = false, @@ -89,6 +94,7 @@ class openstack_integration::tempest ( sahara_available => $sahara, heat_available => $heat, swift_available => $swift, + ironic_available => $ironic, public_network_name => 'public', dashboard_url => "http://${::hostname}/", flavor_ref => '42', diff --git a/run_tests.sh b/run_tests.sh index 238f9077d..cb5a6c870 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -93,5 +93,6 @@ wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -P /tmp # - smoke suite # - dashboard (horizon) # - TelemetryAlarming (Aodh) -cd /tmp/openstack/tempest; tox -eall -- --concurrency=2 smoke dashboard TelemetryAlarming +# - api.baremetal (Ironic) +cd /tmp/openstack/tempest; tox -eall -- --concurrency=2 smoke dashboard TelemetryAlarming api.baremetal /tmp/openstack/tempest/.tox/all/bin/testr last --subunit > /tmp/openstack/tempest/testrepository.subunit