Add puppet-watcher and enable it in scenario004

Change-Id: Id1f02e81d224209874c9a6230d1c85090189bae4
Depends-On: I05e9f15fa8c9a6ca1992a27120ba442b35bd0f98
This commit is contained in:
Daniel Pawlik 2016-11-17 18:44:30 +00:00
parent f4bab99559
commit 1f8c65afda
4 changed files with 93 additions and 5 deletions

View File

@ -59,6 +59,7 @@ scenario](#all-in-one).
| ceph | X | | | X | | | ceph | X | | | X | |
| ceph rgw | | | | X | | | ceph rgw | | | | X | |
| mongodb | | X | | | | | mongodb | | X | | | |
| watcher | | | | X | |
When the Jenkins slave is created, the *run_tests.sh* script will executed. 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 This script will execute *install_modules.sh* that prepare /etc/puppet/modules

View File

@ -16,11 +16,14 @@
# Disable SSL (workaround for Xenial) # Disable SSL (workaround for Xenial)
if $::operatingsystem == 'Ubuntu' { if $::operatingsystem == 'Ubuntu' {
$ssl_enabled = false $ssl_enabled = false
$ipv6 = false $ipv6 = false
# Watcher packages are not available in Ubuntu repository.
$watcher_enabled = false
} else { } else {
$ssl_enabled = true $ssl_enabled = true
$ipv6 = true $ipv6 = true
$watcher_enabled = true
} }
include ::openstack_integration include ::openstack_integration
@ -48,9 +51,14 @@ class { '::openstack_integration::ceph':
deploy_rgw => true, deploy_rgw => true,
swift_dropin => true, swift_dropin => true,
} }
if $watcher_enabled {
include ::openstack_integration::watcher
}
include ::openstack_integration::provision include ::openstack_integration::provision
# Don't test swift, radosgw won't pass the current tests # Don't test swift, radosgw won't pass the current tests
# Glance, nova, neutron are true by default. # Glance, nova, neutron are true by default.
include ::openstack_integration::tempest class { '::openstack_integration::tempest':
watcher => $watcher_enabled,
}

View File

@ -72,6 +72,10 @@
# (optional) Define if Trove needs to be tested. # (optional) Define if Trove needs to be tested.
# Default to false. # Default to false.
# #
# [*watcher*]
# (optional) Define if Watcher needs to be tested.
# Default to false.
#
# [*zaqar*] # [*zaqar*]
# (optional) Define if Zaqar needs to be tested. # (optional) Define if Zaqar needs to be tested.
# Default to false. # Default to false.
@ -99,6 +103,7 @@ class openstack_integration::tempest (
$sahara = false, $sahara = false,
$swift = false, $swift = false,
$trove = false, $trove = false,
$watcher = false,
$zaqar = false, $zaqar = false,
$attach_encrypted_volume = false, $attach_encrypted_volume = false,
) { ) {
@ -155,6 +160,7 @@ class openstack_integration::tempest (
mistral_available => $mistral, mistral_available => $mistral,
gnocchi_available => $gnocchi, gnocchi_available => $gnocchi,
ec2api_available => $ec2api, ec2api_available => $ec2api,
watcher_available => $watcher,
public_network_name => 'public', public_network_name => 'public',
dashboard_url => $::openstack_integration::config::base_url, dashboard_url => $::openstack_integration::config::base_url,
flavor_ref => '42', flavor_ref => '42',

73
manifests/watcher.pp Normal file
View File

@ -0,0 +1,73 @@
class openstack_integration::watcher {
include ::openstack_integration::config
include ::openstack_integration::params
rabbitmq_user { 'watcher':
admin => true,
password => 'my_secret',
provider => 'rabbitmqctl',
require => Class['rabbitmq'],
}
rabbitmq_user_permissions { 'watcher@/':
configure_permission => '.*',
write_permission => '.*',
read_permission => '.*',
provider => 'rabbitmqctl',
require => Class['rabbitmq'],
}
if $::openstack_integration::config::ssl {
openstack_integration::ssl_key { 'watcher':
require => Package['watcher'],
}
}
class { '::watcher::db::mysql':
password => 'watcher',
}
class { '::watcher::db':
database_connection => 'mysql+pymysql://watcher:watcher@127.0.0.1/watcher?charset=utf8',
}
# TODO: Support SSL
class { '::watcher::keystone::auth':
password => 'a_big_secret',
public_url => "http://${::openstack_integration::config::ip_for_url}:9322",
admin_url => "http://${::openstack_integration::config::ip_for_url}:9322",
internal_url => "http://${::openstack_integration::config::ip_for_url}:9322",
}
class {'::watcher::keystone::authtoken':
password => 'a_big_secret',
auth_version => 'v3',
user_domain_name => 'Default',
project_domain_name => 'Default',
auth_url => "${::openstack_integration::config::keystone_admin_uri}/v3",
auth_uri => "${::openstack_integration::config::keystone_auth_uri}/v3",
memcached_servers => $::openstack_integration::config::memcached_servers,
}
class { '::watcher::logging':
debug => true,
}
class { '::watcher':
default_transport_url => os_transport_url({
'transport' => 'rabbit',
'host' => $::openstack_integration::config::host,
'port' => $::openstack_integration::config::rabbit_port,
'username' => 'watcher',
'password' => 'my_secret',
}),
rabbit_use_ssl => $::openstack_integration::config::ssl,
}
class { '::watcher::api':
watcher_api_bind_host => $::openstack_integration::config::host,
watcher_client_password => 'a_big_secret',
create_db_schema => true,
upgrade_db => true,
}
class { '::watcher::applier':
applier_workers => '2',
}
class { '::watcher::decision_engine':
decision_engine_workers => '2',
}
}