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
(cherry picked from commit 94fddffa6d)
This commit is contained in:
Steven Hardy 2016-09-28 17:03:42 +01:00
parent 3a5da91a3a
commit 3a3f27ae34
5 changed files with 7 additions and 183 deletions

View File

@ -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}

View File

@ -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}

View File

@ -1,7 +1,7 @@
heat_template_version: 2015-04-30 heat_template_version: 2015-04-30
description: > description: >
A software config which applies puppet on the compute role A software config which runs puppet on the {{role}} role
parameters: parameters:
ConfigDebug: ConfigDebug:
@ -15,7 +15,7 @@ parameters:
resources: resources:
ComputePuppetConfigImpl: {{role}}PuppetConfigImpl:
type: OS::Heat::SoftwareConfig type: OS::Heat::SoftwareConfig
properties: properties:
group: puppet group: puppet
@ -24,21 +24,21 @@ resources:
enable_hiera: True enable_hiera: True
enable_facter: False enable_facter: False
modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules
outputs:
- name: result
inputs: inputs:
- name: step - name: step
type: Number type: Number
outputs:
- name: result
config: config:
list_join: list_join:
- '' - ''
- - str_replace: - - str_replace:
template: {get_file: manifests/overcloud_role.pp} template: {get_file: manifests/overcloud_role.pp}
params: params:
__ROLE__: compute __ROLE__: {{role.lower()}}
- {get_param: StepConfig} - {get_param: StepConfig}
outputs: outputs:
OS::stack_id: OS::stack_id:
description: The software config which applies puppet on the compute role description: The software config which runs puppet on the {{role}} role
value: {get_resource: ComputePuppetConfigImpl} value: {get_resource: {{role}}PuppetConfigImpl}

View File

@ -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}

View File

@ -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}