9c2d58221c
Currently idempotency in Ubuntu is broken because of the below change
detected in collate in MySQL.
```
/Stage[main]/Keystone::Db::Mysql/Openstacklib::Db::Mysql[keystone]/
Mysql_database[keystone]/collate: collate changed 'utf8mb3_general_ci'
to 'utf8_general_ci'
```
Similarly to what we observed in the past about charset[1], it seems
MySQL in Ubuntu is automatically converting the collate value and that
is causing the "unexpected" change detected in the 2nd puppet run.
This fixes the idempotency by using utf8mb3_general_ci in Ubuntu to
avoid the mismatch caused by internal translation.
[1] 085d356902
Change-Id: I56f31397669d3d7b08aa2e9808947141e003ab0b
108 lines
3.4 KiB
Puppet
108 lines
3.4 KiB
Puppet
# Configure the Magnum service
|
|
#
|
|
# [*cert_manager_type*]
|
|
# (optional) Cert manager to use
|
|
# Can be 'barbican', 'x509keypair' or 'local'.
|
|
# Defaults to 'barbican'.
|
|
#
|
|
|
|
class openstack_integration::magnum (
|
|
$cert_manager_type = 'barbican'
|
|
) {
|
|
|
|
include openstack_integration::config
|
|
include openstack_integration::params
|
|
|
|
openstack_integration::mq_user { 'magnum':
|
|
password => 'an_even_bigger_secret',
|
|
before => Anchor['magnum::service::begin'],
|
|
}
|
|
|
|
if $::openstack_integration::config::ssl {
|
|
openstack_integration::ssl_key { 'magnum':
|
|
require => Package['magnum-common'],
|
|
}
|
|
$key_file = "/etc/magnum/ssl/private/${::fqdn}.pem"
|
|
$crt_file = $::openstack_integration::params::cert_path
|
|
File[$key_file] ~> Service<| tag == 'magnum-service' |>
|
|
Exec['update-ca-certificates'] ~> Service<| tag == 'magnum-service' |>
|
|
} else {
|
|
$key_file = undef
|
|
$crt_file = undef
|
|
}
|
|
|
|
class { 'magnum::keystone::auth':
|
|
public_url => "${::openstack_integration::config::base_url}:9511",
|
|
internal_url => "${::openstack_integration::config::base_url}:9511",
|
|
admin_url => "${::openstack_integration::config::base_url}:9511",
|
|
password => 'a_big_secret',
|
|
}
|
|
|
|
class { 'magnum::keystone::keystone_auth':
|
|
password => 'a_big_secret',
|
|
user_domain_name => 'Default',
|
|
project_domain_name => 'Default',
|
|
auth_url => $::openstack_integration::config::keystone_admin_uri,
|
|
}
|
|
|
|
class { 'magnum::keystone::authtoken':
|
|
password => 'a_big_secret',
|
|
user_domain_name => 'Default',
|
|
project_domain_name => 'Default',
|
|
auth_url => $::openstack_integration::config::keystone_admin_uri,
|
|
www_authenticate_uri => $::openstack_integration::config::keystone_auth_uri,
|
|
memcached_servers => $::openstack_integration::config::memcached_servers,
|
|
}
|
|
|
|
class { 'magnum::db::mysql':
|
|
charset => $::openstack_integration::params::mysql_charset,
|
|
collate => $::openstack_integration::params::mysql_collate,
|
|
password => 'magnum',
|
|
}
|
|
|
|
class { 'magnum::db':
|
|
database_connection => 'mysql+pymysql://magnum:magnum@127.0.0.1/magnum',
|
|
}
|
|
|
|
class { 'magnum::keystone::domain':
|
|
domain_password => 'oh_my_no_secret',
|
|
}
|
|
|
|
class { 'magnum::logging':
|
|
debug => true,
|
|
}
|
|
|
|
class { 'magnum':
|
|
notification_transport_url => os_transport_url({
|
|
'transport' => $::openstack_integration::config::messaging_notify_proto,
|
|
'host' => $::openstack_integration::config::host,
|
|
'port' => $::openstack_integration::config::messaging_notify_port,
|
|
'username' => 'magnum',
|
|
'password' => 'an_even_bigger_secret',
|
|
}),
|
|
default_transport_url => os_transport_url({
|
|
'transport' => $::openstack_integration::config::messaging_default_proto,
|
|
'host' => $::openstack_integration::config::host,
|
|
'port' => $::openstack_integration::config::messaging_default_port,
|
|
'username' => 'magnum',
|
|
'password' => 'an_even_bigger_secret',
|
|
}),
|
|
rabbit_use_ssl => $::openstack_integration::config::ssl,
|
|
}
|
|
|
|
class { 'magnum::api':
|
|
host => $::openstack_integration::config::host,
|
|
enabled_ssl => $::openstack_integration::config::ssl,
|
|
ssl_cert_file => $crt_file,
|
|
ssl_key_file => $key_file
|
|
}
|
|
|
|
class { 'magnum::conductor': }
|
|
class { 'magnum::client': }
|
|
class { 'magnum::certificates':
|
|
cert_manager_type => $cert_manager_type
|
|
}
|
|
class { 'magnum::clients': }
|
|
|
|
}
|