diff options
27 files changed, 180 insertions, 58 deletions
diff --git a/ceph-storage-post.yaml b/ceph-storage-post.yaml index 2a0fa043..12d03f18 100644 --- a/ceph-storage-post.yaml +++ b/ceph-storage-post.yaml @@ -5,4 +5,14 @@ description: 'Ceph Storage Post Deployment' parameters: servers: - type: json
\ No newline at end of file + type: json + +resources: + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/ceph-storage.yaml b/ceph-storage.yaml index f89d5f3a..07d7f568 100644 --- a/ceph-storage.yaml +++ b/ceph-storage.yaml @@ -114,7 +114,7 @@ outputs: hosts_entry: value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [CephStorage, networks, ctlplane, 0]} HOST: {get_attr: [CephStorage, name]} diff --git a/cinder-storage-post.yaml b/cinder-storage-post.yaml index 0331685a..08818381 100644 --- a/cinder-storage-post.yaml +++ b/cinder-storage-post.yaml @@ -6,3 +6,13 @@ description: 'Common Block Storage Post Deployment' parameters: servers: type: json + +resources: + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/cinder-storage.yaml b/cinder-storage.yaml index f26ef3e2..7d44094f 100644 --- a/cinder-storage.yaml +++ b/cinder-storage.yaml @@ -159,7 +159,7 @@ outputs: hosts_entry: value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [BlockStorage, networks, ctlplane, 0]} HOST: {get_attr: [BlockStorage, name]} diff --git a/compute-post.yaml b/compute-post.yaml index 8c49709f..bd7639c5 100644 --- a/compute-post.yaml +++ b/compute-post.yaml @@ -6,3 +6,14 @@ description: 'Compute Post Deployment' parameters: servers: type: json + +resources: + + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/compute.yaml b/compute.yaml index f7e434f5..672687ca 100644 --- a/compute.yaml +++ b/compute.yaml @@ -427,7 +427,7 @@ outputs: Server's IP address and hostname in the /etc/hosts format value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [NovaCompute, networks, ctlplane, 0]} HOST: {get_attr: [NovaCompute, name]} diff --git a/controller-post.yaml b/controller-post.yaml index 31a3062a..e630c221 100644 --- a/controller-post.yaml +++ b/controller-post.yaml @@ -6,3 +6,12 @@ description: 'Controller Post Deployment' parameters: servers: type: json + +resources: + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} diff --git a/controller.yaml b/controller.yaml index 80f9124f..71b8a04e 100644 --- a/controller.yaml +++ b/controller.yaml @@ -926,7 +926,7 @@ outputs: Server's IP address and hostname in the /etc/hosts format value: str_replace: - template: IP HOST HOST.novalocal CLOUDNAME + template: IP HOST CLOUDNAME params: IP: {get_attr: [Controller, networks, ctlplane, 0]} HOST: {get_attr: [Controller, name]} diff --git a/deprecated/overcloud-source.yaml b/deprecated/overcloud-source.yaml index 82fe6755..d355c4df 100644 --- a/deprecated/overcloud-source.yaml +++ b/deprecated/overcloud-source.yaml @@ -877,10 +877,6 @@ resources: - ' ' - - {get_attr: [NovaCompute0, networks, ctlplane, 0]} - {get_attr: [NovaCompute0, name]} - - Fn::Join: - - '.' - - - {get_attr: [NovaCompute0, name]} - - 'novalocal' - Fn::Join: - "\n" - Merge::Map: @@ -889,10 +885,6 @@ resources: - ' ' - - {get_attr: [BlockStorage0, networks, ctlplane, 0]} - {get_attr: [BlockStorage0, name]} - - Fn::Join: - - '.' - - - {get_attr: [BlockStorage0, name]} - - 'novalocal' - Fn::Join: - "\n" - Merge::Map: @@ -901,10 +893,6 @@ resources: - ' ' - - {get_attr: [SwiftStorage0, networks, ctlplane, 0]} - {get_attr: [SwiftStorage0, name]} - - Fn::Join: - - '.' - - - {get_attr: [SwiftStorage0, name]} - - 'novalocal' - Fn::Join: - "\n" - Merge::Map: @@ -913,10 +901,6 @@ resources: - ' ' - - {get_attr: [controller0, networks, ctlplane, 0]} - {get_attr: [controller0, name]} - - Fn::Join: - - '.' - - - {get_attr: [controller0, name]} - - 'novalocal' - {get_param: CloudName} rabbit: nodes: diff --git a/extraconfig/post_deploy/default.yaml b/extraconfig/post_deploy/default.yaml new file mode 100644 index 00000000..ddfe0243 --- /dev/null +++ b/extraconfig/post_deploy/default.yaml @@ -0,0 +1,5 @@ +heat_template_version: 2014-10-16 +description: 'Extra Post Deployment Config' +parameters: + servers: + type: json diff --git a/extraconfig/post_deploy/example.yaml b/extraconfig/post_deploy/example.yaml new file mode 100644 index 00000000..6b816d40 --- /dev/null +++ b/extraconfig/post_deploy/example.yaml @@ -0,0 +1,27 @@ +heat_template_version: 2014-10-16 + +description: > + Example extra config for post-deployment + +# Note extra parameters can be defined, then passed data via the +# environment parameter_defaults, without modifying the parent template +parameters: + servers: + type: json + +resources: + + ExtraConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + config: | + #!/bin/sh + echo "extra" > /root/extra + + ExtraDeployments: + type: OS::Heat::StructuredDeployments + properties: + servers: {get_param: servers} + config: {get_resource: ExtraConfig} + actions: ['CREATE'] # Only do this on CREATE diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml index 08293465..2b9da710 100644 --- a/overcloud-resource-registry-puppet.yaml +++ b/overcloud-resource-registry-puppet.yaml @@ -20,6 +20,7 @@ resource_registry: OS::TripleO::AllNodes::SoftwareConfig: puppet/all-nodes-config.yaml OS::TripleO::BootstrapNode::SoftwareConfig: puppet/bootstrap-config.yaml OS::TripleO::NodeUserData: firstboot/userdata_default.yaml + OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml parameter_defaults: EnablePackageInstall: false diff --git a/overcloud-resource-registry.yaml b/overcloud-resource-registry.yaml index 71043104..69266405 100644 --- a/overcloud-resource-registry.yaml +++ b/overcloud-resource-registry.yaml @@ -20,3 +20,4 @@ resource_registry: OS::TripleO::AllNodes::SoftwareConfig: all-nodes-config.yaml OS::TripleO::BootstrapNode::SoftwareConfig: bootstrap-config.yaml OS::TripleO::NodeUserData: firstboot/userdata_default.yaml + OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml index 7a4df796..9345e5c5 100644 --- a/puppet/all-nodes-config.yaml +++ b/puppet/all-nodes-config.yaml @@ -54,10 +54,10 @@ resources: list_join: - ',' - {get_param: controller_ips} - rabbit_node_names: + rabbit_node_ips: list_join: - ',' - - {get_param: controller_names} + - {get_param: controller_ips} mongo_node_ips: list_join: - ',' diff --git a/puppet/ceph-storage-post-puppet.yaml b/puppet/ceph-storage-post-puppet.yaml index 53ecbe1f..93cc8d1d 100644 --- a/puppet/ceph-storage-post-puppet.yaml +++ b/puppet/ceph-storage-post-puppet.yaml @@ -22,3 +22,12 @@ resources: properties: servers: {get_param: servers} config: {get_resource: CephStoragePuppetConfig} + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + depends_on: CephStorageDeployment_Step1 + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/puppet/ceph-storage-puppet.yaml b/puppet/ceph-storage-puppet.yaml index 660ea30a..bc9b4b5a 100644 --- a/puppet/ceph-storage-puppet.yaml +++ b/puppet/ceph-storage-puppet.yaml @@ -94,7 +94,7 @@ outputs: hosts_entry: value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [CephStorage, networks, ctlplane, 0]} HOST: {get_attr: [CephStorage, name]} diff --git a/puppet/cinder-storage-puppet.yaml b/puppet/cinder-storage-puppet.yaml index de96809a..708f6a9b 100644 --- a/puppet/cinder-storage-puppet.yaml +++ b/puppet/cinder-storage-puppet.yaml @@ -206,7 +206,7 @@ outputs: hosts_entry: value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [BlockStorage, networks, ctlplane, 0]} HOST: {get_attr: [BlockStorage, name]} diff --git a/puppet/compute-post-puppet.yaml b/puppet/compute-post-puppet.yaml index 9b7eb0cf..26c1a979 100644 --- a/puppet/compute-post-puppet.yaml +++ b/puppet/compute-post-puppet.yaml @@ -23,3 +23,12 @@ resources: properties: servers: {get_param: servers} config: {get_resource: ComputePuppetConfig} + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + depends_on: ComputePuppetDeployment + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index a31ea858..367bc405 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -446,7 +446,7 @@ outputs: Server's IP address and hostname in the /etc/hosts format value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [NovaCompute, networks, ctlplane, 0]} HOST: {get_attr: [NovaCompute, name]} diff --git a/puppet/controller-post-puppet.yaml b/puppet/controller-post-puppet.yaml index 009a10ae..debd7154 100644 --- a/puppet/controller-post-puppet.yaml +++ b/puppet/controller-post-puppet.yaml @@ -71,3 +71,12 @@ resources: config: {get_resource: ControllerPuppetConfig} input_values: step: 3 + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + depends_on: ControllerDeploymentOvercloudServices_Step4 + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 2cb6eadb..e9195912 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -871,7 +871,7 @@ outputs: Server's IP address and hostname in the /etc/hosts format value: str_replace: - template: IP HOST HOST.novalocal CLOUDNAME + template: IP HOST CLOUDNAME params: IP: {get_attr: [Controller, networks, ctlplane, 0]} HOST: {get_attr: [Controller, name]} diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index 14ba97e2..b7fb84ab 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -11,4 +11,4 @@ nova::network::neutron::neutron_admin_tenant_name: 'service' nova::network::neutron::neutron_admin_username: 'neutron' nova::network::neutron::vif_plugging_is_fatal: false nova::network::neutron::vif_plugging_timeout: 30 - +nova::network::neutron::dhcp_domain: '' diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index eca6a9da..6e8bf5a7 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -24,11 +24,17 @@ if !str2bool(hiera('enable_package_install', 'false')) { } } +$enable_pacemaker = str2bool(hiera('enable_pacemaker')) +$enable_keepalived = !$enable_pacemaker +if $::hostname == downcase(hiera('bootstrap_nodeid')) { + $pacemaker_master = true +} else { + $pacemaker_master = false +} + if hiera('step') >= 1 { $controller_node_ips = split(hiera('controller_node_ips'), ',') - $enable_pacemaker = str2bool(hiera('enable_pacemaker')) - $enable_keepalived = !$enable_pacemaker class { '::tripleo::loadbalancer' : controller_hosts => $controller_node_ips, @@ -37,11 +43,6 @@ if hiera('step') >= 1 { if $enable_pacemaker { $pacemaker_cluster_members = regsubst(hiera('controller_node_ips'), ',', ' ', 'G') - if $::hostname == downcase(hiera('bootstrap_nodeid')) { - $pacemaker_master = true - } else { - $pacemaker_master = false - } user { 'hacluster': ensure => present, } -> @@ -194,29 +195,46 @@ if hiera('step') >= 2 { } } - $rabbit_nodes = split(downcase(hiera('rabbit_node_names', $::hostname)), ',') - if count($rabbit_nodes) > 1 { - $rabbit_cluster = true - } - else { - $rabbit_cluster = false - } - class { 'rabbitmq': - config_cluster => $rabbit_cluster, - cluster_nodes => $rabbit_nodes, - node_ip_address => hiera('controller_host'), - } - if $rabbit_cluster { - rabbitmq_policy { 'ha-all@/': - pattern => '^(?!amq\.).*', - definition => { - 'ha-mode' => 'all', - 'ha-sync-mode' => 'automatic', + if $enable_pacemaker { + # the module ignores erlang_cookie if cluster_config is false + file { '/var/lib/rabbitmq/.erlang.cookie': + ensure => 'present', + owner => 'rabbitmq', + group => 'rabbitmq', + mode => '0400', + content => hiera('rabbitmq::erlang_cookie'), + replace => true, + } -> + class { '::rabbitmq': + service_manage => false, + environment_variables => { + 'RABBITMQ_NODENAME' => "rabbit@$::hostname", }, } - } - rabbitmq_vhost { '/': - provider => 'rabbitmqctl', + if $pacemaker_master { + pacemaker::resource::ocf { 'rabbitmq': + resource_name => 'heartbeat:rabbitmq-cluster', + options => 'set_policy=\'ha-all ^(?!amq\.).* {"ha-mode":"all"}\'', + clone => true, + require => Class['::rabbitmq'], + } + } + } else { + $rabbit_nodes = split(hiera('rabbit_node_ips'), ',') + if count($rabbit_nodes) > 1 { + class { '::rabbitmq': + config_cluster => true, + cluster_nodes => $rabbit_nodes, + } + rabbitmq_policy { 'ha-all@/': + pattern => '^(?!amq\.).*', + definition => { + 'ha-mode' => 'all', + }, + } + } else { + include ::rabbitmq + } } # pre-install swift here so we can build rings diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml index edceba97..3e01fe77 100644 --- a/puppet/swift-storage-post.yaml +++ b/puppet/swift-storage-post.yaml @@ -37,3 +37,12 @@ resources: properties: servers: {get_param: servers} config: {get_resource: StorageRingbuilderPuppetConfig} + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + depends_on: StorageRingbuilderDeployment_Step2 + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/puppet/swift-storage-puppet.yaml b/puppet/swift-storage-puppet.yaml index c3eb9536..45922436 100644 --- a/puppet/swift-storage-puppet.yaml +++ b/puppet/swift-storage-puppet.yaml @@ -136,7 +136,7 @@ outputs: hosts_entry: value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [SwiftStorage, networks, ctlplane, 0]} HOST: {get_attr: [SwiftStorage, name]} diff --git a/swift-storage-post.yaml b/swift-storage-post.yaml index dfac4b2a..dd51af0e 100644 --- a/swift-storage-post.yaml +++ b/swift-storage-post.yaml @@ -6,3 +6,13 @@ description: 'Swift Storage Post Deployment' parameters: servers: type: json + +resources: + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/swift-storage.yaml b/swift-storage.yaml index 7160c14d..42c591d2 100644 --- a/swift-storage.yaml +++ b/swift-storage.yaml @@ -145,7 +145,7 @@ outputs: hosts_entry: value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [SwiftStorage, networks, ctlplane, 0]} HOST: {get_attr: [SwiftStorage, name]} |