Move placement to extracted service
Puppet-nova has removed the support for the integrated service in [1], so Packstack has to move along and start supporting the extracted service. [1] - https://review.opendev.org/638657 Change-Id: I2978015a32101de7a27e13152d89b3802225b128
This commit is contained in:
parent
247b56d07c
commit
7afb1db043
@ -26,6 +26,7 @@
|
|||||||
- openstack/puppet-oslo
|
- openstack/puppet-oslo
|
||||||
- openstack/puppet-ovn
|
- openstack/puppet-ovn
|
||||||
- openstack/puppet-panko
|
- openstack/puppet-panko
|
||||||
|
- openstack/puppet-placement
|
||||||
- openstack/puppet-sahara
|
- openstack/puppet-sahara
|
||||||
- openstack/puppet-swift
|
- openstack/puppet-swift
|
||||||
- openstack/puppet-tempest
|
- openstack/puppet-tempest
|
||||||
|
@ -74,6 +74,10 @@ mod 'panko',
|
|||||||
:git => 'https://github.com/openstack/puppet-panko',
|
:git => 'https://github.com/openstack/puppet-panko',
|
||||||
:ref => 'master'
|
:ref => 'master'
|
||||||
|
|
||||||
|
mod 'placement',
|
||||||
|
:git => 'https://github.com/openstack/puppet-placement',
|
||||||
|
:ref => 'master'
|
||||||
|
|
||||||
mod 'sahara',
|
mod 'sahara',
|
||||||
:git => 'https://github.com/openstack/puppet-sahara',
|
:git => 'https://github.com/openstack/puppet-sahara',
|
||||||
:ref => 'master'
|
:ref => 'master'
|
||||||
|
@ -151,9 +151,9 @@ def copy_puppet_modules(config, messages):
|
|||||||
'keystone', 'magnum', 'manila', 'memcached',
|
'keystone', 'magnum', 'manila', 'memcached',
|
||||||
'mysql', 'neutron', 'nova', 'nssdb', 'openstack',
|
'mysql', 'neutron', 'nova', 'nssdb', 'openstack',
|
||||||
'openstacklib', 'oslo', 'ovn', 'packstack', 'panko',
|
'openstacklib', 'oslo', 'ovn', 'packstack', 'panko',
|
||||||
'rabbitmq', 'redis', 'remote', 'rsync', 'sahara', 'ssh',
|
'placement', 'rabbitmq', 'redis', 'remote', 'rsync',
|
||||||
'stdlib', 'swift', 'sysctl', 'tempest', 'trove',
|
'sahara', 'ssh', 'stdlib', 'swift', 'sysctl',
|
||||||
'vcsrepo', 'vswitch', 'xinetd'))
|
'tempest', 'trove', 'vcsrepo', 'vswitch', 'xinetd'))
|
||||||
|
|
||||||
# write puppet manifest to disk
|
# write puppet manifest to disk
|
||||||
manifestfiles.writeManifests()
|
manifestfiles.writeManifests()
|
||||||
|
@ -3,9 +3,8 @@ class packstack::keystone::nova ()
|
|||||||
$nova_protocol = 'http'
|
$nova_protocol = 'http'
|
||||||
$nova_host = hiera('CONFIG_KEYSTONE_HOST_URL')
|
$nova_host = hiera('CONFIG_KEYSTONE_HOST_URL')
|
||||||
$nova_port = '8774'
|
$nova_port = '8774'
|
||||||
$nova_placement_port = '8778'
|
|
||||||
$nova_url = "${nova_protocol}://${nova_host}:${nova_port}/v2.1/%(tenant_id)s"
|
$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':
|
class { '::nova::keystone::auth':
|
||||||
region => hiera('CONFIG_KEYSTONE_REGION'),
|
region => hiera('CONFIG_KEYSTONE_REGION'),
|
||||||
@ -14,12 +13,4 @@ class packstack::keystone::nova ()
|
|||||||
admin_url => $nova_url,
|
admin_url => $nova_url,
|
||||||
internal_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,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -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'),
|
||||||
|
}
|
||||||
|
}
|
@ -100,7 +100,7 @@ class packstack::mariadb::services ()
|
|||||||
allowed_hosts => '%',
|
allowed_hosts => '%',
|
||||||
charset => 'utf8',
|
charset => 'utf8',
|
||||||
}
|
}
|
||||||
class { '::nova::db::mysql_placement':
|
class { '::placement::db::mysql':
|
||||||
password => hiera('CONFIG_NOVA_DB_PW'),
|
password => hiera('CONFIG_NOVA_DB_PW'),
|
||||||
host => '%',
|
host => '%',
|
||||||
allowed_hosts => '%',
|
allowed_hosts => '%',
|
||||||
|
@ -396,7 +396,7 @@ class packstack::mariadb::services_remote () {
|
|||||||
require => Remote_database_user['nova_api@%'],
|
require => Remote_database_user['nova_api@%'],
|
||||||
}
|
}
|
||||||
|
|
||||||
remote_database { 'nova_placement':
|
remote_database { 'placement':
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
charset => 'utf8',
|
charset => 'utf8',
|
||||||
db_host => hiera('CONFIG_MARIADB_HOST'),
|
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||||
@ -405,22 +405,22 @@ class packstack::mariadb::services_remote () {
|
|||||||
provider => 'mysql',
|
provider => 'mysql',
|
||||||
}
|
}
|
||||||
|
|
||||||
remote_database_user { 'nova_placement@%':
|
remote_database_user { 'placement@%':
|
||||||
password_hash => mysql_password($mariadb_nova_noinstall_db_pw),
|
password_hash => mysql_password($mariadb_nova_noinstall_db_pw),
|
||||||
db_host => hiera('CONFIG_MARIADB_HOST'),
|
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||||
db_user => hiera('CONFIG_MARIADB_USER'),
|
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||||
db_password => hiera('CONFIG_MARIADB_PW'),
|
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||||
provider => 'mysql',
|
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',
|
privileges => 'all',
|
||||||
db_host => hiera('CONFIG_MARIADB_HOST'),
|
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||||
db_user => hiera('CONFIG_MARIADB_USER'),
|
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||||
db_password => hiera('CONFIG_MARIADB_PW'),
|
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||||
provider => 'mysql',
|
provider => 'mysql',
|
||||||
require => Remote_database_user['nova_placement@%'],
|
require => Remote_database_user['placement@%'],
|
||||||
}
|
}
|
||||||
|
|
||||||
remote_database { 'nova_cell0':
|
remote_database { 'nova_cell0':
|
||||||
|
@ -74,7 +74,6 @@ class packstack::nova ()
|
|||||||
notify_on_state_change => $notify_on_state_change,
|
notify_on_state_change => $notify_on_state_change,
|
||||||
database_connection => "mysql+pymysql://nova:${nova_db_pw}@${nova_mariadb_host}/nova",
|
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",
|
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'),
|
cpu_allocation_ratio => hiera('CONFIG_NOVA_SCHED_CPU_ALLOC_RATIO'),
|
||||||
ram_allocation_ratio => hiera('CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO'),
|
ram_allocation_ratio => hiera('CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO'),
|
||||||
host => $novahost,
|
host => $novahost,
|
||||||
|
@ -47,13 +47,6 @@ class packstack::nova::api ()
|
|||||||
aliases => $pci_alias,
|
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':
|
class { '::nova::placement':
|
||||||
auth_url => $www_authenticate_uri,
|
auth_url => $www_authenticate_uri,
|
||||||
password => $admin_password,
|
password => $admin_password,
|
||||||
|
30
packstack/puppet/modules/packstack/manifests/placement.pp
Normal file
30
packstack/puppet/modules/packstack/manifests/placement.pp
Normal file
@ -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'),
|
||||||
|
}
|
||||||
|
}
|
@ -83,6 +83,7 @@ if hiera('CONFIG_NOVA_INSTALL') == 'y' {
|
|||||||
if hiera('CONFIG_NEUTRON_INSTALL') == 'y' {
|
if hiera('CONFIG_NEUTRON_INSTALL') == 'y' {
|
||||||
include '::packstack::nova::neutron'
|
include '::packstack::nova::neutron'
|
||||||
}
|
}
|
||||||
|
include '::packstack::placement'
|
||||||
}
|
}
|
||||||
|
|
||||||
if hiera('CONFIG_NEUTRON_INSTALL') == 'y' {
|
if hiera('CONFIG_NEUTRON_INSTALL') == 'y' {
|
||||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user