Browse Source

Merge "Reinstate common overcloud manifest for all roles"

changes/66/534066/1
Zuul 4 years ago
committed by Gerrit Code Review
parent
commit
33a254cacb
  1. 22
      common/services.yaml
  2. 1
      overcloud-resource-registry-puppet.j2.yaml
  3. 59
      puppet/config.role.j2.yaml
  4. 5
      puppet/manifests/overcloud_common.pp

22
common/services.yaml

@ -67,14 +67,20 @@ resources:
properties:
type: string
value:
yaql:
expression:
# select 'step_config' only from services that do not have a docker_config
coalesce($.data.service_names, []).zip(coalesce($.data.step_config, []), coalesce($.data.docker_config, [])).where($[2] = null).where($[1] != null).select($[1]).join("\n")
data:
service_names: {get_attr: [ServiceChain, role_data, service_name]}
step_config: {get_attr: [ServiceChain, role_data, step_config]}
docker_config: {get_attr: [ServiceChain, role_data, docker_config]}
list_join:
- "\n"
- - str_replace:
template: {get_file: ../puppet/manifests/overcloud_common.pp}
params:
__ROLE__: {get_param: RoleName}
- yaql:
expression:
# select 'step_config' only from services that do not have a docker_config
coalesce($.data.service_names, []).zip(coalesce($.data.step_config, []), coalesce($.data.docker_config, [])).where($[2] = null).where($[1] != null).select($[1]).join("\n")
data:
service_names: {get_attr: [ServiceChain, role_data, service_name]}
step_config: {get_attr: [ServiceChain, role_data, step_config]}
docker_config: {get_attr: [ServiceChain, role_data, docker_config]}
DockerConfig:
type: OS::Heat::Value

1
overcloud-resource-registry-puppet.j2.yaml

@ -19,7 +19,6 @@ resource_registry:
OS::TripleO::{{role.name}}::PreNetworkConfig: OS::Heat::None
OS::TripleO::{{role.name}}PostDeploySteps: common/post.yaml
OS::TripleO::{{role.name}}: puppet/{{role.name.lower()}}-role.yaml
OS::TripleO::{{role.name}}Config: puppet/{{role.name.lower()}}-config.yaml
OS::TripleO::Tasks::{{role.name}}PreConfig: OS::Heat::None
OS::TripleO::Tasks::{{role.name}}PostConfig: OS::Heat::None
OS::TripleO::{{role.name}}ExtraConfigPre: puppet/extraconfig/pre_deploy/default.yaml

59
puppet/config.role.j2.yaml

@ -1,59 +0,0 @@
heat_template_version: queens
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: ''
PuppetTags:
type: string
description: List of comma-separated tags to limit puppet catalog to.
default: ''
conditions:
puppet_tags_empty: {equals : [{get_param: PuppetTags}, '']}
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
tags:
if:
- puppet_tags_empty
- ''
- list_join:
- ','
- ['file,concat,file_line,augeas', {get_param: PuppetTags}]
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}

5
puppet/manifests/overcloud_role.pp → puppet/manifests/overcloud_common.pp

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
# Common config, from tripleo-heat-templates/puppet/manifests/overcloud_common.pp
# The content of this file will be used to generate
# the puppet manifests for all roles, the placeholder
# __ROLE__ will be replaced by 'controller', 'blockstorage',
@ -25,6 +26,4 @@ if hiera('step') >= 4 {
$package_manifest_name = join(['/var/lib/tripleo/installed-packages/overcloud___ROLE__', hiera('step')])
package_manifest{$package_manifest_name: ensure => present}
# NOTE(gfidente): ensure deprecated package manifest is absent, can be removed after Pike
$absent_package_manifest_name = join(['/var/lib/tripleo/installed-packages/overcloud_controller_pacemaker', hiera('step')])
package_manifest{$absent_package_manifest_name: ensure => absent}
# End of overcloud_common.pp
Loading…
Cancel
Save