From 94fddffa6d3e98df227803cca0879855fe47e6d8 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Wed, 28 Sep 2016 17:03:42 +0100 Subject: j2 template role config templates This means the user won't have to manually specify e.g the OS::TripleO::ACustomRoleConfig resource manually. Partial-Bug: 1626976 Change-Id: I063571d4c5cbc2f295a7a044d81c27d703bd0e10 Depends-On: I9f920e191344040a564214f3f9a1147b265e9ff3 --- puppet/blockstorage-config.yaml | 44 ---------------------------------------- puppet/cephstorage-config.yaml | 44 ---------------------------------------- puppet/compute-config.yaml | 44 ---------------------------------------- puppet/config.role.j2.yaml | 44 ++++++++++++++++++++++++++++++++++++++++ puppet/controller-config.yaml | 44 ---------------------------------------- puppet/objectstorage-config.yaml | 44 ---------------------------------------- 6 files changed, 44 insertions(+), 220 deletions(-) delete mode 100644 puppet/blockstorage-config.yaml delete mode 100644 puppet/cephstorage-config.yaml delete mode 100644 puppet/compute-config.yaml create mode 100644 puppet/config.role.j2.yaml delete mode 100644 puppet/controller-config.yaml delete mode 100644 puppet/objectstorage-config.yaml diff --git a/puppet/blockstorage-config.yaml b/puppet/blockstorage-config.yaml deleted file mode 100644 index 0a052315..00000000 --- a/puppet/blockstorage-config.yaml +++ /dev/null @@ -1,44 +0,0 @@ -heat_template_version: 2015-04-30 - -description: > - A software config which applies puppet on the blockstorage role - -parameters: - ConfigDebug: - default: false - description: Whether to run config management (e.g. Puppet) in debug mode. - type: boolean - StepConfig: - type: string - description: Config manifests that will be used to step through the deployment. - default: '' - -resources: - - BlockStoragePuppetConfigImpl: - type: OS::Heat::SoftwareConfig - properties: - group: puppet - options: - enable_debug: {get_param: ConfigDebug} - enable_hiera: True - enable_facter: False - modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules - inputs: - - name: step - type: Number - outputs: - - name: result - config: - list_join: - - '' - - - str_replace: - template: {get_file: manifests/overcloud_role.pp} - params: - __ROLE__: blockstorage - - {get_param: StepConfig} - -outputs: - OS::stack_id: - description: The software config which applies puppet on the blockstorage role - value: {get_resource: BlockStoragePuppetConfigImpl} diff --git a/puppet/cephstorage-config.yaml b/puppet/cephstorage-config.yaml deleted file mode 100644 index 09757ea7..00000000 --- a/puppet/cephstorage-config.yaml +++ /dev/null @@ -1,44 +0,0 @@ -heat_template_version: 2015-04-30 - -description: > - A software config which runs applies puppet on the cephstorage role - -parameters: - ConfigDebug: - default: false - description: Whether to run config management (e.g. Puppet) in debug mode. - type: boolean - StepConfig: - type: string - description: Config manifests that will be used to step through the deployment. - default: '' - -resources: - - CephStoragePuppetConfigImpl: - type: OS::Heat::SoftwareConfig - properties: - group: puppet - options: - enable_debug: {get_param: ConfigDebug} - enable_hiera: True - enable_facter: False - modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules - inputs: - - name: step - type: Number - outputs: - - name: result - config: - list_join: - - '' - - - str_replace: - template: {get_file: manifests/overcloud_role.pp} - params: - __ROLE__: cephstorage - - {get_param: StepConfig} - -outputs: - OS::stack_id: - description: The software config which applies puppet on the cephstorage role - value: {get_resource: CephStoragePuppetConfigImpl} diff --git a/puppet/compute-config.yaml b/puppet/compute-config.yaml deleted file mode 100644 index acc9e61d..00000000 --- a/puppet/compute-config.yaml +++ /dev/null @@ -1,44 +0,0 @@ -heat_template_version: 2015-04-30 - -description: > - A software config which applies puppet on the compute role - -parameters: - ConfigDebug: - default: false - description: Whether to run config management (e.g. Puppet) in debug mode. - type: boolean - StepConfig: - type: string - description: Config manifests that will be used to step through the deployment. - default: '' - -resources: - - ComputePuppetConfigImpl: - type: OS::Heat::SoftwareConfig - properties: - group: puppet - options: - enable_debug: {get_param: ConfigDebug} - enable_hiera: True - enable_facter: False - modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules - inputs: - - name: step - type: Number - outputs: - - name: result - config: - list_join: - - '' - - - str_replace: - template: {get_file: manifests/overcloud_role.pp} - params: - __ROLE__: compute - - {get_param: StepConfig} - -outputs: - OS::stack_id: - description: The software config which applies puppet on the compute role - value: {get_resource: ComputePuppetConfigImpl} diff --git a/puppet/config.role.j2.yaml b/puppet/config.role.j2.yaml new file mode 100644 index 00000000..e59a0216 --- /dev/null +++ b/puppet/config.role.j2.yaml @@ -0,0 +1,44 @@ +heat_template_version: 2015-04-30 + +description: > + A software config which runs puppet on the {{role}} role + +parameters: + ConfigDebug: + default: false + description: Whether to run config management (e.g. Puppet) in debug mode. + type: boolean + StepConfig: + type: string + description: Config manifests that will be used to step through the deployment. + default: '' + +resources: + + {{role}}PuppetConfigImpl: + type: OS::Heat::SoftwareConfig + properties: + group: puppet + options: + enable_debug: {get_param: ConfigDebug} + enable_hiera: True + enable_facter: False + modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules + outputs: + - name: result + inputs: + - name: step + type: Number + config: + list_join: + - '' + - - str_replace: + template: {get_file: manifests/overcloud_role.pp} + params: + __ROLE__: {{role.lower()}} + - {get_param: StepConfig} + +outputs: + OS::stack_id: + description: The software config which runs puppet on the {{role}} role + value: {get_resource: {{role}}PuppetConfigImpl} diff --git a/puppet/controller-config.yaml b/puppet/controller-config.yaml deleted file mode 100644 index 39963479..00000000 --- a/puppet/controller-config.yaml +++ /dev/null @@ -1,44 +0,0 @@ -heat_template_version: 2015-04-30 - -description: > - A software config which runs puppet on the controller role - -parameters: - ConfigDebug: - default: false - description: Whether to run config management (e.g. Puppet) in debug mode. - type: boolean - StepConfig: - type: string - description: Config manifests that will be used to step through the deployment. - default: '' - -resources: - - ControllerPuppetConfigImpl: - type: OS::Heat::SoftwareConfig - properties: - group: puppet - options: - enable_debug: {get_param: ConfigDebug} - enable_hiera: True - enable_facter: False - modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules - outputs: - - name: result - inputs: - - name: step - type: Number - config: - list_join: - - '' - - - str_replace: - template: {get_file: manifests/overcloud_role.pp} - params: - __ROLE__: controller - - {get_param: StepConfig} - -outputs: - OS::stack_id: - description: The software config which runs puppet on the controller role - value: {get_resource: ControllerPuppetConfigImpl} diff --git a/puppet/objectstorage-config.yaml b/puppet/objectstorage-config.yaml deleted file mode 100644 index 76bffdd1..00000000 --- a/puppet/objectstorage-config.yaml +++ /dev/null @@ -1,44 +0,0 @@ -heat_template_version: 2015-04-30 - -description: > - A software config which applies puppet on the objectstorage role - -parameters: - ConfigDebug: - default: false - description: Whether to run config management (e.g. Puppet) in debug mode. - type: boolean - StepConfig: - type: string - description: Config manifests that will be used to step through the deployment. - default: '' - -resources: - - ObjectStoragePuppetConfigImpl: - type: OS::Heat::SoftwareConfig - properties: - group: puppet - options: - enable_debug: {get_param: ConfigDebug} - enable_hiera: True - enable_facter: False - modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules - inputs: - - name: step - type: Number - outputs: - - name: result - config: - list_join: - - '' - - - str_replace: - template: {get_file: manifests/overcloud_role.pp} - params: - __ROLE__: objectstorage - - {get_param: StepConfig} - -outputs: - OS::stack_id: - description: The software config which applies puppet on the objectstorage role - value: {get_resource: ObjectStoragePuppetConfigImpl} -- cgit 1.2.3-korg