nova: Extract placement deployment into a separate class
This change extracts the existing logic to deploy the Nova Placement service into a separate class. This should allow POI to continue to test that puppet-nova is able to deploy the service after puppet-placement is introduced. Change-Id: I8e54d851bc433527d010b763e4aad54172a17676
This commit is contained in:
parent
708ef8e100
commit
2457c0aca0
@ -29,7 +29,10 @@ include ::openstack_integration::mysql
|
|||||||
include ::openstack_integration::keystone
|
include ::openstack_integration::keystone
|
||||||
include ::openstack_integration::glance
|
include ::openstack_integration::glance
|
||||||
include ::openstack_integration::neutron
|
include ::openstack_integration::neutron
|
||||||
include ::openstack_integration::nova
|
include ::openstack_integration::nova_placement
|
||||||
|
class { '::openstack_integration::nova':
|
||||||
|
placement_database_connection => 'mysql+pymysql://nova_placement:nova@127.0.0.1/nova_placement?charset=utf8',
|
||||||
|
}
|
||||||
include ::openstack_integration::cinder
|
include ::openstack_integration::cinder
|
||||||
include ::openstack_integration::horizon
|
include ::openstack_integration::horizon
|
||||||
include ::openstack_integration::provision
|
include ::openstack_integration::provision
|
||||||
|
@ -46,7 +46,10 @@ class { '::openstack_integration::glance':
|
|||||||
}
|
}
|
||||||
include ::openstack_integration::neutron
|
include ::openstack_integration::neutron
|
||||||
include ::openstack_integration::swift
|
include ::openstack_integration::swift
|
||||||
include ::openstack_integration::nova
|
include ::openstack_integration::nova_placement
|
||||||
|
class { '::openstack_integration::nova':
|
||||||
|
placement_database_connection => 'mysql+pymysql://nova_placement:nova@127.0.0.1/nova_placement?charset=utf8',
|
||||||
|
}
|
||||||
include ::openstack_integration::cinder
|
include ::openstack_integration::cinder
|
||||||
include ::openstack_integration::horizon
|
include ::openstack_integration::horizon
|
||||||
include ::openstack_integration::heat
|
include ::openstack_integration::heat
|
||||||
|
@ -92,9 +92,11 @@ class { '::openstack_integration::glance':
|
|||||||
class { '::openstack_integration::neutron':
|
class { '::openstack_integration::neutron':
|
||||||
notification_topics => $notification_topics,
|
notification_topics => $notification_topics,
|
||||||
}
|
}
|
||||||
|
include ::openstack_integration::nova_placement
|
||||||
class { '::openstack_integration::nova':
|
class { '::openstack_integration::nova':
|
||||||
libvirt_rbd => true,
|
libvirt_rbd => true,
|
||||||
notification_topics => $notification_topics,
|
notification_topics => $notification_topics,
|
||||||
|
placement_database_connection => 'mysql+pymysql://nova_placement:nova@127.0.0.1/nova_placement?charset=utf8',
|
||||||
}
|
}
|
||||||
class { '::openstack_integration::cinder':
|
class { '::openstack_integration::cinder':
|
||||||
backend => 'rbd',
|
backend => 'rbd',
|
||||||
|
@ -80,8 +80,10 @@ include ::openstack_integration::ironic
|
|||||||
include ::openstack_integration::zaqar
|
include ::openstack_integration::zaqar
|
||||||
include ::openstack_integration::provision
|
include ::openstack_integration::provision
|
||||||
|
|
||||||
|
include ::openstack_integration::nova_placement
|
||||||
class { '::openstack_integration::nova':
|
class { '::openstack_integration::nova':
|
||||||
volume_encryption => true,
|
volume_encryption => true,
|
||||||
|
placement_database_connection => 'mysql+pymysql://nova_placement:nova@127.0.0.1/nova_placement?charset=utf8',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::openstack_integration::cinder':
|
class { '::openstack_integration::cinder':
|
||||||
|
@ -91,7 +91,10 @@ include ::openstack_integration::glance
|
|||||||
class { '::openstack_integration::neutron':
|
class { '::openstack_integration::neutron':
|
||||||
driver => 'linuxbridge',
|
driver => 'linuxbridge',
|
||||||
}
|
}
|
||||||
include ::openstack_integration::nova
|
include ::openstack_integration::nova_placement
|
||||||
|
class { '::openstack_integration::nova':
|
||||||
|
placement_database_connection => 'mysql+pymysql://nova_placement:nova@127.0.0.1/nova_placement?charset=utf8',
|
||||||
|
}
|
||||||
if $trove_enabled {
|
if $trove_enabled {
|
||||||
include ::openstack_integration::trove
|
include ::openstack_integration::trove
|
||||||
}
|
}
|
||||||
|
@ -83,8 +83,10 @@ class { '::openstack_integration::neutron':
|
|||||||
l2gw_enabled => $l2gw_enabled,
|
l2gw_enabled => $l2gw_enabled,
|
||||||
bgp_dragent_enabled => $bgp_dragent_enabled,
|
bgp_dragent_enabled => $bgp_dragent_enabled,
|
||||||
}
|
}
|
||||||
|
include ::openstack_integration::nova_placement
|
||||||
class { '::openstack_integration::nova':
|
class { '::openstack_integration::nova':
|
||||||
libvirt_rbd => true,
|
libvirt_rbd => true,
|
||||||
|
placement_database_connection => 'mysql+pymysql://nova_placement:nova@127.0.0.1/nova_placement?charset=utf8',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::openstack_integration::ceph':
|
class { '::openstack_integration::ceph':
|
||||||
|
@ -22,12 +22,20 @@
|
|||||||
# (optional) AMQP topic used for OpenStack notifications
|
# (optional) AMQP topic used for OpenStack notifications
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*placement_database_connection*]
|
||||||
|
# (optional) Connection url for the placement database.
|
||||||
|
# Defaults to undef.
|
||||||
|
#
|
||||||
class openstack_integration::nova (
|
class openstack_integration::nova (
|
||||||
$libvirt_rbd = false,
|
$libvirt_rbd = false,
|
||||||
$libvirt_virt_type = 'qemu',
|
$libvirt_virt_type = 'qemu',
|
||||||
$libvirt_cpu_mode = 'none',
|
$libvirt_cpu_mode = 'none',
|
||||||
$volume_encryption = false,
|
$volume_encryption = false,
|
||||||
$notification_topics = $::os_service_default,
|
$notification_topics = $::os_service_default,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$placement_database_connection = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::openstack_integration::config
|
include ::openstack_integration::config
|
||||||
@ -80,30 +88,12 @@ class openstack_integration::nova (
|
|||||||
subscribe => Anchor['nova::service::end'],
|
subscribe => Anchor['nova::service::end'],
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::nova::db::mysql_placement':
|
|
||||||
password => 'nova',
|
|
||||||
}
|
|
||||||
class { '::nova::keystone::auth':
|
class { '::nova::keystone::auth':
|
||||||
public_url => "${::openstack_integration::config::base_url}:8774/v2.1",
|
public_url => "${::openstack_integration::config::base_url}:8774/v2.1",
|
||||||
internal_url => "${::openstack_integration::config::base_url}:8774/v2.1",
|
internal_url => "${::openstack_integration::config::base_url}:8774/v2.1",
|
||||||
admin_url => "${::openstack_integration::config::base_url}:8774/v2.1",
|
admin_url => "${::openstack_integration::config::base_url}:8774/v2.1",
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
}
|
}
|
||||||
if ($::os_package_type == 'debian') {
|
|
||||||
class { '::nova::keystone::auth_placement':
|
|
||||||
public_url => "${::openstack_integration::config::base_url}:8778",
|
|
||||||
internal_url => "${::openstack_integration::config::base_url}:8778",
|
|
||||||
admin_url => "${::openstack_integration::config::base_url}:8778",
|
|
||||||
password => 'a_big_secret',
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
class { '::nova::keystone::auth_placement':
|
|
||||||
public_url => "${::openstack_integration::config::base_url}:8778/placement",
|
|
||||||
internal_url => "${::openstack_integration::config::base_url}:8778/placement",
|
|
||||||
admin_url => "${::openstack_integration::config::base_url}:8778/placement",
|
|
||||||
password => 'a_big_secret',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
class { '::nova::keystone::authtoken':
|
class { '::nova::keystone::authtoken':
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
user_domain_name => 'Default',
|
user_domain_name => 'Default',
|
||||||
@ -120,7 +110,7 @@ class openstack_integration::nova (
|
|||||||
notification_transport_url => $notification_transport_url,
|
notification_transport_url => $notification_transport_url,
|
||||||
database_connection => 'mysql+pymysql://nova:nova@127.0.0.1/nova?charset=utf8',
|
database_connection => 'mysql+pymysql://nova:nova@127.0.0.1/nova?charset=utf8',
|
||||||
api_database_connection => 'mysql+pymysql://nova_api:nova@127.0.0.1/nova_api?charset=utf8',
|
api_database_connection => 'mysql+pymysql://nova_api:nova@127.0.0.1/nova_api?charset=utf8',
|
||||||
placement_database_connection => 'mysql+pymysql://nova_placement:nova@127.0.0.1/nova_placement?charset=utf8',
|
placement_database_connection => $placement_database_connection,
|
||||||
rabbit_use_ssl => $::openstack_integration::config::ssl,
|
rabbit_use_ssl => $::openstack_integration::config::ssl,
|
||||||
amqp_sasl_mechanisms => 'PLAIN',
|
amqp_sasl_mechanisms => 'PLAIN',
|
||||||
use_ipv6 => $::openstack_integration::config::ipv6,
|
use_ipv6 => $::openstack_integration::config::ipv6,
|
||||||
@ -162,16 +152,6 @@ class openstack_integration::nova (
|
|||||||
ssl => $::openstack_integration::config::ssl,
|
ssl => $::openstack_integration::config::ssl,
|
||||||
workers => '2',
|
workers => '2',
|
||||||
}
|
}
|
||||||
if ($::os_package_type != 'debian') {
|
|
||||||
class { '::nova::wsgi::apache_placement':
|
|
||||||
bind_host => $::openstack_integration::config::ip_for_url,
|
|
||||||
api_port => '8778',
|
|
||||||
ssl_key => "/etc/nova/ssl/private/${::fqdn}.pem",
|
|
||||||
ssl_cert => $::openstack_integration::params::cert_path,
|
|
||||||
ssl => $::openstack_integration::config::ssl,
|
|
||||||
workers => '2',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
class { '::nova::placement':
|
class { '::nova::placement':
|
||||||
auth_url => $::openstack_integration::config::keystone_admin_uri,
|
auth_url => $::openstack_integration::config::keystone_admin_uri,
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
|
38
manifests/nova_placement.pp
Normal file
38
manifests/nova_placement.pp
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Configure the Nova Placement service
|
||||||
|
#
|
||||||
|
class openstack_integration::nova_placement {
|
||||||
|
|
||||||
|
include ::openstack_integration::config
|
||||||
|
include ::openstack_integration::params
|
||||||
|
|
||||||
|
class { '::nova::db::mysql_placement':
|
||||||
|
password => 'nova',
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($::os_package_type == 'debian') {
|
||||||
|
class { '::nova::keystone::auth_placement':
|
||||||
|
public_url => "${::openstack_integration::config::base_url}:8778",
|
||||||
|
internal_url => "${::openstack_integration::config::base_url}:8778",
|
||||||
|
admin_url => "${::openstack_integration::config::base_url}:8778",
|
||||||
|
password => 'a_big_secret',
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
class { '::nova::keystone::auth_placement':
|
||||||
|
public_url => "${::openstack_integration::config::base_url}:8778/placement",
|
||||||
|
internal_url => "${::openstack_integration::config::base_url}:8778/placement",
|
||||||
|
admin_url => "${::openstack_integration::config::base_url}:8778/placement",
|
||||||
|
password => 'a_big_secret',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($::os_package_type != 'debian') {
|
||||||
|
class { '::nova::wsgi::apache_placement':
|
||||||
|
bind_host => $::openstack_integration::config::ip_for_url,
|
||||||
|
api_port => '8778',
|
||||||
|
ssl_key => "/etc/nova/ssl/private/${::fqdn}.pem",
|
||||||
|
ssl_cert => $::openstack_integration::params::cert_path,
|
||||||
|
ssl => $::openstack_integration::config::ssl,
|
||||||
|
workers => '2',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user