diff options
-rw-r--r-- | controller.yaml | 4 | ||||
-rw-r--r-- | network/external.yaml | 58 | ||||
-rw-r--r-- | network/internal_api.yaml | 57 | ||||
-rw-r--r-- | network/networks.yaml | 20 | ||||
-rw-r--r-- | network/noop.yaml | 3 | ||||
-rw-r--r-- | network/storage.yaml | 57 | ||||
-rw-r--r-- | network/storage_mgmt.yaml | 57 | ||||
-rw-r--r-- | network/tenant.yaml | 57 | ||||
-rw-r--r-- | overcloud-without-mergepy.yaml | 6 | ||||
-rw-r--r-- | puppet/all-nodes-config.yaml | 8 | ||||
-rw-r--r-- | puppet/controller-post-puppet.yaml | 11 | ||||
-rw-r--r-- | puppet/controller-puppet.yaml | 6 | ||||
-rw-r--r-- | puppet/hieradata/controller.yaml | 14 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 8 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 249 |
15 files changed, 537 insertions, 78 deletions
diff --git a/controller.yaml b/controller.yaml index d7ba1a10..bbac3a68 100644 --- a/controller.yaml +++ b/controller.yaml @@ -208,6 +208,10 @@ parameters: description: Keystone key for signing tokens. type: string hidden: true + MysqlClustercheckPassword: + type: string + hidden: true + default: '' # Has to be here because of the ignored empty value bug MysqlClusterUniquePart: description: A unique identifier of the MySQL cluster the controller is in. type: string diff --git a/network/external.yaml b/network/external.yaml new file mode 100644 index 00000000..29b10324 --- /dev/null +++ b/network/external.yaml @@ -0,0 +1,58 @@ +heat_template_version: 2014-10-16 + +description: > + External network. Public traffic, Neutron l3router for floating IPs/SNAT, etc. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + ExternalNetCidr: + default: '10.0.0.0/24' + description: Cidr for the external network. + type: string + ExternalNetValueSpecs: + default: {'provider:physical_network': 'external', 'provider:network_type': 'flat'} + description: Value specs for the external network. + type: string + ExternalNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + ExternalNetEnableDHCP: + default: false + description: Whether to enable DHCP on the associated subnet. + type: boolean + ExternalNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + ExternalNetName: + default: external + description: The name of the external network. + type: string + ExternalSubnetName: + default: external_subnet + description: The name of the external subnet in Neutron. + type: string + + +resources: + ExternalNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: ExternalNetAdminStateUp} + name: {get_param: ExternalNetName} + shared: {get_param: ExternalNetShared} + value_specs: {get_param: ExternalNetValueSpecs} + + ExternalSubnet: + type: OS::Neutron::Subnet + properties: + cidr: {get_param: ExternalNetCidr} + enable_dhcp: {get_param: ExternalNetEnableDHCP} + name: {get_param: ExternalSubnetName} + network: {get_resource: ExternalNetwork} + +outputs: + OS::stack_id: + description: Neutron external network + value: {get_resource: ExternalNetwork} diff --git a/network/internal_api.yaml b/network/internal_api.yaml new file mode 100644 index 00000000..dfaa9e3b --- /dev/null +++ b/network/internal_api.yaml @@ -0,0 +1,57 @@ +heat_template_version: 2014-10-16 + +description: > + Internal API network. Used for most APIs, Database, RPC. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + InternalApiNetCidr: + default: '172.16.2.0/24' + description: Cidr for the internal API network. + type: string + InternalApiNetValueSpecs: + default: {'provider:physical_network': 'internal_api', 'provider:network_type': 'flat'} + description: Value specs for the internal API network. + type: string + InternalApiNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + InternalApiNetEnableDHCP: + default: false + description: Whether to enable DHCP on the associated subnet. + type: boolean + InternalApiNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + InternalApiNetName: + default: internal_api + description: The name of the internal API network. + type: string + InternalApiSubnetName: + default: internal_api_subnet + description: The name of the internal API subnet in Neutron. + type: string + +resources: + InternalApiNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: InternalApiNetAdminStateUp} + name: {get_param: InternalApiNetName} + shared: {get_param: InternalApiNetShared} + value_specs: {get_param: InternalApiNetValueSpecs} + + InternalApiSubnet: + type: OS::Neutron::Subnet + properties: + cidr: {get_param: InternalApiNetCidr} + enable_dhcp: {get_param: InternalApiNetEnableDHCP} + name: {get_param: InternalApiSubnetName} + network: {get_resource: InternalApiNetwork} + +outputs: + OS::stack_id: + description: Neutron internal network + value: {get_resource: InternalApiNetwork} diff --git a/network/networks.yaml b/network/networks.yaml new file mode 100644 index 00000000..7d36707d --- /dev/null +++ b/network/networks.yaml @@ -0,0 +1,20 @@ +heat_template_version: 2014-10-16 + +description: Create networks to split out Overcloud traffic + +resources: + + ExternalNetwork: + type: OS::TripleO::Network::External + + InternalNetwork: + type: OS::TripleO::Network::InternalApi + + StorageMgmtNetwork: + type: OS::TripleO::Network::StorageMgmt + + StorageNetwork: + type: OS::TripleO::Network::Storage + + TenantNetwork: + type: OS::TripleO::Network::Tenant diff --git a/network/noop.yaml b/network/noop.yaml new file mode 100644 index 00000000..6f02db4d --- /dev/null +++ b/network/noop.yaml @@ -0,0 +1,3 @@ +heat_template_version: 2014-10-16 + +description: A stack which creates no network(s). diff --git a/network/storage.yaml b/network/storage.yaml new file mode 100644 index 00000000..a015465c --- /dev/null +++ b/network/storage.yaml @@ -0,0 +1,57 @@ +heat_template_version: 2014-10-16 + +description: > + Storage network. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + StorageNetCidr: + default: '172.16.1.0/24' + description: Cidr for the storage network. + type: string + StorageNetValueSpecs: + default: {'provider:physical_network': 'storage', 'provider:network_type': 'flat'} + description: Value specs for the storage network. + type: string + StorageNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + StorageNetEnableDHCP: + default: false + description: Whether to enable DHCP on the associated subnet. + type: boolean + StorageNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + StorageNetName: + default: storage + description: The name of the storage network. + type: string + StorageSubnetName: + default: storage_subnet + description: The name of the storage subnet in Neutron. + type: string + +resources: + StorageNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: StorageNetAdminStateUp} + name: {get_param: StorageNetName} + shared: {get_param: StorageNetShared} + value_specs: {get_param: StorageNetValueSpecs} + + StorageSubnet: + type: OS::Neutron::Subnet + properties: + cidr: {get_param: StorageNetCidr} + enable_dhcp: {get_param: StorageNetEnableDHCP} + name: {get_param: StorageSubnetName} + network: {get_resource: StorageNetwork} + +outputs: + OS::stack_id: + description: Neutron storage network + value: {get_resource: StorageNetwork} diff --git a/network/storage_mgmt.yaml b/network/storage_mgmt.yaml new file mode 100644 index 00000000..c4c61905 --- /dev/null +++ b/network/storage_mgmt.yaml @@ -0,0 +1,57 @@ +heat_template_version: 2014-10-16 + +description: > + Storage management network. Storage replication, etc. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + StorageMgmtNetCidr: + default: '172.16.3.0/24' + description: Cidr for the storage management network. + type: string + StorageMgmtNetValueSpecs: + default: {'provider:physical_network': 'storage_mgmt', 'provider:network_type': 'flat'} + description: Value specs for the storage_mgmt network. + type: string + StorageMgmtNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + StorageMgmtNetEnableDHCP: + default: false + description: Whether to enable DHCP on the associated subnet. + type: boolean + StorageMgmtNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + StorageMgmtNetName: + default: storage_mgmt + description: The name of the Storage management network. + type: string + StorageMgmtSubnetName: + default: storage_mgmt_subnet + description: The name of the Storage management subnet in Neutron. + type: string + +resources: + StorageMgmtNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: StorageMgmtNetAdminStateUp} + name: {get_param: StorageMgmtNetName} + shared: {get_param: StorageMgmtNetShared} + value_specs: {get_param: StorageMgmtNetValueSpecs} + + StorageMgmtSubnet: + type: OS::Neutron::Subnet + properties: + cidr: {get_param: StorageMgmtNetCidr} + enable_dhcp: {get_param: StorageMgmtNetEnableDHCP} + name: {get_param: StorageMgmtSubnetName} + network: {get_resource: StorageMgmtNetwork} + +outputs: + OS::stack_id: + description: Neutron storage management network + value: {get_resource: StorageMgmtNetwork} diff --git a/network/tenant.yaml b/network/tenant.yaml new file mode 100644 index 00000000..55a1f53d --- /dev/null +++ b/network/tenant.yaml @@ -0,0 +1,57 @@ +heat_template_version: 2014-10-16 + +description: > + Tenant network. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + TenantNetCidr: + default: '172.16.0.0/24' + description: Cidr for the tenant network. + type: string + TenantNetValueSpecs: + default: {'provider:physical_network': 'tenant', 'provider:network_type': 'flat'} + description: Value specs for the tenant network. + type: string + TenantNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + TenantNetEnableDHCP: + default: false + description: Whether to enable DHCP on the associated subnet. + type: boolean + TenantNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + TenantNetName: + default: tenant + description: The name of the tenant network. + type: string + TenantSubnetName: + default: tenant_subnet + description: The name of the tenant subnet in Neutron. + type: string + +resources: + TenantNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: TenantNetAdminStateUp} + name: {get_param: TenantNetName} + shared: {get_param: TenantNetShared} + value_specs: {get_param: TenantNetValueSpecs} + + TenantSubnet: + type: OS::Neutron::Subnet + properties: + cidr: {get_param: TenantNetCidr} + enable_dhcp: {get_param: TenantNetEnableDHCP} + name: {get_param: TenantSubnetName} + network: {get_resource: TenantNetwork} + +outputs: + OS::stack_id: + description: Neutron tenant network + value: {get_resource: TenantNetwork} diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml index 70e197d2..d3f8c59d 100644 --- a/overcloud-without-mergepy.yaml +++ b/overcloud-without-mergepy.yaml @@ -598,6 +598,7 @@ resources: MysqlClusterUniquePart: {get_attr: [MysqlClusterUniquePart, value]} MysqlInnodbBufferPoolSize: {get_param: MysqlInnodbBufferPoolSize} MysqlRootPassword: {get_attr: [MysqlRootPassword, value]} + MysqlClustercheckPassword: {get_attr: [MysqlClustercheckPassword, value]} NeutronPublicInterfaceIP: {get_param: NeutronPublicInterfaceIP} NeutronFlatNetworks: {get_param: NeutronFlatNetworks} NeutronBridgeMappings: {get_param: NeutronBridgeMappings} @@ -760,6 +761,11 @@ resources: properties: length: 10 + MysqlClustercheckPassword: + type: OS::Heat::RandomString + properties: + length: 10 + MysqlClusterUniquePart: type: OS::Heat::RandomString properties: diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml index 35bd4196..c6dcaecb 100644 --- a/puppet/all-nodes-config.yaml +++ b/puppet/all-nodes-config.yaml @@ -54,6 +54,14 @@ resources: list_join: - ',' - {get_param: controller_ips} + controller_node_names: + list_join: + - ',' + - {get_param: controller_names} + galera_node_names: + list_join: + - ',' + - {get_param: controller_names} rabbit_node_ips: list_join: - ',' diff --git a/puppet/controller-post-puppet.yaml b/puppet/controller-post-puppet.yaml index 361e6a43..7aab7f5a 100644 --- a/puppet/controller-post-puppet.yaml +++ b/puppet/controller-post-puppet.yaml @@ -63,10 +63,19 @@ resources: input_values: step: 3 + ControllerDeploymentOvercloudServices_Step5: + type: OS::Heat::StructuredDeployments + depends_on: ControllerDeploymentOvercloudServices_Step4 + properties: + servers: {get_param: servers} + config: {get_resource: ControllerPuppetConfig} + input_values: + step: 4 + # Note, this should come last, so use depends_on to ensure # this is created after any other resources. ExtraConfig: - depends_on: ControllerDeploymentOvercloudServices_Step4 + depends_on: ControllerDeploymentOvercloudServices_Step5 type: OS::TripleO::NodeExtraConfigPost properties: servers: {get_param: servers} diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 64e7fc72..09a26d58 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -226,6 +226,10 @@ parameters: type: string hidden: true default: '' # Has to be here because of the ignored empty value bug + MysqlClustercheckPassword: + type: string + hidden: true + default: '' # Has to be here because of the ignored empty value bug NeutronBridgeMappings: description: > The OVS logical->physical bridge mappings to use. See the Neutron @@ -553,6 +557,7 @@ resources: enable_swift_storage: {get_param: EnableSwiftStorage} mysql_innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize} mysql_root_password: {get_param: MysqlRootPassword} + mysql_clustercheck_password: {get_param: MysqlClustercheckPassword} mysql_cluster_name: str_replace: template: tripleo-CLUSTER @@ -775,6 +780,7 @@ resources: mysql_innodb_buffer_pool_size: {get_input: mysql_innodb_buffer_pool_size} mysql::server::root_password: {get_input: mysql_root_password} mysql_cluster_name: {get_input: mysql_cluster_name} + mysql_clustercheck_password: {get_input: mysql_clustercheck_password} # Neutron neutron::bind_host: {get_input: controller_host} diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml index 76488457..02b7c42a 100644 --- a/puppet/hieradata/controller.yaml +++ b/puppet/hieradata/controller.yaml @@ -5,11 +5,21 @@ nova::consoleauth::enabled: true nova::vncproxy::enabled: true nova::scheduler::enabled: true +# rabbitmq rabbitmq::delete_guest_user: false rabbitmq::wipe_db_on_cookie_change: true rabbitmq::port: '5672' rabbitmq::package_source: undef rabbitmq::repos_ensure: false +rabbitmq_environment: + RABBITMQ_NODENAME: "rabbit@%{::hostname}" + RABBITMQ_SERVER_ERL_ARGS: '"+K true +A30 +P 1048576 -kernel inet_default_connect_options [{nodelay,true},{raw,6,18,<<5000:64/native>>}] -kernel inet_default_listen_options [{raw,6,18,<<5000:64/native>>}]"' +rabbitmq_kernel_variables: + inet_dist_listen_min: '35672' + inet_dist_listen_max: '35672' +rabbitmq_config_variables: + tcp_listen_options: '[binary, {packet, raw}, {reuseaddr, true}, {backlog, 128}, {nodelay, true}, {exit_on_close, false}, {keepalive, true}]' + cluster_partition_handling: 'pause_minority' mongodb::server::replset: tripleo @@ -84,6 +94,10 @@ horizon::allowed_hosts: '*' mysql::server::manage_config_file: true + +tripleo::loadbalancer::galera_master_ip: "%{hiera('bootstrap_nodeid_ip')}" +tripleo::loadbalancer::galera_master_hostname: "%{hiera('bootstrap_nodeid')}" + tripleo::loadbalancer::keystone_admin: true tripleo::loadbalancer::keystone_public: true tripleo::loadbalancer::neutron: true diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index b068b973..1b088a86 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -161,8 +161,12 @@ if hiera('step') >= 2 { $rabbit_nodes = split(hiera('rabbit_node_ips'), ',') if count($rabbit_nodes) > 1 { class { '::rabbitmq': - config_cluster => true, - cluster_nodes => $rabbit_nodes, + config_cluster => true, + cluster_nodes => $rabbit_nodes, + tcp_keepalive => false, + config_kernel_variables => hiera('rabbitmq_kernel_variables'), + config_variables => hiera('rabbitmq_config_variables'), + environment_variables => hiera('rabbitmq_environment'), } rabbitmq_policy { 'ha-all@/': pattern => '^(?!amq\.).*', diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index 6512dc10..c7df2567 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -33,10 +33,11 @@ if $::hostname == downcase(hiera('bootstrap_nodeid')) { if hiera('step') >= 1 { $controller_node_ips = split(hiera('controller_node_ips'), ',') - + $controller_node_names = split(downcase(hiera('controller_node_names')), ',') class { '::tripleo::loadbalancer' : - controller_hosts => $controller_node_ips, - manage_vip => false, + controller_hosts => $controller_node_ips, + controller_hosts_names => $controller_node_names, + manage_vip => false, } $pacemaker_cluster_members = regsubst(hiera('controller_node_ips'), ',', ' ', 'G') @@ -140,76 +141,163 @@ if hiera('step') >= 2 { } else { $mysql_config_file = '/etc/my.cnf.d/server.cnf' } - # TODO Galara - class { 'mysql::server': - config_file => $mysql_config_file, - override_options => { - 'mysqld' => { - 'bind-address' => hiera('controller_host') - } + $galera_nodes = downcase(hiera('galera_node_names', $::hostname)) + $galera_nodes_count = count(split($galera_nodes, ',')) + $clustercheck_password = hiera('mysql_clustercheck_password') + $mysql_root_password = hiera('mysql::server::root_password') + + $mysqld_options = { + 'mysqld' => { + 'skip-name-resolve' => '1', + 'binlog_format' => 'ROW', + 'default-storage-engine' => 'innodb', + 'innodb_autoinc_lock_mode' => '2', + 'innodb_locks_unsafe_for_binlog'=> '1', + 'query_cache_size' => '0', + 'query_cache_type' => '0', + 'bind-address' => hiera('controller_host'), + 'wsrep_provider' => '/usr/lib64/galera/libgalera_smm.so', + 'wsrep_cluster_name' => 'galera_cluster', + 'wsrep_slave_threads' => '1', + 'wsrep_certify_nonPK' => '1', + 'wsrep_max_ws_rows' => '131072', + 'wsrep_max_ws_size' => '1073741824', + 'wsrep_debug' => '0', + 'wsrep_convert_LOCK_to_trx' => '0', + 'wsrep_retry_autocommit' => '1', + 'wsrep_auto_increment_control' => '1', + 'wsrep_drupal_282555_workaround'=> '0', + 'wsrep_causal_reads' => '0', + 'wsrep_notify_cmd' => '', + 'wsrep_sst_method' => 'rsync', + } + } + + class { '::mysql::server': + create_root_user => false, + create_root_my_cnf => false, + config_file => $mysql_config_file, + override_options => $mysqld_options, + service_manage => false, + } + + if $pacemaker_master { + $sync_db = true + + pacemaker::resource::ocf { 'galera' : + resource_name => 'heartbeat:galera', + options => "enable_creation=true wsrep_cluster_address='gcomm://${galera_nodes}' meta master-max=${galera_nodes_count} ordered=true op promote timeout=300s on-fail=block --master", + require => Class['::mysql::server'], + before => Exec['galera-ready'], } + + mysql_user { 'clustercheckuser@localhost' : + password_hash => mysql_password($clustercheck_password), + require => Exec['galera-ready'], + } + } else { + $sync_db = false + } + + exec { 'galera-ready' : + command => '/bin/mysql -e "SHOW GLOBAL VARIABLES LIKE \'read_only\'" | /bin/grep -i off', + timeout => 3600, + tries => 60, + try_sleep => 60, + environment => 'HOME=/root', + require => Class['::mysql::server'], + } + + file { '/etc/sysconfig/clustercheck' : + ensure => file, + content => "MYSQL_USERNAME=clustercheckuser\n +MYSQL_PASSWORD=${clustercheck_password}\n +MYSQL_HOST=localhost\n", + require => Exec['galera-ready'], + } + + xinetd::service { 'galera-monitor' : + port => '9200', + server => '/usr/bin/clustercheck', + per_source => 'UNLIMITED', + log_on_success => '', + log_on_failure => 'HOST', + flags => 'REUSE', + service_type => 'UNLISTED', + user => 'root', + group => 'root', + require => File['/etc/sysconfig/clustercheck'], } # FIXME: this should only occur on the bootstrap host (ditto for db syncs) # Create all the database schemas # Example DSN format: mysql://user:password@host/dbname - $allowed_hosts = ['%',hiera('controller_host')] - $keystone_dsn = split(hiera('keystone::database_connection'), '[@:/?]') - class { 'keystone::db::mysql': - user => $keystone_dsn[3], - password => $keystone_dsn[4], - host => $keystone_dsn[5], - dbname => $keystone_dsn[6], - allowed_hosts => $allowed_hosts, - } - $glance_dsn = split(hiera('glance::api::database_connection'), '[@:/?]') - class { 'glance::db::mysql': - user => $glance_dsn[3], - password => $glance_dsn[4], - host => $glance_dsn[5], - dbname => $glance_dsn[6], - allowed_hosts => $allowed_hosts, - } - $nova_dsn = split(hiera('nova::database_connection'), '[@:/?]') - class { 'nova::db::mysql': - user => $nova_dsn[3], - password => $nova_dsn[4], - host => $nova_dsn[5], - dbname => $nova_dsn[6], - allowed_hosts => $allowed_hosts, - } - $neutron_dsn = split(hiera('neutron::server::database_connection'), '[@:/?]') - class { 'neutron::db::mysql': - user => $neutron_dsn[3], - password => $neutron_dsn[4], - host => $neutron_dsn[5], - dbname => $neutron_dsn[6], - allowed_hosts => $allowed_hosts, - } - $cinder_dsn = split(hiera('cinder::database_connection'), '[@:/?]') - class { 'cinder::db::mysql': - user => $cinder_dsn[3], - password => $cinder_dsn[4], - host => $cinder_dsn[5], - dbname => $cinder_dsn[6], - allowed_hosts => $allowed_hosts, - } - $heat_dsn = split(hiera('heat::database_connection'), '[@:/?]') - class { 'heat::db::mysql': - user => $heat_dsn[3], - password => $heat_dsn[4], - host => $heat_dsn[5], - dbname => $heat_dsn[6], - allowed_hosts => $allowed_hosts, - } - if downcase(hiera('ceilometer_backend')) == 'mysql' { - $ceilometer_dsn = split(hiera('ceilometer_mysql_conn_string'), '[@:/?]') - class { 'ceilometer::db::mysql': - user => $ceilometer_dsn[3], - password => $ceilometer_dsn[4], - host => $ceilometer_dsn[5], - dbname => $ceilometer_dsn[6], + if $sync_db { + $allowed_hosts = ['%',hiera('controller_host')] + $keystone_dsn = split(hiera('keystone::database_connection'), '[@:/?]') + class { 'keystone::db::mysql': + user => $keystone_dsn[3], + password => $keystone_dsn[4], + host => $keystone_dsn[5], + dbname => $keystone_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + $glance_dsn = split(hiera('glance::api::database_connection'), '[@:/?]') + class { 'glance::db::mysql': + user => $glance_dsn[3], + password => $glance_dsn[4], + host => $glance_dsn[5], + dbname => $glance_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + $nova_dsn = split(hiera('nova::database_connection'), '[@:/?]') + class { 'nova::db::mysql': + user => $nova_dsn[3], + password => $nova_dsn[4], + host => $nova_dsn[5], + dbname => $nova_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + $neutron_dsn = split(hiera('neutron::server::database_connection'), '[@:/?]') + class { 'neutron::db::mysql': + user => $neutron_dsn[3], + password => $neutron_dsn[4], + host => $neutron_dsn[5], + dbname => $neutron_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + $cinder_dsn = split(hiera('cinder::database_connection'), '[@:/?]') + class { 'cinder::db::mysql': + user => $cinder_dsn[3], + password => $cinder_dsn[4], + host => $cinder_dsn[5], + dbname => $cinder_dsn[6], allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + $heat_dsn = split(hiera('heat::database_connection'), '[@:/?]') + class { 'heat::db::mysql': + user => $heat_dsn[3], + password => $heat_dsn[4], + host => $heat_dsn[5], + dbname => $heat_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + if downcase(hiera('ceilometer_backend')) == 'mysql' { + $ceilometer_dsn = split(hiera('ceilometer_mysql_conn_string'), '[@:/?]') + class { 'ceilometer::db::mysql': + user => $ceilometer_dsn[3], + password => $ceilometer_dsn[4], + host => $ceilometer_dsn[5], + dbname => $ceilometer_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } } } @@ -223,10 +311,11 @@ if hiera('step') >= 2 { replace => true, } -> class { '::rabbitmq': - service_manage => false, - environment_variables => { - 'RABBITMQ_NODENAME' => "rabbit@$::hostname", - }, + service_manage => false, + tcp_keepalive => false, + config_kernel_variables => hiera('rabbitmq_kernel_variables'), + config_variables => hiera('rabbitmq_config_variables'), + environment_variables => hiera('rabbitmq_environment'), } if $pacemaker_master { pacemaker::resource::ocf { 'rabbitmq': @@ -257,7 +346,8 @@ if hiera('step') >= 2 { } #END STEP 2 -if hiera('step') >= 3 { +if (hiera('step') >= 3 and $::hostname == downcase(hiera('bootstrap_nodeid'))) + or hiera('step') >= 4 { include ::keystone @@ -306,14 +396,18 @@ if hiera('step') >= 3 { class { 'glance::api': known_stores => [$glance_store] } - include ::glance::registry + class { '::glance::registry' : + sync_db => $sync_db, + } include join(['::glance::backend::', $glance_backend]) class { 'nova': glance_api_servers => join([hiera('glance_protocol'), '://', hiera('controller_virtual_ip'), ':', hiera('glance_port')]), } - include ::nova::api + class { '::nova::api' : + sync_db => $sync_db, + } include ::nova::cert include ::nova::conductor include ::nova::consoleauth @@ -322,7 +416,9 @@ if hiera('step') >= 3 { include ::nova::scheduler include ::neutron - include ::neutron::server + class { '::neutron::server' : + sync_db => $sync_db, + } include ::neutron::agents::dhcp include ::neutron::agents::l3 @@ -458,6 +554,7 @@ if hiera('step') >= 3 { include ::ceilometer::collector class { '::ceilometer::db' : database_connection => $ceilometer_database_connection, + sync_db => $sync_db, } class { 'ceilometer::agent::auth': auth_url => join(['http://', hiera('controller_virtual_ip'), ':5000/v2.0']), @@ -466,7 +563,9 @@ if hiera('step') >= 3 { Cron <| title == 'ceilometer-expirer' |> { command => "sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" } # Heat - include ::heat + class { '::heat' : + sync_db => $sync_db, + } include ::heat::api include ::heat::api_cfn include ::heat::api_cloudwatch |