diff options
author | Dan Prince <dprince@redhat.com> | 2015-02-12 15:49:00 -0500 |
---|---|---|
committer | Dan Prince <dprince@redhat.com> | 2015-02-12 22:19:22 -0500 |
commit | d25bd1f12e6b6b74aac4fdc593492ec42518bf8d (patch) | |
tree | ea63f73a9ee3bc1187828ad80659265b5ef354d6 /puppet | |
parent | 6b5ac01d2e61af9efddd01b58bfc0f6cd1e8518f (diff) |
Controller: Exec puppet after all configuration
This patch adds a new ControllerNodesPostDeployment resource
which can be used along with the environment file to
specify a nested stack which is guaranteed to execute
after all the Controller config (HA, or other) have
executed.
This is really useful for Puppet in that Heat actually
controls where puppet executes in the deployment
process and we want to ensure puppet runs after
all hiera configuration data has be deployed to
the nodes. With the previous approach some of the
data would be there, but most of the HA data which
actually gets composed outside of the controller-puppet.yaml
nested stack would not be guaranteed to be there in time.
As os-apply-config (tripleo-image-elements) have their
ordering controlled within the elements themselves an empty stubbed
in nested stack has been added so that we don't break that
implementation.
Partial-bug: 1418805
Change-Id: Icd6b2c9c1f9b057c28649ee3bdce0039f3fd8422
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/controller-post-puppet.yaml | 124 | ||||
-rw-r--r-- | puppet/controller-puppet.yaml | 114 |
2 files changed, 124 insertions, 114 deletions
diff --git a/puppet/controller-post-puppet.yaml b/puppet/controller-post-puppet.yaml new file mode 100644 index 00000000..72b35793 --- /dev/null +++ b/puppet/controller-post-puppet.yaml @@ -0,0 +1,124 @@ +heat_template_version: 2014-10-16 + +description: > + OpenStack controller node post deployment for Puppet. + +parameters: + servers: + type: json + +resources: + + # NOTE(dprince): this example uses a composition class + # on the puppet side (loadbalancer.pp). This seemed like the + # cleanest way to encapulate the puppet resources definitions + # for HAProxy and Keepalived. + ControllerLoadbalancerPuppetConfig: + type: OS::Heat::SoftwareConfig + properties: + group: puppet + options: + enable_hiera: True + enable_facter: False + inputs: + - name: tripleo::loadbalancer::keystone_admin + default: true + - name: tripleo::loadbalancer::keystone_public + default: true + - name: tripleo::loadbalancer::neutron + default: true + - name: tripleo::loadbalancer::cinder + default: true + - name: tripleo::loadbalancer::glance_api + default: true + - name: tripleo::loadbalancer::glance_registry + default: true + - name: tripleo::loadbalancer::nova_ec2 + default: true + - name: tripleo::loadbalancer::nova_osapi + default: true + - name: tripleo::loadbalancer::nova_metadata + default: true + - name: tripleo::loadbalancer::nova_novncproxy + default: true + - name: tripleo::loadbalancer::mysql + default: true + - name: tripleo::loadbalancer::rabbitmq + default: true + - name: tripleo::loadbalancer::swift_proxy_server + default: true + - name: tripleo::loadbalancer::ceilometer + default: true + - name: tripleo::loadbalancer::heat_api + default: true + - name: tripleo::loadbalancer::heat_cloudwatch + default: true + - name: tripleo::loadbalancer::heat_cfn + default: true + outputs: + - name: result + config: + get_file: manifests/loadbalancer.pp + + ControllerLoadbalancerPuppetDeployment: + type: OS::Heat::SoftwareDeployments + properties: + name: puppet_1 + servers: {get_param: servers} + config: {get_resource: ControllerLoadbalancerPuppetConfig} + + ControllerPuppetConfig: + type: OS::Heat::SoftwareConfig + properties: + group: puppet + options: + enable_hiera: True + enable_facter: False + inputs: + - name: step + outputs: + - name: result + config: + get_file: manifests/overcloud_controller.pp + + # Step through a series of Puppet runs using the same manifest. + # NOTE(dprince): Heat breakpoints would make for a really cool way to step + # through breakpoints in a controlled manner across the entire cluster + ControllerPuppetDeploymentServicesBase: + type: OS::Heat::StructuredDeployments + properties: + name: puppet_2 + servers: {get_param: servers} + config: {get_resource: ControllerPuppetConfig} + input_values: + step: 1 + actions: ['CREATE'] # no need for two passes on an UPDATE + + ControllerRingbuilderPuppetConfig: + type: OS::Heat::SoftwareConfig + properties: + group: puppet + options: + enable_hiera: True + enable_facter: False + inputs: + outputs: + - name: result + config: + get_file: manifests/ringbuilder.pp + + ControllerRingbuilderPuppetDeployment: + type: OS::Heat::StructuredDeployments + properties: + name: puppet_3 + servers: {get_param: servers} + config: {get_resource: ControllerRingbuilderPuppetConfig} + + ControllerPuppetDeploymentOvercloudServices: + type: OS::Heat::StructuredDeployments + properties: + name: puppet_4 + servers: {get_param: servers} + config: {get_resource: ControllerPuppetConfig} + input_values: + step: 2 diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 399ad86b..537b1cf9 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -710,120 +710,6 @@ resources: public_virtual_ip: {get_input: public_virtual_ip} enable_package_install: {get_input: enable_package_install} - # NOTE(dprince): this example uses a composition class - # on the puppet side (loadbalancer.pp). This seemed like the - # cleanest way to encapulate the puppet resources definitions - # for HAProxy and Keepalived. - ControllerLoadbalancerPuppetConfig: - type: OS::Heat::SoftwareConfig - properties: - group: puppet - options: - enable_hiera: True - enable_facter: False - inputs: - - name: tripleo::loadbalancer::keystone_admin - default: true - - name: tripleo::loadbalancer::keystone_public - default: true - - name: tripleo::loadbalancer::neutron - default: true - - name: tripleo::loadbalancer::cinder - default: true - - name: tripleo::loadbalancer::glance_api - default: true - - name: tripleo::loadbalancer::glance_registry - default: true - - name: tripleo::loadbalancer::nova_ec2 - default: true - - name: tripleo::loadbalancer::nova_osapi - default: true - - name: tripleo::loadbalancer::nova_metadata - default: true - - name: tripleo::loadbalancer::nova_novncproxy - default: true - - name: tripleo::loadbalancer::mysql - default: true - - name: tripleo::loadbalancer::rabbitmq - default: true - - name: tripleo::loadbalancer::swift_proxy_server - default: true - - name: tripleo::loadbalancer::ceilometer - default: true - - name: tripleo::loadbalancer::heat_api - default: true - - name: tripleo::loadbalancer::heat_cloudwatch - default: true - - name: tripleo::loadbalancer::heat_cfn - default: true - outputs: - - name: result - config: - get_file: manifests/loadbalancer.pp - - ControllerLoadbalancerPuppetDeployment: - type: OS::Heat::SoftwareDeployment - properties: - name: puppet_1 - server: {get_resource: Controller} - config: {get_resource: ControllerLoadbalancerPuppetConfig} - - ControllerPuppetConfig: - type: OS::Heat::SoftwareConfig - properties: - group: puppet - options: - enable_hiera: True - enable_facter: False - inputs: - - name: step - outputs: - - name: result - config: - get_file: manifests/overcloud_controller.pp - - # Step through a series of Puppet runs using the same manifest. - # NOTE(dprince): Heat breakpoints would make for a really cool way to step - # through breakpoints in a controlled manner across the entire cluster - ControllerPuppetDeploymentServicesBase: - type: OS::Heat::StructuredDeployment - properties: - name: puppet_2 - server: {get_resource: Controller} - config: {get_resource: ControllerPuppetConfig} - input_values: - step: 1 - actions: ['CREATE'] # no need for two passes on an UPDATE - - ControllerRingbuilderPuppetConfig: - type: OS::Heat::SoftwareConfig - properties: - group: puppet - options: - enable_hiera: True - enable_facter: False - inputs: - outputs: - - name: result - config: - get_file: manifests/ringbuilder.pp - - ControllerRingbuilderPuppetDeployment: - type: OS::Heat::StructuredDeployment - properties: - name: puppet_3 - server: {get_resource: Controller} - config: {get_resource: ControllerRingbuilderPuppetConfig} - - ControllerPuppetDeploymentOvercloudServices: - type: OS::Heat::StructuredDeployment - properties: - name: puppet_4 - server: {get_resource: Controller} - config: {get_resource: ControllerPuppetConfig} - input_values: - step: 2 - outputs: ip_address: description: IP address of the server in the ctlplane network |