Dump and run puppet for role which are disable_upgrade_deployment true
We wants to run puppet on each role which has the flag disable_upgrade_deployment to true. It will run after the upgrade of the role and before running the whole converge step. Change-Id: Ia85be688d070dfb5b8337e8ef3c4bc439fb6052e
This commit is contained in:
parent
ed220aecf5
commit
f55d670761
@ -44,6 +44,9 @@ if [[ -n \$NOVA_COMPUTE ]]; then
|
|||||||
systemctl restart openstack-ceilometer-compute
|
systemctl restart openstack-ceilometer-compute
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Apply puppet manifest to converge just right after the \$ROLE upgrade
|
||||||
|
puppet apply /root/${ROLE}_puppet_config.pp
|
||||||
|
|
||||||
ENDOFCAT
|
ENDOFCAT
|
||||||
|
|
||||||
# ensure the permissions are OK
|
# ensure the permissions are OK
|
||||||
|
@ -72,10 +72,12 @@ resources:
|
|||||||
crudini --set /etc/nova/nova.conf placement password 'SERVICE_PASSWORD'
|
crudini --set /etc/nova/nova.conf placement password 'SERVICE_PASSWORD'
|
||||||
crudini --set /etc/nova/nova.conf placement region_name 'REGION_NAME'
|
crudini --set /etc/nova/nova.conf placement region_name 'REGION_NAME'
|
||||||
crudini --set /etc/nova/nova.conf placement auth_url 'AUTH_URL'
|
crudini --set /etc/nova/nova.conf placement auth_url 'AUTH_URL'
|
||||||
|
ROLE='ROLE_NAME'
|
||||||
params:
|
params:
|
||||||
SERVICE_PASSWORD: { get_param: NovaPassword }
|
SERVICE_PASSWORD: { get_param: NovaPassword }
|
||||||
REGION_NAME: { get_param: KeystoneRegion }
|
REGION_NAME: { get_param: KeystoneRegion }
|
||||||
AUTH_URL: { get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
|
AUTH_URL: { get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
|
||||||
|
ROLE_NAME: {{role.name}}
|
||||||
- get_file: ../extraconfig/tasks/pacemaker_common_functions.sh
|
- get_file: ../extraconfig/tasks/pacemaker_common_functions.sh
|
||||||
- get_file: ../extraconfig/tasks/tripleo_upgrade_node.sh
|
- get_file: ../extraconfig/tasks/tripleo_upgrade_node.sh
|
||||||
|
|
||||||
@ -145,6 +147,32 @@ resources:
|
|||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
|
# Dump the puppet manifests to be apply later when disable_upgrade_deployment
|
||||||
|
# is to true
|
||||||
|
{% for role in roles if role.disable_upgrade_deployment|default(false) %}
|
||||||
|
{{role.name}}DeliverPuppetConfig:
|
||||||
|
type: OS::Heat::SoftwareConfig
|
||||||
|
properties:
|
||||||
|
group: script
|
||||||
|
config:
|
||||||
|
list_join:
|
||||||
|
- ''
|
||||||
|
- - str_replace:
|
||||||
|
template: |
|
||||||
|
#!/bin/bash
|
||||||
|
cat > /root/{{role.name}}_puppet_config.pp << ENDOFCAT
|
||||||
|
PUPPET_CLASSES
|
||||||
|
ENDOFCAT
|
||||||
|
params:
|
||||||
|
PUPPET_CLASSES: {get_param: [role_data, {{role.name}}, step_config]}
|
||||||
|
|
||||||
|
{{role.name}}DeliverPuppetDeployment:
|
||||||
|
type: OS::Heat::SoftwareDeploymentGroup
|
||||||
|
properties:
|
||||||
|
servers: {get_param: [servers, {{role.name}}]}
|
||||||
|
config: {get_resource: {{role.name}}DeliverPuppetConfig}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
# Upgrade Steps for all roles
|
# Upgrade Steps for all roles
|
||||||
{%- for step in range(0, upgrade_steps_max) %}
|
{%- for step in range(0, upgrade_steps_max) %}
|
||||||
# Config resources for step {{step}}
|
# Config resources for step {{step}}
|
||||||
|
Loading…
Reference in New Issue
Block a user