Reinstate common overcloud manifest for all roles
This was lost in the translation to ansible, but it's needed to enable existing interfaces such as hiera includes via *ExtraConfig. For reference this problem was introduced in: I674a4d9d2c77d1f6fbdb0996f6c9321848e32662 and this fix only considers returning the behaviour prior to that patch (for the baremetal puppet apply), further discussion is required on if/how this could be applied to the new container architecture. Change-Id: I0384edb23eed336b95ffe6293fe7d4248447e849 Partial-Bug: #1742663
This commit is contained in:
parent
db0f626bed
commit
bb9fd2c61a
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}
|
@ -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…
Reference in New Issue
Block a user