diff --git a/Puppetfile b/Puppetfile index d64f4d500..822c9bb7e 100644 --- a/Puppetfile +++ b/Puppetfile @@ -133,6 +133,10 @@ mod 'trove', :git => 'https://git.openstack.org/openstack/puppet-trove', :ref => 'master' +mod 'vitrage', + :git => 'https://git.openstack.org/openstack/puppet-vitrage', + :ref => 'master' + mod 'vswitch', :git => 'https://git.openstack.org/openstack/puppet-vswitch', :ref => 'master' diff --git a/README.md b/README.md index d79369438..5bf8f0d0d 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ scenario](#all-in-one). | ceph | X | | | X | | | ceph rgw | | | | X | | | mongodb | | X | | | | +| vitrage | X | | | | | | watcher | | | | X | | When the Jenkins slave is created, the *run_tests.sh* script will executed. diff --git a/fixtures/scenario001.pp b/fixtures/scenario001.pp index e026e38de..a8dae02a1 100644 --- a/fixtures/scenario001.pp +++ b/fixtures/scenario001.pp @@ -17,12 +17,14 @@ case $::osfamily { 'Debian': { $ipv6 = false - # panko is not packaged yet in debian/ubuntu + # panko and vitrage are not packaged yet in debian/ubuntu $enable_panko = false + $enable_vitrage = false } 'RedHat': { $ipv6 = true $enable_panko = true + $enable_vitrage = true } default: { fail("Unsupported osfamily (${::osfamily})") @@ -59,6 +61,9 @@ class { '::openstack_integration::cinder': } include ::openstack_integration::ceilometer include ::openstack_integration::aodh +if $enable_vitrage { + include ::openstack_integration::vitrage +} include ::openstack_integration::gnocchi include ::openstack_integration::ceph include ::openstack_integration::provision @@ -72,4 +77,5 @@ class { '::openstack_integration::tempest': ceilometer => true, aodh => true, panko => $enable_panko, + vitrage => $enable_vitrage, } diff --git a/manifests/tempest.pp b/manifests/tempest.pp index ccb50882d..77930deb1 100644 --- a/manifests/tempest.pp +++ b/manifests/tempest.pp @@ -76,6 +76,10 @@ # (optional) Define if Trove needs to be tested. # Default to false. # +# [*vitrage*] +# (optional) Define if Vitrage needs to be tested. +# Default to false. +# # [*watcher*] # (optional) Define if Watcher needs to be tested. # Default to false. @@ -109,6 +113,7 @@ class openstack_integration::tempest ( $swift = false, $trove = false, $watcher = false, + $vitrage = false, $zaqar = false, $attach_encrypted_volume = false, ) { @@ -165,6 +170,7 @@ class openstack_integration::tempest ( ironic_available => $ironic, zaqar_available => $zaqar, mistral_available => $mistral, + vitrage_available => $vitrage, gnocchi_available => $gnocchi, panko_available => $panko, ec2api_available => $ec2api, diff --git a/manifests/vitrage.pp b/manifests/vitrage.pp new file mode 100644 index 000000000..1f96c1218 --- /dev/null +++ b/manifests/vitrage.pp @@ -0,0 +1,90 @@ +class openstack_integration::vitrage { + + include ::openstack_integration::config + include ::openstack_integration::params + + rabbitmq_user { 'vitrage': + admin => true, + password => 'an_even_bigger_secret', + provider => 'rabbitmqctl', + require => Class['::rabbitmq'], + } + rabbitmq_user_permissions { 'vitrage@/': + configure_permission => '.*', + write_permission => '.*', + read_permission => '.*', + provider => 'rabbitmqctl', + require => Class['::rabbitmq'], + } + + if $::openstack_integration::config::ssl { + openstack_integration::ssl_key { 'vitrage': + notify => Service['httpd'], + require => Package['vitrage'], + } + Exec['update-ca-certificates'] ~> Service['httpd'] + } + + + class { '::vitrage': + default_transport_url => os_transport_url({ + 'transport' => 'rabbit', + 'host' => $::openstack_integration::config::host, + 'port' => $::openstack_integration::config::rabbit_port, + 'username' => 'vitrage', + 'password' => 'an_even_bigger_secret', + }), + rabbit_use_ssl => $::openstack_integration::config::ssl, + debug => true, + } -> + + # Make sure tempest can read the configuration files + # default installation has a 640 premission + file { '/etc/vitrage': + ensure => directory, + recurse => true, + mode => '0644', + } -> + + # Make sure tempest can write to the log directory + # default installation has a 755 premission + file { '/var/log/vitrage': + ensure => directory, + mode => '0766', + } + + class { '::vitrage::keystone::auth': + public_url => "${::openstack_integration::config::base_url}:8999", + internal_url => "${::openstack_integration::config::base_url}:8999", + admin_url => "${::openstack_integration::config::base_url}:8999", + password => 'a_big_secret', + } + class { '::vitrage::keystone::authtoken': + password => 'a_big_secret', + user_domain_name => 'Default', + project_domain_name => 'Default', + auth_url => $::openstack_integration::config::keystone_admin_uri, + auth_uri => $::openstack_integration::config::keystone_auth_uri, + memcached_servers => $::openstack_integration::config::memcached_servers, + } + class { '::vitrage::api': + enabled => true, + service_name => 'httpd', + } + include ::apache + class { '::vitrage::wsgi::apache': + bind_host => $::openstack_integration::config::ip_for_url, + ssl => $::openstack_integration::config::ssl, + ssl_key => "/etc/vitrage/ssl/private/${::fqdn}.pem", + ssl_cert => $::openstack_integration::params::cert_path, + workers => 2, + } + class { '::vitrage::auth': + auth_url => $::openstack_integration::config::keystone_auth_uri, + auth_password => 'a_big_secret', + } + class { '::vitrage::graph': } + class { '::vitrage::notifier': } + class { '::vitrage::client': } + +} diff --git a/openstack_modules.txt b/openstack_modules.txt index 102c6ab79..95589440d 100644 --- a/openstack_modules.txt +++ b/openstack_modules.txt @@ -32,5 +32,6 @@ tacker tempest trove vswitch +vitrage watcher zaqar diff --git a/run_tests.sh b/run_tests.sh index 78e597abe..de4d2c34d 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -242,6 +242,10 @@ echo "TelemetryAlarming" >> /tmp/openstack/tempest/test-whitelist.txt # Gnocchi echo "gnocchi.tempest" >> /tmp/openstack/tempest/test-whitelist.txt +# Vitrage +# until I fix the tempest tests (they only work in the gate) +echo "TestTopology.test_compare_api_and_cli" >> /tmp/openstack/tempest/test-whitelist.txt + # Ironic # Note: running all Ironic tests under SSL is not working # https://bugs.launchpad.net/ironic/+bug/1554237