diff --git a/.zuul.yaml b/.zuul.yaml index a1285418c..02e56a585 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -26,6 +26,7 @@ - openstack/puppet-oslo - openstack/puppet-ovn - openstack/puppet-panko + - openstack/puppet-placement - openstack/puppet-sahara - openstack/puppet-swift - openstack/puppet-tempest diff --git a/Puppetfile b/Puppetfile index df5502583..60d20b966 100755 --- a/Puppetfile +++ b/Puppetfile @@ -74,6 +74,10 @@ mod 'panko', :git => 'https://github.com/openstack/puppet-panko', :ref => 'master' +mod 'placement', + :git => 'https://github.com/openstack/puppet-placement', + :ref => 'master' + mod 'sahara', :git => 'https://github.com/openstack/puppet-sahara', :ref => 'master' diff --git a/packstack/plugins/puppet_950.py b/packstack/plugins/puppet_950.py index e8009b78d..96ed9e363 100755 --- a/packstack/plugins/puppet_950.py +++ b/packstack/plugins/puppet_950.py @@ -151,9 +151,9 @@ def copy_puppet_modules(config, messages): 'keystone', 'magnum', 'manila', 'memcached', 'mysql', 'neutron', 'nova', 'nssdb', 'openstack', 'openstacklib', 'oslo', 'ovn', 'packstack', 'panko', - 'rabbitmq', 'redis', 'remote', 'rsync', 'sahara', 'ssh', - 'stdlib', 'swift', 'sysctl', 'tempest', 'trove', - 'vcsrepo', 'vswitch', 'xinetd')) + 'placement', 'rabbitmq', 'redis', 'remote', 'rsync', + 'sahara', 'ssh', 'stdlib', 'swift', 'sysctl', + 'tempest', 'trove', 'vcsrepo', 'vswitch', 'xinetd')) # write puppet manifest to disk manifestfiles.writeManifests() diff --git a/packstack/puppet/modules/packstack/manifests/keystone/nova.pp b/packstack/puppet/modules/packstack/manifests/keystone/nova.pp index 1bd6cc69a..b967ebb99 100644 --- a/packstack/puppet/modules/packstack/manifests/keystone/nova.pp +++ b/packstack/puppet/modules/packstack/manifests/keystone/nova.pp @@ -3,9 +3,8 @@ class packstack::keystone::nova () $nova_protocol = 'http' $nova_host = hiera('CONFIG_KEYSTONE_HOST_URL') $nova_port = '8774' - $nova_placement_port = '8778' $nova_url = "${nova_protocol}://${nova_host}:${nova_port}/v2.1/%(tenant_id)s" - $nova_placement_url = "${nova_protocol}://${nova_host}:${nova_placement_port}/placement" + class { '::nova::keystone::auth': region => hiera('CONFIG_KEYSTONE_REGION'), @@ -14,12 +13,4 @@ class packstack::keystone::nova () admin_url => $nova_url, internal_url => $nova_url, } - - class { '::nova::keystone::auth_placement': - region => hiera('CONFIG_KEYSTONE_REGION'), - password => hiera('CONFIG_NOVA_KS_PW'), - public_url => $nova_placement_url, - admin_url => $nova_placement_url, - internal_url => $nova_placement_url, - } } diff --git a/packstack/puppet/modules/packstack/manifests/keystone/placement.pp b/packstack/puppet/modules/packstack/manifests/keystone/placement.pp new file mode 100644 index 000000000..d38415929 --- /dev/null +++ b/packstack/puppet/modules/packstack/manifests/keystone/placement.pp @@ -0,0 +1,22 @@ +class packstack::keystone::placement () +{ + $placement_protocol = 'http' + $placement_host = hiera('CONFIG_KEYSTONE_HOST_URL') + $placement_port = '8778' + $placement_url = "${placement_protocol}://${placement_host}:${placement_port}/placement" + + class { '::placement::keystone::authtoken': + password => hiera('CONFIG_NOVA_KS_PW'), + user_domain_name => 'Default', + project_domain_name => 'Default', + auth_url => hiera('CONFIG_KEYSTONE_ADMIN_URL'), + www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL_VERSIONLESS'), + } + + class { '::placement::keystone::auth': + public_url => $placement_url, + internal_url => $placement_url, + admin_url => $placement_url, + password => hiera('CONFIG_NOVA_KS_PW'), + } +} diff --git a/packstack/puppet/modules/packstack/manifests/mariadb/services.pp b/packstack/puppet/modules/packstack/manifests/mariadb/services.pp index 9b6e7dc28..1cfdd5628 100755 --- a/packstack/puppet/modules/packstack/manifests/mariadb/services.pp +++ b/packstack/puppet/modules/packstack/manifests/mariadb/services.pp @@ -100,7 +100,7 @@ class packstack::mariadb::services () allowed_hosts => '%', charset => 'utf8', } - class { '::nova::db::mysql_placement': + class { '::placement::db::mysql': password => hiera('CONFIG_NOVA_DB_PW'), host => '%', allowed_hosts => '%', diff --git a/packstack/puppet/modules/packstack/manifests/mariadb/services_remote.pp b/packstack/puppet/modules/packstack/manifests/mariadb/services_remote.pp index c22be4832..8d11aa3de 100755 --- a/packstack/puppet/modules/packstack/manifests/mariadb/services_remote.pp +++ b/packstack/puppet/modules/packstack/manifests/mariadb/services_remote.pp @@ -396,7 +396,7 @@ class packstack::mariadb::services_remote () { require => Remote_database_user['nova_api@%'], } - remote_database { 'nova_placement': + remote_database { 'placement': ensure => 'present', charset => 'utf8', db_host => hiera('CONFIG_MARIADB_HOST'), @@ -405,22 +405,22 @@ class packstack::mariadb::services_remote () { provider => 'mysql', } - remote_database_user { 'nova_placement@%': + remote_database_user { 'placement@%': password_hash => mysql_password($mariadb_nova_noinstall_db_pw), db_host => hiera('CONFIG_MARIADB_HOST'), db_user => hiera('CONFIG_MARIADB_USER'), db_password => hiera('CONFIG_MARIADB_PW'), provider => 'mysql', - require => Remote_database['nova_placement'], + require => Remote_database['placement'], } - remote_database_grant { 'nova_placement@%/nova_placement': + remote_database_grant { 'placement@%/placement': privileges => 'all', db_host => hiera('CONFIG_MARIADB_HOST'), db_user => hiera('CONFIG_MARIADB_USER'), db_password => hiera('CONFIG_MARIADB_PW'), provider => 'mysql', - require => Remote_database_user['nova_placement@%'], + require => Remote_database_user['placement@%'], } remote_database { 'nova_cell0': diff --git a/packstack/puppet/modules/packstack/manifests/nova.pp b/packstack/puppet/modules/packstack/manifests/nova.pp index 990b5f44f..0eb71213b 100644 --- a/packstack/puppet/modules/packstack/manifests/nova.pp +++ b/packstack/puppet/modules/packstack/manifests/nova.pp @@ -74,7 +74,6 @@ class packstack::nova () notify_on_state_change => $notify_on_state_change, database_connection => "mysql+pymysql://nova:${nova_db_pw}@${nova_mariadb_host}/nova", api_database_connection => "mysql+pymysql://nova_api:${nova_db_pw}@${nova_mariadb_host}/nova_api", - placement_database_connection => "mysql+pymysql://nova_placement:${nova_db_pw}@${nova_mariadb_host}/nova_placement", cpu_allocation_ratio => hiera('CONFIG_NOVA_SCHED_CPU_ALLOC_RATIO'), ram_allocation_ratio => hiera('CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO'), host => $novahost, diff --git a/packstack/puppet/modules/packstack/manifests/nova/api.pp b/packstack/puppet/modules/packstack/manifests/nova/api.pp index ef44fb437..9775ff4fd 100644 --- a/packstack/puppet/modules/packstack/manifests/nova/api.pp +++ b/packstack/puppet/modules/packstack/manifests/nova/api.pp @@ -47,13 +47,6 @@ class packstack::nova::api () aliases => $pci_alias, } - class { '::nova::wsgi::apache_placement': - bind_host => $bind_host, - api_port => '8778', - ssl => false, - workers => hiera('CONFIG_SERVICE_WORKERS'), - } - class { '::nova::placement': auth_url => $www_authenticate_uri, password => $admin_password, diff --git a/packstack/puppet/modules/packstack/manifests/placement.pp b/packstack/puppet/modules/packstack/manifests/placement.pp new file mode 100644 index 000000000..28e696e6e --- /dev/null +++ b/packstack/puppet/modules/packstack/manifests/placement.pp @@ -0,0 +1,30 @@ +class packstack::placement () +{ + $placement_db_pw = hiera('CONFIG_NOVA_DB_PW') + $placement_mariadb_host = hiera('CONFIG_MARIADB_HOST_URL') + $bind_host = hiera('CONFIG_IP_VERSION') ? { + 'ipv6' => '::0', + default => '0.0.0.0', + # TO-DO(mmagr): Add IPv6 support when hostnames are used + } + + include ::packstack::keystone::placement + include ::placement + + class { '::placement::logging': + debug => hiera('CONFIG_DEBUG_MODE'), + } + + class { '::placement::db': + database_connection => "mysql+pymysql://placement:${placement_db_pw}@${placement_mariadb_host}/placement", + } + + include ::placement::db::sync + + class { '::placement::wsgi::apache': + bind_host => $bind_host, + api_port => '8778', + ssl => false, + workers => hiera('CONFIG_SERVICE_WORKERS'), + } +} diff --git a/packstack/puppet/templates/controller.pp b/packstack/puppet/templates/controller.pp index 999fc11bf..393d36780 100644 --- a/packstack/puppet/templates/controller.pp +++ b/packstack/puppet/templates/controller.pp @@ -83,6 +83,7 @@ if hiera('CONFIG_NOVA_INSTALL') == 'y' { if hiera('CONFIG_NEUTRON_INSTALL') == 'y' { include '::packstack::nova::neutron' } + include '::packstack::placement' } if hiera('CONFIG_NEUTRON_INSTALL') == 'y' { diff --git a/releasenotes/notes/Support-for-extracted-placement-service-8ae75efbb1ad25b5.yaml b/releasenotes/notes/Support-for-extracted-placement-service-8ae75efbb1ad25b5.yaml new file mode 100644 index 000000000..c9c7ff5a2 --- /dev/null +++ b/releasenotes/notes/Support-for-extracted-placement-service-8ae75efbb1ad25b5.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Packstack has added support for the extracted Placement service in the + Train cycle, following its upstream support and deprecation in Nova.