Commit 4e21dfb1 authored by Thomas Goirand's avatar Thomas Goirand

Add support for Stein's separated placement.

parent 935fd0b1
......@@ -40,6 +40,7 @@ openstack-cluster-installer (22) UNRELEASED; urgency=medium
the openstack-backports-archive-keyring package, which doesn't work anymore
if using Buster.
* Also install gnupg2 in the installed machines of the cluster.
* Add support for Stein's separated placement.
[ Oliver Chaze ]
* swift: do not log in syslog general logs
......
......@@ -28,6 +28,7 @@
# This is re-used in the oci_controller class below
#
class oci::controller(
$openstack_release = undef,
$machine_hostname = undef,
$machine_ip = undef,
$time_server_host = undef,
......@@ -1099,12 +1100,22 @@ export OS_CACERT=/etc/ssl/certs/oci-pki-oci-ca-chain.pem
require => Wait_for['galera-size-is-correct'],
before => Class['::nova::cell_v2::simple_setup'],
}
class { '::nova::db::mysql_placement':
user => 'placement',
dbname => 'placementdb',
password => $pass_placement_db,
require => Wait_for['galera-size-is-correct'],
before => Anchor['nova::service::begin'],
if $openstack_release == 'rocky'{
class { '::nova::db::mysql_placement':
user => 'placement',
dbname => 'placementdb',
password => $pass_placement_db,
require => Wait_for['galera-size-is-correct'],
before => Anchor['nova::service::begin'],
}
}else{
class { '::placement::db::mysql':
user => 'placement',
dbname => 'placementdb',
password => $pass_placement_db,
require => Wait_for['galera-size-is-correct'],
before => Anchor['nova::service::begin'],
}
}
} else {
wait_for { 'nova-db-user':
......@@ -2128,6 +2139,50 @@ test -e \$mon_data/done
}
}
#######################
### Setup Placement ###
#######################
if $has_subrole_nova and $openstack_release != 'rocky'{
Class['galera'] -> Anchor['placement::install::begin']
if $use_ssl {
oci::sslkeypair {'placement':
notify_service_name => 'placement-api',
}
$placement_key_file = "/etc/placement/ssl/private/${::fqdn}.pem"
$placement_crt_file = "/etc/placement/ssl/public/${::fqdn}.crt"
} else {
$placement_key_file = undef
$placement_crt_file = undef
}
include ::placement
if $is_first_master {
class { '::placement::keystone::auth':
public_url => "${base_url}/placement",
internal_url => "${base_url}/placement",
admin_url => "${base_url}/placement",
password => $pass_placement_authtoken,
}
}
class { '::placement::keystone::authtoken':
password => $pass_placement_authtoken,
auth_url => $keystone_admin_uri,
www_authenticate_uri => $keystone_auth_uri,
memcached_servers => $memcached_servers,
cafile => '/etc/ssl/certs/oci-pki-oci-ca-chain.pem',
}
class { '::placement::logging':
debug => true,
}
class { '::placement::db':
database_connection => "mysql+pymysql://placement:${pass_placement_db}@127.0.0.1/placementdb?charset=utf8",
}
class { '::placement::api':
$sync_db = true,
}
}
##################
### Setup Nova ###
##################
......@@ -2146,10 +2201,6 @@ test -e \$mon_data/done
class { '::nova::cell_v2::simple_setup':
require => Exec['nova-db-sync-api'],
}
# include ::nova::cell_v2::simple_setup
# Anchor['nova::dbsync_api::end'] -> Nova_cell_v2['cell0']
# Anchor['nova::dbsync_api::end'] -> Nova_cell_v2['default']
# Anchor['nova::dbsync_api::end'] -> Nova_cell_v2 <| |>
if $is_first_master {
class { '::nova::keystone::auth':
......@@ -2161,11 +2212,13 @@ test -e \$mon_data/done
}
if $is_first_master {
class { '::nova::keystone::auth_placement':
public_url => "${base_url}/placement",
internal_url => "${base_url}/placement",
admin_url => "${base_url}/placement",
password => $pass_placement_authtoken,
if $openstack_release == 'rocky'{
class { '::nova::keystone::auth_placement':
public_url => "${base_url}/placement",
internal_url => "${base_url}/placement",
admin_url => "${base_url}/placement",
password => $pass_placement_authtoken,
}
}
}
......@@ -2227,9 +2280,11 @@ test -e \$mon_data/done
workers => '2',
}
class { '::nova::placement':
auth_url => $keystone_admin_uri,
password => $pass_placement_authtoken,
if $openstack_release == 'rocky'{
class { '::nova::placement':
auth_url => $keystone_admin_uri,
password => $pass_placement_authtoken,
}
}
class { '::nova::client': }
......
......@@ -457,6 +457,8 @@ function api_actions($con,$conf){
}
$enc_bridge_list .= $enc_external_netlist;
$openstack_release = $conf["releasenames"]["openstack_release"];
###############################
### Role specific ENC output ##
###############################
......@@ -470,6 +472,7 @@ function api_actions($con,$conf){
// Start writing oci::controller class parameters
$enc_file .= " oci::controller:\n";
$enc_file .= " openstack_release: $openstack_release\n";
$enc_file .= " machine_hostname: $machine_hostname\n";
$enc_file .= " machine_ip: $machine_ip\n";
$enc_file .= " time_server_host: $cluster_time_server_host\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment