2017-03-01 13:57:13 +00:00
# certain initialization steps (run in a container) will occur
2017-03-29 14:43:45 -06:00
# on the role marked as primary controller or the first role listed
2017-11-20 14:48:03 +00:00
{%- if enabled_roles is not defined or enabled_roles == [] -%}
2017-09-11 14:39:06 +01:00
# On upgrade certain roles can be disabled for operator driven upgrades
# See major_upgrade_steps.j2.yaml and post-upgrade.j2.yaml
{%- set enabled_roles = roles -%}
{%- endif -%}
{%- set primary_role = [enabled_roles[0]] -%}
{%- for role in enabled_roles -%}
2017-03-29 14:43:45 -06:00
{%- if 'primary' in role.tags and 'controller' in role.tags -%}
{%- set _ = primary_role.pop() -%}
{%- set _ = primary_role.append(role) -%}
{%- endif -%}
{%- endfor -%}
{%- set primary_role_name = primary_role[0].name -%}
# primary role is: {{primary_role_name}}
2017-04-11 11:44:46 +01:00
{% set deploy_steps_max = 6 -%}
2017-07-21 11:43:25 +01:00
{% set update_steps_max = 6 -%}
2018-10-04 11:50:11 +02:00
{% set external_update_steps_max = 2 -%}
2018-03-12 17:02:36 +01:00
{% set pre_upgrade_rolling_steps_max = 1 -%}
2017-08-04 14:55:48 +03:00
{% set upgrade_steps_max = 6 -%}
2019-08-26 10:20:04 +02:00
{% set external_upgrade_steps_max = 3 -%}
2018-01-17 12:28:55 +05:30
{% set post_upgrade_steps_max = 4 -%}
ffu: Add fast-forward upgrade outputs to RoleConfig
As outlined in the spec, fast-forward upgrades aim to take an
environment from an initial release of N to a release of N>=2, beyond
that of the traditionally supported N+1 upgrade path provided today by
many OpenStack projects.
For TripleO the first phase of this upgrade will be to move the
environment to the release prior to the target release. This will be
achieved by disabling all OpenStack control plane services and then
preforming the minimum number of steps required to upgrade each service
through each release until finally reaching the target release.
This change introduces the framework for this phase of the fast-forward
upgrades by adding playbooks and task files as outputs to RoleConfig.
- fast_forward_upgrade_playbook.yaml
This is the top level play and acts as the outer loop of the process,
iterating through the required releases as set by the
FastForwardUpgradeReleases parameter for the fast-forward section of the
upgrade. This currently defaults to Ocata and Pike for Queens.
Note that this play is run against the overcloud host group and it is
currently assumed that the inventory used to run this play is provided
by the tripleo-ansible-inventory command.
- fast_forward_upgrade_release_tasks.yaml
This output simply imports the top level prep and bootstrap task files.
- fast_forward_upgrade_prep_tasks.yaml
- fast_forward_upgrade_bootstrap_tasks.yaml
These outputs act as the inner loop for the fast-forward upgrade phase,
iterating over step values while importing their associated role tasks.
As prep tasks are carried out first for each release we loop over step
values starting at 0 and ending at the defined
fast_forward_upgrade_prep_steps_max, currently 3.
Following this we then complete the bootstrap tasks for each release,
looping over steps values starting at
fast_forward_upgrade_prep_steps_max + 1 , currently 4 and ending at
fast_forward_upgrade_steps_max,currently 9.
- fast_forward_upgrade_prep_role_tasks.yaml
- fast_forward_upgrade_bootstrap_role_tasks.yaml
These outputs then finally import the fast_forward_upgrade_tasks files
generated by the FastForwardUpgradeTasks YAQL query for each role. For
prep tasks these are always included when on an Ansible host of a given
role. This differs from bootstrap tasks that are only included for the
first host associated with a given role.
This will result in the following order of task imports with their
associated value of release and step:
fast_forward_upgrade_playbook
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=ocata
\_fast_forward_upgrade_prep_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=3
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=ocata
\_fast_forward_upgrade_bootstrap_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=N
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=N
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=pike
\_fast_forward_upgrade_prep_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=3
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=pike
\_fast_forward_upgrade_bootstrap_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=N
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=N
bp fast-forward-upgrades
Change-Id: Ie2683fd7b81167abe724a7b9245bf85a0a87ad1d
2017-08-25 14:25:08 +01:00
{% set fast_forward_upgrade_steps_max = 9 -%}
{% set fast_forward_upgrade_prep_steps_max = 3 -%}
2018-01-23 22:43:49 +05:30
{% set post_update_steps_max = 4 -%}
2019-04-10 07:49:20 -04:00
{% set scale_steps_max = 1 -%}
2017-04-11 11:44:46 +01:00
2018-03-05 19:28:35 +01:00
heat_template_version: rocky
2017-03-01 13:57:13 +00:00
description: >
Post-deploy configuration steps via puppet for all roles,
as defined in ../roles_data.yaml
parameters:
servers:
type: json
description: Mapping of Role name e.g Controller to a list of servers
role_data:
type: json
description: Mapping of Role name e.g Controller to the per-role data
DeployIdentifier:
default: ''
type: string
description: >
Setting this to a unique value will re-run any deployment tasks which
perform configuration on a Heat stack-update.
2018-05-07 15:54:11 -06:00
deployment_source_hosts:
2018-08-01 16:35:21 -04:00
default: 'Undercloud'
2018-05-07 15:54:11 -06:00
type: string
description: Host or hostgroup that runs the deployment
deployment_target_hosts:
2020-04-27 16:51:56 +01:00
default: ''
2018-05-07 15:54:11 -06:00
type: string
2020-04-27 16:51:56 +01:00
description: >
Host or hostgroup that consists of the target systems for the deployment.
Defaults to all hosts in the current Heat stack if not set.
2017-03-01 13:57:13 +00:00
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
Fix ConfigDebug for puppet host runs
Before pike we used to be able to add -e environments/config-debug.yaml
and that would give us debug logs for puppet. With the move to ansible
running puppet we lost this feature.
Let's make sure that the old ConfigDebug variable still works with
the ansible playbook-based deploy steps. With this patch and ConfigDebug
set to true, we correctly get the puppet debug logs:
TASK [debug] *******************************************************************
ok: [localhost] => {
"(outputs.stderr|default('')).split('\n')|union(outputs.stdout_lines|default([]))": [
"Warning: Undefined variable 'deploy_config_name'; ",
" (file & line not available)",
"Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README. at [\"/etc/puppet/modules/ntp/manifests/init.pp\", 54]:[\"/etc/puppet/modules/tripleo/manifests/profile/base/time/ntp.pp\", 29]",
" (at /etc/puppet/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')",
"Debug: Runtime environment: puppet_version=4.8.2, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8",
"Debug: Loading external facts from /etc/puppet/modules/openstacklib/facts.d",
"Debug: Loading external facts from /var/lib/puppet/facts.d",
....
Change-Id: Ia726fb8ca4a6f7bbbd7a1284d76ff42df6825d01
Closes-Bug: #1722752
2017-10-11 12:47:01 +02:00
ConfigDebug:
default: false
description: Whether to run config management (e.g. Puppet) in debug mode.
type: boolean
2020-04-20 14:02:21 +02:00
HideSensitiveLogs:
default: true
type: boolean
description: >
Set it to false if you don't want to activate the no_log feature within
ansible modules.
2018-03-06 13:43:07 -05:00
EnablePuppet:
default: true
description: Whether to run the puppet (baremetal) deployment tasks.
type: boolean
2019-10-10 12:01:23 -04:00
EnablePaunch:
2019-12-28 18:13:18 -05:00
default: false
2020-05-28 11:18:54 -04:00
description: >
(DEPRECATED) Whether to run paunch during container deployment tasks.
2019-10-10 12:01:23 -04:00
type: boolean
2017-06-26 09:53:31 -04:00
DockerPuppetDebug:
2018-10-25 12:15:12 +02:00
type: boolean
default: false
2020-02-28 13:59:47 -05:00
description: Set to True to enable debug logging with Puppet Containers
2017-08-25 23:01:24 -04:00
DockerPuppetProcessCount:
type: number
2018-07-05 14:01:10 +03:00
default: 6
2019-03-01 14:58:57 -05:00
description: Number of concurrent processes to use when running container-puppet to generate config files.
2018-08-03 16:51:23 -04:00
ContainerCli:
type: string
2019-03-04 19:17:04 -05:00
default: 'podman'
2018-08-03 16:51:23 -04:00
description: CLI tool used to manage containers.
constraints:
- allowed_values: ['docker', 'podman']
2018-03-08 09:13:42 -05:00
DockerPuppetMountHostPuppet:
type: boolean
default: true
description: Whether containerized puppet executions use modules from the baremetal host. Defaults to true. Can be set to false to consume puppet modules from containers directly.
ffu: Add fast-forward upgrade outputs to RoleConfig
As outlined in the spec, fast-forward upgrades aim to take an
environment from an initial release of N to a release of N>=2, beyond
that of the traditionally supported N+1 upgrade path provided today by
many OpenStack projects.
For TripleO the first phase of this upgrade will be to move the
environment to the release prior to the target release. This will be
achieved by disabling all OpenStack control plane services and then
preforming the minimum number of steps required to upgrade each service
through each release until finally reaching the target release.
This change introduces the framework for this phase of the fast-forward
upgrades by adding playbooks and task files as outputs to RoleConfig.
- fast_forward_upgrade_playbook.yaml
This is the top level play and acts as the outer loop of the process,
iterating through the required releases as set by the
FastForwardUpgradeReleases parameter for the fast-forward section of the
upgrade. This currently defaults to Ocata and Pike for Queens.
Note that this play is run against the overcloud host group and it is
currently assumed that the inventory used to run this play is provided
by the tripleo-ansible-inventory command.
- fast_forward_upgrade_release_tasks.yaml
This output simply imports the top level prep and bootstrap task files.
- fast_forward_upgrade_prep_tasks.yaml
- fast_forward_upgrade_bootstrap_tasks.yaml
These outputs act as the inner loop for the fast-forward upgrade phase,
iterating over step values while importing their associated role tasks.
As prep tasks are carried out first for each release we loop over step
values starting at 0 and ending at the defined
fast_forward_upgrade_prep_steps_max, currently 3.
Following this we then complete the bootstrap tasks for each release,
looping over steps values starting at
fast_forward_upgrade_prep_steps_max + 1 , currently 4 and ending at
fast_forward_upgrade_steps_max,currently 9.
- fast_forward_upgrade_prep_role_tasks.yaml
- fast_forward_upgrade_bootstrap_role_tasks.yaml
These outputs then finally import the fast_forward_upgrade_tasks files
generated by the FastForwardUpgradeTasks YAQL query for each role. For
prep tasks these are always included when on an Ansible host of a given
role. This differs from bootstrap tasks that are only included for the
first host associated with a given role.
This will result in the following order of task imports with their
associated value of release and step:
fast_forward_upgrade_playbook
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=ocata
\_fast_forward_upgrade_prep_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=3
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=ocata
\_fast_forward_upgrade_bootstrap_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=N
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=N
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=pike
\_fast_forward_upgrade_prep_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=3
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=pike
\_fast_forward_upgrade_bootstrap_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=N
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=N
bp fast-forward-upgrades
Change-Id: Ie2683fd7b81167abe724a7b9245bf85a0a87ad1d
2017-08-25 14:25:08 +01:00
FastForwardUpgradeReleases:
type: comma_delimited_list
2020-01-27 17:07:09 +00:00
default: ['rocky', 'stein', 'train']
2018-02-24 22:40:28 +01:00
description: List of releases to fast forward through during upgrade. Last release in list is used for post steps.
2019-02-08 09:55:07 +01:00
ContainerLogStdoutPath:
type: string
description: Absolute path for container stdout output (Podman only)
default: /var/log/containers/stdouts
2019-04-12 12:08:31 -04:00
ContainerHealthcheckDisabled:
type: boolean
description: Whether or not we disable the container healthcheck.
default: false
2019-03-21 15:11:13 +01:00
SELinuxMode:
default: 'enforcing'
description: Configures SELinux mode
type: string
constraints:
- allowed_values: [ 'enforcing', 'permissive', 'disabled' ]
2018-12-10 18:47:41 +01:00
{% for role in enabled_roles %}
{{role.name}}Count:
description: Number of {{role.name}} nodes to deploy
type: number
default: {{role.CountDefault|default(0)}}
{% endfor %}
2019-04-18 15:28:50 -04:00
ServiceNetMapLower:
description: Mapping of service name to network name
type: json
default: {}
2019-06-06 10:38:23 -04:00
ValidateControllersIcmp:
default: true
description: Validation to ensure that all controllers can be reached with ICMP
type: boolean
ValidateGatewaysIcmp:
default: true
description: Validation to ensure that all gateways can be reached with ICMP
type: boolean
ValidateFqdn:
default: false
description: Optional validation to ensure FQDN as set by Nova matches the name set in /etc/hosts.
type: boolean
PingTestIpsMap:
default: ''
description: A map of role name to a space separated list of IP addresses used to ping test each available network interface.
type: json
2019-06-05 17:29:38 -04:00
StackAction:
type: string
description: >
Heat action on performed top-level stack. Note StackUpdateType is
set to UPGRADE when a major-version upgrade is in progress.
constraints:
- allowed_values: ['CREATE', 'UPDATE']
2019-06-06 20:49:42 -04:00
DeployArtifactURLs:
default: []
description: A list of HTTP URLs containing deployment artifacts.
Currently supports tarballs and RPM packages.
type: comma_delimited_list
2019-06-07 10:19:43 -04:00
HostsEntry:
2020-03-26 12:26:53 +01:00
default: []
type: comma_delimited_list
description: A list of entries to be added to /etc/hosts on each node.
2019-06-07 16:01:29 -04:00
AnsibleHostVarsMap:
type: json
default: {}
2019-06-13 12:41:30 -04:00
StackUpdateType:
type: string
description: >
Type of update, to differentiate between UPGRADE and UPDATE cases
when StackAction is UPDATE (both are the same stack action).
constraints:
- allowed_values: ['', 'UPGRADE', 'FASTFORWARDUPGRADE']
default: ''
ContainerCli:
type: string
default: 'podman'
description: CLI tool used to manage containers.
constraints:
- allowed_values: ['docker', 'podman']
EnabledServices:
default: []
type: comma_delimited_list
2019-06-19 17:09:28 -04:00
ControlVirtualIP:
type: string
EnabledNetworks:
type: comma_delimited_list
NetVipMap:
type: json
{%- for network in networks if network.enabled|default(true) %}
{{network.name}}NetName:
default: {{network.name_lower}}
description: The name of the {{network.name_lower}} network.
type: string
{%- endfor %}
CloudNames:
type: json
EnableInternalTLS:
type: boolean
default: false
2019-07-03 09:29:25 -04:00
CloudDomain:
default: 'localdomain'
type: string
description: >
The DNS domain used for the hosts. This must match the
overcloud_domain_name configured on the undercloud.
2019-07-12 11:58:00 +02:00
NovaAdditionalCell:
default: false
description: Whether this is an cell additional to the default cell.
type: boolean
2019-07-24 16:06:06 -04:00
AllNodesExtraMapData:
default: {}
type: json
description: Map of extra data (hieradata) to set on each node.
2019-10-22 14:31:42 -04:00
UndercloudHostsEntries:
default: []
description: >
List of undercloud hosts entries to be appended to /etc/hosts. The
value is populated with the HEAT_HOSTS entries on the undercloud by
tripleoclient when running deploy.
type: comma_delimited_list
ExtraHostsEntries:
default: []
description: List of extra hosts entries to be appended to /etc/hosts
type: comma_delimited_list
VipHostsEntries:
default: []
description: List of VIP (virtual IP) hosts entries to be appended to /etc/hosts
type: comma_delimited_list
2019-12-02 17:08:11 -05:00
KeystoneResourcesConfigs:
description: The keystone resources config.
type: json
default: {}
2020-04-27 16:51:56 +01:00
RootStackName:
description: The name of the stack/plan.
type: string
2017-03-01 13:57:13 +00:00
2020-05-28 11:18:54 -04:00
parameter_groups:
- label: deprecated
description: |
The following parameters are deprecated and will be removed. They should not
be relied on for new deployments. If you have concerns regarding deprecated
parameters, please contact the TripleO development team on IRC or the
OpenStack mailing list.
parameters:
- EnablePaunch
2017-05-06 02:19:47 +02:00
conditions:
2018-12-10 18:47:41 +01:00
{% for role in enabled_roles %}
{{role.name}}NonZero:
not:
equals:
- {get_param: {{role.name}}Count}
- 0
{% endfor %}
2017-05-06 02:19:47 +02:00
2017-03-01 13:57:13 +00:00
resources:
2017-10-06 11:41:59 +02:00
ExternalDeployTasks:
type: OS::Heat::Value
properties:
type: comma_delimited_list
value:
yaql:
# processing from per-role unique tasks into globally unique tasks
expression: coalesce($.data, []).flatten().distinct()
data:
{%- for role in enabled_roles %}
- get_param: [role_data, {{role.name}}, external_deploy_tasks]
{%- endfor %}
2017-11-22 17:45:19 +00:00
ExternalPostDeployTasks:
type: OS::Heat::Value
properties:
type: comma_delimited_list
value:
yaql:
# processing from per-role unique tasks into globally unique tasks
expression: coalesce($.data, []).flatten().distinct()
data:
{%- for role in enabled_roles %}
- get_param: [role_data, {{role.name}}, external_post_deploy_tasks]
{%- endfor %}
2019-04-10 07:49:20 -04:00
ScaleTasks:
type: OS::Heat::Value
properties:
type: comma_delimited_list
value:
yaql:
# processing from per-role unique tasks into globally unique tasks
expression: coalesce($.data, []).flatten().distinct()
data:
{%- for role in enabled_roles %}
- get_param: [role_data, {{role.name}}, scale_tasks]
{%- endfor %}
2018-06-29 16:14:36 +02:00
ExternalUpdateTasks:
type: OS::Heat::Value
properties:
type: comma_delimited_list
value:
yaql:
# processing from per-role unique tasks into globally unique tasks
expression: coalesce($.data, []).flatten().distinct()
data:
{%- for role in enabled_roles %}
- get_param: [role_data, {{role.name}}, external_update_tasks]
{%- endfor %}
ExternalUpgradeTasks:
type: OS::Heat::Value
properties:
type: comma_delimited_list
value:
yaql:
# processing from per-role unique tasks into globally unique tasks
expression: coalesce($.data, []).flatten().distinct()
data:
{%- for role in enabled_roles %}
- get_param: [role_data, {{role.name}}, external_upgrade_tasks]
{%- endfor %}
2017-10-19 18:06:42 +01:00
BootstrapServerId:
type: OS::Heat::Value
properties:
value:
yaql:
2018-08-06 12:23:28 -04:00
# Use a constant string of "bootstrap_server_id" when there are no
# servers in the primary role, such as in the case when all
# Controllers are blacklisted. No server id's will match the string
# which is what we want when all are blacklisted.
expression: switch($.data = {} => "no_bootstrap_server", $.data != {} => $.data.items().orderBy($[0]).first()[1])
2017-10-19 18:06:42 +01:00
data: {get_param: [servers, {{primary_role_name}}]}
2017-09-11 14:39:06 +01:00
# BEGIN CONFIG STEPS, only on enabled_roles
{%- for role in enabled_roles %}
2017-06-08 23:18:44 +02:00
# Note, this should be the last step to execute configuration changes.
# Ensure that all {{role.name}}ExtraConfigPost steps are executed
# after all the previous deployment steps.
{{role.name}}ExtraConfigPost:
2018-12-10 18:47:41 +01:00
condition: {{role.name}}NonZero
2017-06-08 23:18:44 +02:00
type: OS::TripleO::NodeExtraConfigPost
2017-03-01 13:57:13 +00:00
properties:
2017-06-08 23:18:44 +02:00
servers: {get_param: [servers, {{role.name}}]}
2019-04-25 21:23:57 -04:00
EndpointMap: {get_param: EndpointMap}
2017-03-01 13:57:13 +00:00
2017-06-08 23:18:44 +02:00
# The {{role.name}}PostConfig steps are in charge of
# quiescing all services, i.e. in the Controller case,
# we should run a full service reload.
{{role.name}}PostConfig:
2018-12-10 18:47:41 +01:00
condition: {{role.name}}NonZero
2017-06-08 23:18:44 +02:00
type: OS::TripleO::Tasks::{{role.name}}PostConfig
2017-03-01 13:57:13 +00:00
depends_on:
2017-09-11 14:39:06 +01:00
{%- for dep in enabled_roles %}
2017-06-08 23:18:44 +02:00
- {{dep.name}}ExtraConfigPost
2017-07-17 10:15:13 +02:00
{%- endfor %}
2017-03-01 13:57:13 +00:00
properties:
2017-06-08 23:18:44 +02:00
servers: {get_param: servers}
input_values:
2018-12-10 16:35:04 +05:30
deploy_identifier: {get_param: DeployIdentifier}
2017-03-01 13:57:13 +00:00
{% endfor %}
2017-07-20 17:11:44 +01:00
outputs:
RoleConfig:
description: Mapping of config data for all roles
value:
2017-12-04 13:55:10 +00:00
global_vars:
deploy_steps_max: {{deploy_steps_max}}
2019-04-18 15:28:50 -04:00
service_net_map: {get_param: ServiceNetMapLower}
2019-06-06 10:38:23 -04:00
validate_controllers_icmp: {get_param: ValidateControllersIcmp}
validate_gateways_icmp: {get_param: ValidateGatewaysIcmp}
validate_fqdn: {get_param: ValidateFqdn}
ping_test_ips: {get_param: PingTestIpsMap}
2019-06-05 17:29:38 -04:00
stack_action: {get_param: StackAction}
2019-06-06 20:49:42 -04:00
deploy_artifact_urls: {list_join: [' ', {get_param: DeployArtifactURLs}]}
2019-06-07 10:19:43 -04:00
hosts_entry: {get_param: HostsEntry}
2019-06-13 12:41:30 -04:00
primary_role_name: {{ primary_role_name }}
deploy_identifier: {get_param: DeployIdentifier}
stack_update_type: {get_param: StackUpdateType}
container_cli: {get_param: ContainerCli}
enabled_services: {get_param: EnabledServices}
2019-06-19 17:09:28 -04:00
control_virtual_ip: {get_param: ControlVirtualIP}
enabled_networks: {get_param: EnabledNetworks}
net_vip_map: {get_param: NetVipMap}
2019-07-12 11:58:00 +02:00
nova_additional_cell: {get_param: NovaAdditionalCell}
2020-04-20 14:02:21 +02:00
hide_sensitive_logs: {get_param: HideSensitiveLogs}
2019-06-19 17:09:28 -04:00
{%- for network in networks if network.enabled|default(true) %}
{{network.name_lower}}_net_name: {get_param: {{network.name}}NetName}
2019-07-02 09:20:20 -04:00
{%- endfor %}
networks:
{%- for network in networks if network.enabled|default(true) %}
{{network.name}}:
name: {get_param: {{network.name}}NetName}
name_lower: {{ network.name_lower }}
2019-06-19 17:09:28 -04:00
{%- endfor %}
network_virtual_ips:
ctlplane:
ip_address: {get_param: [NetVipMap, ctlplane]}
index: 1
{%- for network in networks if network.vip|default(false) and network.enabled|default(true) %}
# External virtual ip is currently being handled separately as public_virtual_ip.
# Likewise, optional StorageNFS virtual ip is handled separately as ganesha_vip.
{%- if network.name != 'External' and network.name != 'StorageNFS' %}
{{network.name_lower}}:
ip_address: {get_param: [NetVipMap, {get_param: {{network.name}}NetName}]}
index: {{loop.index + 1}}
{%- endif %}
{%- endfor %}
cloud_names: {get_param: CloudNames}
enable_internal_tls: {get_param: EnableInternalTLS}
2019-07-03 09:29:25 -04:00
cloud_domain: {get_param: CloudDomain}
2019-07-24 16:06:06 -04:00
all_nodes_extra_map_data: {get_param: AllNodesExtraMapData}
2019-10-22 14:31:42 -04:00
undercloud_hosts_entries: {get_param: UndercloudHostsEntries}
extra_hosts_entries: {get_param: ExtraHostsEntries}
vip_hosts_entries: {get_param: VipHostsEntries}
2019-12-02 17:08:11 -05:00
keystone_resources: {get_param: KeystoneResourcesConfigs}
2020-02-24 17:44:24 +00:00
common_deploy_steps_playbooks: {get_file: deploy-steps-playbooks-common.yaml}
2017-11-22 18:37:39 +00:00
common_deploy_steps_tasks: {get_file: deploy-steps-tasks.yaml}
2020-02-04 12:11:15 +01:00
hiera_steps_tasks: {get_file: hiera-steps-tasks.yaml}
2019-11-19 18:06:28 +01:00
deploy_steps_tasks_step_0: {get_file: deploy-steps-tasks-step-0.yaml}
2019-09-05 17:55:19 -04:00
common_deploy_steps_tasks_step_1: {get_file: deploy-steps-tasks-step-1.yaml}
2019-10-15 14:30:58 -04:00
container_startup_configs_tasks: {get_file: container_startup_configs_tasks.yaml}
2019-09-19 21:49:21 -05:00
container_puppet_script: {get_file: ./container-puppet.sh}
2019-06-06 10:38:23 -04:00
all_nodes_validation_script.sh : {get_file: ../validation-scripts/all-nodes.sh}
2019-06-06 20:49:42 -04:00
deploy-artifacts.sh : {get_file: ../puppet/deploy-artifacts.sh}
2020-01-22 14:07:06 -05:00
generate-config-tasks: {get_file: generate-config-tasks.yaml}
2020-01-22 14:11:33 -05:00
host-container-puppet-tasks: {get_file: host-container-puppet-tasks.yaml}
2017-09-20 12:48:19 -04:00
deploy_steps_playbook:
2020-02-24 16:09:02 +00:00
{% block deploy_steps_str_replace_params %}
2017-09-20 12:48:19 -04:00
str_replace:
params:
2017-10-19 18:06:42 +01:00
BOOTSTRAP_SERVER_ID: {get_attr: [BootstrapServerId, value]}
2018-05-07 15:54:11 -06:00
DEPLOY_SOURCE_HOST: {get_param: deployment_source_hosts}
2020-04-27 16:51:56 +01:00
DEPLOY_TARGET_HOST:
if:
- equals:
- {get_param: deployment_target_hosts}
- ""
- {get_param: RootStackName}
- {get_param: deployment_target_hosts}
2018-12-10 16:35:04 +05:30
DEPLOY_IDENTIFIER: {get_param: DeployIdentifier}
2018-08-06 10:15:56 -04:00
ENABLE_DEBUG: {get_param: ConfigDebug}
ENABLE_PUPPET: {get_param: EnablePuppet}
2018-08-03 16:51:23 -04:00
CONTAINER_CLI: {get_param: ContainerCli}
2019-02-08 09:55:07 +01:00
CONTAINER_LOG_STDOUT_PATH: {get_param: ContainerLogStdoutPath}
2019-04-12 12:08:31 -04:00
CONTAINER_HEALTHCHECK_DISABLED: {get_param: ContainerHealthcheckDisabled}
2018-08-06 10:15:56 -04:00
DOCKER_PUPPET_DEBUG: {get_param: DockerPuppetDebug}
DOCKER_PUPPET_PROCESS_COUNT: {get_param: DockerPuppetProcessCount}
2018-03-08 09:13:42 -05:00
DOCKER_PUPPET_MOUNT_HOST_PUPPET: {get_param: DockerPuppetMountHostPuppet}
2019-03-21 15:11:13 +01:00
SELINUX_MODE: {get_param: SELinuxMode}
2020-02-24 16:09:02 +00:00
{% endblock %}
2017-09-20 12:48:19 -04:00
template: |
2020-02-24 17:44:24 +00:00
- import_playbook: common_deploy_steps_playbooks.yaml
vars:
deploy_source_host: "DEPLOY_SOURCE_HOST"
deploy_target_host: "DEPLOY_TARGET_HOST"
2019-06-13 12:41:30 -04:00
2020-04-24 08:54:30 -06:00
- hosts: DEPLOY_TARGET_HOST
name: Manage SELinux
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2020-01-10 07:57:35 -05:00
any_errors_fatal: yes
2019-03-21 15:11:13 +01:00
tasks:
- name: Set selinux state
selinux:
policy: targeted
state: SELINUX_MODE
2020-04-24 08:54:30 -06:00
- hosts: all
name: Generate /etc/hosts
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
any_errors_fatal: yes
tasks:
2020-03-11 16:52:52 +00:00
{% raw %}
2020-02-04 09:40:28 +01:00
- name: Configure Hosts Entries
include_role:
name: tripleo_hosts_entries
vars:
2020-03-11 16:52:52 +00:00
tripleo_hosts_entries_undercloud_hosts_entries: "{{ undercloud_hosts_entries }}"
tripleo_hosts_entries_extra_hosts_entries: "{{ extra_hosts_entries }}"
tripleo_hosts_entries_vip_hosts_entries: "{{ vip_hosts_entries }}"
{% endraw %}
2019-03-21 15:11:13 +01:00
2018-05-07 15:54:11 -06:00
- hosts: DEPLOY_TARGET_HOST
2018-01-12 15:52:26 -05:00
name: Common roles for TripleO servers
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2017-12-04 11:49:05 -08:00
any_errors_fatal: yes
2019-02-13 14:23:26 -05:00
# pre_tasks run before any roles in a play, so we use it for the
# named debug task for --start-at-task.
pre_tasks:
- name: Common roles for TripleO servers
2019-12-10 18:13:54 -05:00
delegate_to: localhost
run_once: true
2019-02-13 14:23:26 -05:00
debug:
2019-10-02 17:45:59 -04:00
msg: Use --start-at-task 'Common roles for TripleO servers' to resume from this task
2017-12-04 11:49:05 -08:00
roles:
2020-01-30 13:40:24 -06:00
- tripleo_bootstrap
- tripleo_ssh_known_hosts
2017-12-04 11:49:05 -08:00
tags:
2018-01-12 15:52:26 -05:00
- common_roles
2018-01-30 19:41:35 -05:00
2018-05-07 15:54:11 -06:00
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
2019-10-22 10:59:52 -06:00
name: Deploy step tasks for step 0
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2018-04-04 09:57:49 -04:00
any_errors_fatal: yes
vars:
bootstrap_server_id: BOOTSTRAP_SERVER_ID
step: 0
2018-12-10 16:35:04 +05:30
deploy_identifier: DEPLOY_IDENTIFIER
2018-10-25 08:26:16 -04:00
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
container_cli: CONTAINER_CLI
2019-02-08 09:55:07 +01:00
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
2019-04-12 12:08:31 -04:00
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
2018-10-25 08:26:16 -04:00
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
2018-03-08 09:13:42 -05:00
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2018-04-04 09:57:49 -04:00
tasks:
2020-02-21 12:10:02 +00:00
- import_tasks: deploy_steps_tasks_step_0.yaml
2018-04-04 09:57:49 -04:00
tags:
- overcloud
- deploy_steps
2019-03-11 20:50:17 +01:00
- step0
2018-06-05 09:05:13 -04:00
2019-05-14 15:34:31 -04:00
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
name: Server pre deployment steps
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2019-05-14 15:34:31 -04:00
any_errors_fatal: yes
tasks:
2020-02-04 12:11:15 +01:00
- import_tasks: hiera_steps_tasks.yaml
2019-06-13 11:13:23 -04:00
tags:
- overcloud
- pre_deploy_steps
2018-05-07 15:54:11 -06:00
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
2017-09-20 12:48:19 -04:00
name: Server deployments
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2017-10-20 13:43:38 +02:00
any_errors_fatal: yes
2017-09-20 12:48:19 -04:00
tasks:
2020-03-11 16:52:52 +00:00
{% raw %}
2019-02-13 14:23:26 -05:00
- name: Server deployments
2019-12-10 18:13:54 -05:00
delegate_to: localhost
run_once: true
2019-02-13 14:23:26 -05:00
debug:
2019-10-02 17:45:59 -04:00
msg: Use --start-at-task 'Server deployments' to resume from this task
2018-06-11 17:55:13 -04:00
- include_tasks: deployments.yaml
2017-09-20 12:48:19 -04:00
vars:
force: false
2020-03-11 16:52:52 +00:00
with_items: "{{ hostvars[inventory_hostname]['pre_deployments_' ~ tripleo_role_name]|default([]) }}"
2019-06-06 10:38:23 -04:00
2019-06-05 17:29:38 -04:00
- name: Check for previous run of NetworkConfig
stat:
path: /var/lib/tripleo-config/os-net-config.returncode
register: os_net_config_returncode_stat
- name: Check result of previous run of NetworkConfig
slurp:
path: /var/lib/tripleo-config/os-net-config.returncode
when: os_net_config_returncode_stat.stat.exists
register: os_net_config_returncode_slurp
2019-07-02 13:05:31 +02:00
- name: Check NetworkConfig script existence
local_action:
module: stat
2020-03-11 16:52:52 +00:00
path: "{{ lookup('first_found', NetworkConfig_paths, errors='ignore') }}"
2019-07-02 13:05:31 +02:00
become: no
register: NetworkConfig_stat
2019-07-10 12:23:59 -04:00
vars:
NetworkConfig_paths:
2020-03-11 16:52:52 +00:00
- "{{ tripleo_role_name ~ '/' ~ inventory_hostname ~ '/NetworkConfig' }}"
- "{{ tripleo_role_name ~ '/NetworkConfig' }}"
2019-07-02 13:05:31 +02:00
2019-06-05 17:29:38 -04:00
- name: NetworkConfig
block:
- name: Create /var/lib/tripleo-config/scripts directory
file:
path: /var/lib/tripleo-config/scripts
state: directory
2020-02-07 13:33:20 +01:00
setype: container_file_t
2019-06-05 17:29:38 -04:00
selevel: s0
recurse: true
2019-07-10 12:23:59 -04:00
- name: Render NetworkConfig script
template:
2019-06-05 17:29:38 -04:00
dest: /var/lib/tripleo-config/scripts/run_os_net_config.sh
2020-03-11 16:52:52 +00:00
src: "{{ NetworkConfig_stat.stat.path }}"
2019-06-05 17:29:38 -04:00
mode: 0755
- name: Run NetworkConfig script
command: /var/lib/tripleo-config/scripts/run_os_net_config.sh
2020-03-11 16:52:52 +00:00
async: "{{ async_timeout | default(300) }}"
poll: "{{ async_poll | default(3) }}"
2019-06-05 17:29:38 -04:00
environment:
2020-03-11 16:52:52 +00:00
bridge_name: "{{ neutron_physical_bridge_name }}"
interface_name: "{{ neutron_public_interface_name }}"
2019-06-05 17:29:38 -04:00
register: NetworkConfig_result
2020-06-05 11:28:24 -04:00
when:
- not ansible_check_mode
2020-02-10 18:30:34 +05:30
failed_when: NetworkConfig_result.rc is not defined
2019-06-05 17:29:38 -04:00
- name: Write rc of NetworkConfig script
copy:
2020-03-11 16:52:52 +00:00
content: "{{ NetworkConfig_result.rc }}"
2019-06-05 17:29:38 -04:00
dest: /var/lib/tripleo-config/os-net-config.returncode
2020-06-05 11:28:24 -04:00
when:
- NetworkConfig_result.rc is defined
2019-06-05 17:29:38 -04:00
- name: NetworkConfig stdout
debug:
var: NetworkConfig_result.stderr_lines
failed_when: NetworkConfig_result.rc != 0
2020-06-05 11:28:24 -04:00
when:
- NetworkConfig_result.rc is defined
2019-06-05 17:29:38 -04:00
2019-11-28 11:36:59 +01:00
# os-net-config currently relies on the legacy network
# so we need to ensure it's enabled on boot. This should
# be removed when we switch to NetworkManager or replaced
# with something that ensures NetworkManager is enabled.
- name: Ensure network service is enabled
systemd:
name: network
enabled: yes
state: started
2019-06-05 17:29:38 -04:00
# The conditions here are when we want to apply the
# NetworkConfig. They are:
# - If the stack_action is CREATE
# - Or UPDATE is in the network_deployment_actions
# - Or the previous run of NetworkConfig failed.
2019-06-28 10:24:15 -04:00
# - Or it has never run
2019-06-05 17:29:38 -04:00
# This will match the prior behavior of when a Heat
# SoftwareDeployment was used.
2019-07-02 13:05:31 +02:00
# It also ensures the script does exist as a sine qua non
# condition
when: NetworkConfig_stat.stat.exists and
((stack_action == "CREATE") or ("UPDATE" in network_deployment_actions) or
2019-06-05 17:29:38 -04:00
(os_net_config_returncode_stat.stat.exists and
2019-07-02 13:05:31 +02:00
((os_net_config_returncode_slurp.content | b64decode) != 0)) or
(not os_net_config_returncode_stat.stat.exists))
2019-06-05 17:29:38 -04:00
2019-06-06 10:38:23 -04:00
- name: AllNodesValidationConfig
script: all_nodes_validation_script.sh
environment:
2020-03-11 16:52:52 +00:00
validate_controllers_icmp: "{{ validate_controllers_icmp }}"
validate_gateways_icmp: "{{ validate_gateways_icmp }}"
validate_fqdn: "{{ validate_fqdn }}"
ping_test_ips: "{{ ping_test_ips | to_json }}"
tripleo_role_name: "{{ tripleo_role_name }}"
2019-06-06 10:38:23 -04:00
2019-06-06 20:49:42 -04:00
- name: ArtifactsConfig
script: deploy-artifacts.sh
environment:
2020-03-11 16:52:52 +00:00
artifact_urls: "{{ deploy_artifact_urls }}"
2019-06-06 20:49:42 -04:00
2017-11-08 10:49:50 -05:00
tags:
- overcloud
- pre_deploy_steps
2020-03-11 16:52:52 +00:00
{% endraw %}
2018-01-30 19:41:35 -05:00
2020-06-09 12:24:03 -06:00
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
name: Host prep steps
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2017-10-20 13:43:38 +02:00
any_errors_fatal: yes
2017-09-20 12:48:19 -04:00
vars:
bootstrap_server_id: BOOTSTRAP_SERVER_ID
2018-12-10 16:35:04 +05:30
deploy_identifier: DEPLOY_IDENTIFIER
2018-10-25 08:26:16 -04:00
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
container_cli: CONTAINER_CLI
2019-02-08 09:55:07 +01:00
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
2019-04-12 12:08:31 -04:00
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
2018-10-25 08:26:16 -04:00
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
2018-03-08 09:13:42 -05:00
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2017-09-20 12:48:19 -04:00
tasks:
2020-06-09 12:24:03 -06:00
{%- for role in roles %}
- name: {{role.name}} Host prep block
when:
- tripleo_role_name == '{{role.name}}'
block:
- name: {{role.name}} Host prep steps
delegate_to: localhost
run_once: true
debug:
msg: Use --start-at-task '{{role.name}} Host prep steps' to resume from this task
- import_tasks: {{role.name}}/host_prep_tasks.yaml
{%- endfor %}
2017-11-08 10:49:50 -05:00
tags:
- overcloud
- host_prep_steps
2018-01-30 19:41:35 -05:00
2017-10-06 11:41:59 +02:00
{%- for step in range(1,deploy_steps_max) %}
2018-01-30 19:41:35 -05:00
2018-05-07 15:54:11 -06:00
- hosts: DEPLOY_SOURCE_HOST
2017-11-08 10:35:39 -05:00
name: External deployment step {{step}}
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2017-10-20 13:43:38 +02:00
any_errors_fatal: yes
2017-11-07 07:31:25 -05:00
become: false
2017-10-06 11:41:59 +02:00
vars:
2018-10-25 08:26:16 -04:00
bootstrap_server_id: BOOTSTRAP_SERVER_ID
2017-10-06 11:41:59 +02:00
step: '{{step}}'
2018-12-10 16:35:04 +05:30
deploy_identifier: DEPLOY_IDENTIFIER
2018-10-25 08:26:16 -04:00
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
container_cli: CONTAINER_CLI
2019-02-08 09:55:07 +01:00
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
2019-04-12 12:08:31 -04:00
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
2018-10-25 08:26:16 -04:00
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
2018-03-08 09:13:42 -05:00
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2017-10-06 11:41:59 +02:00
tasks:
2019-02-13 14:23:26 -05:00
- name: External deployment step {{step}}
2019-12-10 18:13:54 -05:00
delegate_to: localhost
run_once: true
2019-02-13 14:23:26 -05:00
debug:
2019-10-02 17:45:59 -04:00
msg: Use --start-at-task 'External deployment step {{step}}' to resume from this task
2018-07-03 15:50:26 +05:30
- import_tasks: external_deploy_steps_tasks.yaml
2017-11-08 10:49:50 -05:00
tags:
- external
- external_deploy_steps
2018-08-31 16:59:03 -04:00
- step{{step}}
2018-01-30 19:41:35 -05:00
2018-05-07 15:54:11 -06:00
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
2019-10-22 10:59:52 -06:00
name: Deploy step tasks for {{step}}
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2017-10-20 13:43:38 +02:00
any_errors_fatal: yes
2017-11-22 18:37:39 +00:00
# FIXME(shardy) - it would be nice to use strategy: free to
# allow the tasks per-step to run in parallel on each role,
# but that doesn't work with any_errors_fatal: yes
2017-10-06 11:41:59 +02:00
vars:
bootstrap_server_id: BOOTSTRAP_SERVER_ID
step: '{{step}}'
2018-12-10 16:35:04 +05:30
deploy_identifier: DEPLOY_IDENTIFIER
2018-08-06 10:15:56 -04:00
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
2018-08-03 16:51:23 -04:00
container_cli: CONTAINER_CLI
2019-02-08 09:55:07 +01:00
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
2019-04-12 12:08:31 -04:00
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
2018-08-06 10:15:56 -04:00
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
2018-03-08 09:13:42 -05:00
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2017-10-06 11:41:59 +02:00
tasks:
2019-05-08 17:14:51 +02:00
- name: Write the config_step hieradata for the deploy step {{step}} tasks
2020-03-11 16:52:52 +00:00
{% raw %}
2019-05-08 17:14:51 +02:00
copy:
2020-03-11 16:52:52 +00:00
content: "{{ dict(step=step | int) | to_json }}"
2019-05-08 17:14:51 +02:00
dest: /etc/puppet/hieradata/config_step.json
force: true
mode: '0600'
2020-03-11 16:52:52 +00:00
{% endraw %}
2019-10-22 10:59:52 -06:00
- name: Deploy step tasks for {{step}}
2019-12-10 18:13:54 -05:00
delegate_to: localhost
run_once: true
2019-02-13 14:23:26 -05:00
debug:
2019-10-22 10:59:52 -06:00
msg: Use --start-at-task 'Deploy step tasks for {{step}}' to resume from this task
2017-11-22 18:37:39 +00:00
{%- for role in roles %}
2020-03-11 15:35:14 +00:00
- include_tasks: "{% raw %}{{ _task_file_path }}{% endraw %}"
vars:
_task_file_path: "{{role.name}}/deploy_steps_tasks_step{{step}}.yaml"
2019-12-11 21:39:44 -05:00
when:
- tripleo_role_name == '{{role.name}}'
2020-03-11 15:35:14 +00:00
- "{% raw %}'{{ playbook_dir }}/{{ _task_file_path }}' is exists{% endraw %}"
2017-11-22 18:37:39 +00:00
{%- endfor %}
tags:
- overcloud
- deploy_steps
2018-08-31 16:59:03 -04:00
- step{{step}}
2018-01-30 19:41:35 -05:00
2019-09-05 17:55:19 -04:00
{% if step == 1 %}
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
2020-01-29 17:19:52 -05:00
name: Overcloud common bootstrap tasks for step 1
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2019-09-05 17:55:19 -04:00
any_errors_fatal: yes
vars:
bootstrap_server_id: BOOTSTRAP_SERVER_ID
step: '{{step}}'
deploy_identifier: DEPLOY_IDENTIFIER
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
container_cli: CONTAINER_CLI
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
tasks:
2020-01-29 17:19:52 -05:00
- name: Overcloud common bootstrap tasks for step 1
delegate_to: localhost
run_once: true
debug:
msg: Use --start-at-task 'Overcloud common bootstrap tasks for step 1' to resume from this task
2020-01-16 09:02:02 -05:00
- name: "Check if /var/lib/tripleo-config/container-startup-config/step_{{step}} already exists"
2019-09-05 17:55:19 -04:00
stat:
2020-01-16 09:02:02 -05:00
path: "/var/lib/tripleo-config/container-startup-config/step_{{step}}"
2019-09-05 17:55:19 -04:00
register: container_startup_configs_json_stat
2020-01-29 12:11:25 +00:00
- name: Write config data at the start of step 1
include_tasks: common_deploy_steps_tasks_step_1.yaml
2019-09-05 17:55:19 -04:00
when:
- ((deploy_identifier is defined and deploy_identifier != "" and deploy_identifier is not none) or not container_startup_configs_json_stat.stat.exists)
tags:
- overcloud
- deploy_steps
- step{{step}}
{% endif %}
2018-05-07 15:54:11 -06:00
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
2017-11-22 18:37:39 +00:00
name: Overcloud common deploy step tasks {{step}}
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2017-11-22 18:37:39 +00:00
any_errors_fatal: yes
vars:
bootstrap_server_id: BOOTSTRAP_SERVER_ID
step: '{{step}}'
2018-12-10 16:35:04 +05:30
deploy_identifier: DEPLOY_IDENTIFIER
2018-10-25 08:26:16 -04:00
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
container_cli: CONTAINER_CLI
2019-02-08 09:55:07 +01:00
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
2019-04-12 12:08:31 -04:00
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
2018-10-25 08:26:16 -04:00
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
2018-03-08 09:13:42 -05:00
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2017-11-22 18:37:39 +00:00
tasks:
2019-02-13 14:23:26 -05:00
- name: Overcloud common deploy step tasks {{step}}
2019-12-10 18:13:54 -05:00
delegate_to: localhost
run_once: true
2019-02-13 14:23:26 -05:00
debug:
2019-10-02 17:45:59 -04:00
msg: Use --start-at-task 'Overcloud common deploy step tasks {{step}}' to resume from this task
2020-01-16 09:02:02 -05:00
- name: "Check if /var/lib/tripleo-config/container-startup-config/step_{{step}} already exists"
2018-10-09 11:55:13 -04:00
stat:
2020-01-16 09:02:02 -05:00
path: "/var/lib/tripleo-config/container-startup-config/step_{{step}}"
2019-03-26 12:13:25 -04:00
register: container_startup_configs_json_stat
2019-12-05 11:00:55 -05:00
- include_tasks: common_deploy_steps_tasks.yaml
2019-08-23 18:02:33 -04:00
when: (deploy_identifier is defined and deploy_identifier != "" and deploy_identifier is not none) or
(container_startup_configs_json_stat is defined and not container_startup_configs_json_stat.stat.exists)
2017-11-08 10:49:50 -05:00
tags:
- overcloud
- deploy_steps
2018-08-31 16:59:03 -04:00
- step{{step}}
2018-01-30 19:41:35 -05:00
2017-10-06 11:41:59 +02:00
{%- endfor %}
2018-05-07 15:54:11 -06:00
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
2017-09-20 12:48:19 -04:00
name: Server Post Deployments
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2017-10-20 13:43:38 +02:00
any_errors_fatal: yes
2017-09-20 12:48:19 -04:00
tasks:
2019-02-13 14:23:26 -05:00
- name: Server Post Deployments
2019-12-10 18:13:54 -05:00
delegate_to: localhost
run_once: true
2019-02-13 14:23:26 -05:00
debug:
2019-10-02 17:45:59 -04:00
msg: Use --start-at-task 'Server Post Deployments' to resume from this task
2020-03-11 16:52:52 +00:00
{% raw %}
2018-06-11 17:55:13 -04:00
- include_tasks: deployments.yaml
2017-09-20 12:48:19 -04:00
vars:
force: false
2020-03-11 16:52:52 +00:00
with_items: "{{ hostvars[inventory_hostname]['post_deployments_' ~ tripleo_role_name]|default([]) }}"
2017-11-08 10:49:50 -05:00
tags:
- overcloud
- post_deploy_steps
2020-03-11 16:52:52 +00:00
{% endraw %}
2018-01-30 19:41:35 -05:00
2018-05-07 15:54:11 -06:00
- hosts: DEPLOY_SOURCE_HOST
2017-11-22 17:45:19 +00:00
name: External deployment Post Deploy tasks
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2017-11-22 17:45:19 +00:00
any_errors_fatal: yes
become: false
2018-10-25 08:26:16 -04:00
vars:
bootstrap_server_id: BOOTSTRAP_SERVER_ID
2018-12-10 16:35:04 +05:30
deploy_identifier: DEPLOY_IDENTIFIER
2018-10-25 08:26:16 -04:00
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
container_cli: CONTAINER_CLI
2019-02-08 09:55:07 +01:00
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
2019-04-12 12:08:31 -04:00
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
2018-10-25 08:26:16 -04:00
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
2018-03-08 09:13:42 -05:00
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2017-11-22 17:45:19 +00:00
tasks:
2019-02-13 14:23:26 -05:00
- name: External deployment Post Deploy tasks
2019-12-10 18:13:54 -05:00
delegate_to: localhost
run_once: true
2019-02-13 14:23:26 -05:00
debug:
2019-10-02 17:45:59 -04:00
msg: Use --start-at-task 'External deployment Post Deploy tasks' to resume from this task
2018-07-03 15:50:26 +05:30
- import_tasks: external_post_deploy_steps_tasks.yaml
2017-11-22 17:45:19 +00:00
tags:
- external
- external_deploy_steps
2019-03-20 11:57:29 -04:00
- external_post_deploy_steps
2018-01-30 19:41:35 -05:00
2017-10-06 11:41:59 +02:00
external_deploy_steps_tasks: {get_attr: [ExternalDeployTasks, value]}
2017-11-22 17:45:19 +00:00
external_post_deploy_steps_tasks: {get_attr: [ExternalPostDeployTasks, value]}
2017-07-21 11:43:25 +01:00
update_steps_tasks: |
{%- for role in roles %}
2020-02-21 12:10:02 +00:00
- include_tasks: {{role.name}}/update_tasks.yaml
2018-05-14 11:15:09 -07:00
when: tripleo_role_name == '{{role.name}}'
2020-02-21 12:10:02 +00:00
tags:
- always
2017-07-21 11:43:25 +01:00
{%- endfor %}
2018-05-07 15:54:11 -06:00
update_steps_playbook:
2020-02-24 16:09:02 +00:00
{{ self.deploy_steps_str_replace_params() }}
2018-05-07 15:54:11 -06:00
template: |
2020-02-24 17:44:24 +00:00
- import_playbook: common_deploy_steps_playbooks.yaml
vars:
deploy_source_host: "DEPLOY_SOURCE_HOST"
deploy_target_host: "DEPLOY_TARGET_HOST"
2019-05-13 15:25:57 +02:00
{%- for role in roles %}
- hosts: {{role.name}}
2018-05-07 15:54:11 -06:00
name: Run update
2020-03-11 16:52:52 +00:00
serial: "{% raw %}{{ update_serial | default({% endraw %}{{ role.update_serial | default(1) }}{% raw %})}}{% endraw %}"
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2018-11-21 15:48:53 +01:00
any_errors_fatal: yes
2018-10-16 12:53:38 -04:00
vars:
2018-10-25 12:15:12 +02:00
bootstrap_server_id: BOOTSTRAP_SERVER_ID
deploy_identifier: DEPLOY_IDENTIFIER
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
2018-10-16 12:53:38 -04:00
container_cli: CONTAINER_CLI
2019-02-08 09:55:07 +01:00
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
2019-04-12 12:08:31 -04:00
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
2018-10-25 12:15:12 +02:00
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2019-02-08 10:38:10 +01:00
tripleo_minor_update: true
2018-05-07 15:54:11 -06:00
tasks:
2020-02-04 12:11:15 +01:00
- import_tasks: hiera_steps_tasks.yaml
2018-07-03 15:50:26 +05:30
- include_tasks: update_steps_tasks.yaml
2018-05-07 15:54:11 -06:00
with_sequence: start=0 end={{update_steps_max-1}}
loop_control:
loop_var: step
2020-02-21 12:10:02 +00:00
tags:
- always
- include_tasks: {{role.name}}/host_prep_tasks.yaml
2018-06-11 14:06:40 +02:00
when: tripleo_role_name == '{{role.name}}'
2020-02-21 12:10:02 +00:00
tags:
- always
2019-11-19 18:06:28 +01:00
- import_tasks: deploy_steps_tasks_step_0.yaml
vars:
step: 0
2020-01-29 12:11:25 +00:00
- name: Write config data at the start of step 1
import_tasks: common_deploy_steps_tasks_step_1.yaml
2018-07-03 15:50:26 +05:30
- include_tasks: common_deploy_steps_tasks.yaml
2018-05-07 15:54:11 -06:00
with_sequence: start=1 end={{deploy_steps_max-1}}
loop_control:
loop_var: step
2020-02-21 12:10:02 +00:00
tags:
- always
2018-07-03 15:50:26 +05:30
- include_tasks: post_update_steps_tasks.yaml
2018-06-25 10:39:56 +02:00
with_sequence: start=0 end={{post_update_steps_max-1}}
loop_control:
loop_var: step
2020-02-21 12:10:02 +00:00
tags:
- always
2019-05-13 15:25:57 +02:00
{%- endfor %}
2018-06-29 16:14:36 +02:00
external_update_steps_tasks: {get_attr: [ExternalUpdateTasks, value]}
external_update_steps_playbook:
2020-02-24 16:09:02 +00:00
{{ self.deploy_steps_str_replace_params() }}
2018-06-29 16:14:36 +02:00
template: |
2020-02-24 17:44:24 +00:00
- import_playbook: common_deploy_steps_playbooks.yaml
vars:
deploy_source_host: "DEPLOY_SOURCE_HOST"
deploy_target_host: "DEPLOY_TARGET_HOST"
2019-08-30 23:25:11 +02:00
{%- for step in range(external_update_steps_max) %}
2018-06-29 16:14:36 +02:00
- hosts: DEPLOY_SOURCE_HOST
2019-08-30 23:25:11 +02:00
name: External update step {{step}}
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2018-06-29 16:14:36 +02:00
any_errors_fatal: yes
become: false
2019-08-09 08:37:48 +02:00
vars:
bootstrap_server_id: BOOTSTRAP_SERVER_ID
2019-08-30 23:25:11 +02:00
step: '{{step}}'
2019-08-09 08:37:48 +02:00
deploy_identifier: DEPLOY_IDENTIFIER
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
container_cli: CONTAINER_CLI
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2018-06-29 16:14:36 +02:00
tasks:
2019-08-30 23:25:11 +02:00
- import_tasks: external_update_steps_tasks.yaml
2018-06-29 16:14:36 +02:00
tags:
2019-08-30 23:25:11 +02:00
- step{{step}}
2018-06-29 16:14:36 +02:00
- external
- external_update_steps
2019-08-30 23:25:11 +02:00
{%- endfor %}
{%- for step in range(1,deploy_steps_max) %}
2018-06-29 16:14:36 +02:00
# putting both update and deploy tasks in the same
# playbook allows influencing the deploy tasks by
# variables "exported" from update tasks
- hosts: DEPLOY_SOURCE_HOST
2019-08-30 23:25:11 +02:00
name: External deploy step {{step}}
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2018-06-29 16:14:36 +02:00
any_errors_fatal: yes
become: false
2019-08-09 08:37:48 +02:00
vars:
bootstrap_server_id: BOOTSTRAP_SERVER_ID
2019-08-30 23:25:11 +02:00
step: '{{step}}'
2019-08-09 08:37:48 +02:00
deploy_identifier: DEPLOY_IDENTIFIER
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
container_cli: CONTAINER_CLI
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2018-06-29 16:14:36 +02:00
tasks:
2019-08-30 23:25:11 +02:00
- import_tasks: external_deploy_steps_tasks.yaml
2018-06-29 16:14:36 +02:00
tags:
- external
- external_deploy_steps
2019-08-30 23:25:11 +02:00
- step{{step}}
{%- endfor %}
2018-03-12 17:02:36 +01:00
pre_upgrade_rolling_steps_tasks: |
{%- for role in roles %}
2020-02-21 12:10:02 +00:00
- include_tasks: {{role.name}}/pre_upgrade_rolling_tasks.yaml
2018-05-14 11:15:09 -07:00
when: tripleo_role_name == '{{role.name}}'
2020-02-21 12:10:02 +00:00
tags:
- always
2018-03-12 17:02:36 +01:00
{%- endfor %}
2018-05-07 15:54:11 -06:00
pre_upgrade_rolling_steps_playbook:
2020-02-24 16:09:02 +00:00
{{ self.deploy_steps_str_replace_params() }}
2018-05-07 15:54:11 -06:00
template: |
2019-05-13 15:25:57 +02:00
{%- for role in roles %}
2020-02-24 17:44:24 +00:00
- import_playbook: common_deploy_steps_playbooks.yaml
vars:
deploy_source_host: "DEPLOY_SOURCE_HOST:{{role.name}}"
deploy_target_host: "DEPLOY_TARGET_HOST"
2019-05-13 15:25:57 +02:00
- hosts: {{role.name}}
2018-05-07 15:54:11 -06:00
name: Run pre-upgrade rolling tasks
2019-05-13 15:25:57 +02:00
serial: {{ role.deploy_serial | default(1) }}
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2018-11-21 15:48:53 +01:00
any_errors_fatal: yes
2018-05-07 15:54:11 -06:00
tasks:
2018-07-03 15:50:26 +05:30
- include_tasks: pre_upgrade_rolling_steps_tasks.yaml
2018-05-07 15:54:11 -06:00
with_sequence: start=0 end={{pre_upgrade_rolling_steps_max-1}}
loop_control:
loop_var: step
2019-05-13 15:25:57 +02:00
{%- endfor %}
2018-05-07 15:54:11 -06:00
upgrade_steps_playbook:
2020-02-24 16:09:02 +00:00
{{ self.deploy_steps_str_replace_params() }}
2018-05-07 15:54:11 -06:00
template: |
2020-02-24 17:44:24 +00:00
- import_playbook: common_deploy_steps_playbooks.yaml
vars:
deploy_source_host: "DEPLOY_SOURCE_HOST"
deploy_target_host: "DEPLOY_TARGET_HOST"
2018-12-18 12:53:51 +01:00
{%- for step in range(0,upgrade_steps_max) %}
- hosts: DEPLOY_TARGET_HOST
name: Upgrade tasks for step {{step}}
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2018-11-21 15:48:53 +01:00
any_errors_fatal: yes
2018-12-18 12:53:51 +01:00
vars:
bootstrap_server_id: BOOTSTRAP_SERVER_ID
step: '{{step}}'
deploy_identifier: DEPLOY_IDENTIFIER
enable_debug: ENABLE_DEBUG
container_cli: CONTAINER_CLI
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
2018-05-07 15:54:11 -06:00
tasks:
2018-12-18 12:53:51 +01:00
{%- for role in roles %}
2020-02-21 12:10:02 +00:00
- include_tasks: {{role.name}}/upgrade_tasks_step{{step}}.yaml
2018-12-18 12:53:51 +01:00
when: tripleo_role_name == '{{role.name}}'
2020-02-21 12:10:02 +00:00
tags:
- always
2018-12-18 12:53:51 +01:00
{%- endfor %}
tags:
- upgrade_steps
- upgrade_step{{step}}
{%- endfor %}
2017-10-11 15:55:06 +03:00
post_upgrade_steps_tasks: |
{%- for role in roles %}
2020-02-21 12:10:02 +00:00
- include_tasks: {{role.name}}/post_upgrade_tasks.yaml
2018-05-14 11:15:09 -07:00
when: tripleo_role_name == '{{role.name}}'
2020-02-21 12:10:02 +00:00
tags:
- always
2017-10-11 15:55:06 +03:00
{%- endfor %}
2018-05-07 15:54:11 -06:00
post_upgrade_steps_playbook:
2020-02-24 16:09:02 +00:00
{{ self.deploy_steps_str_replace_params() }}
2018-05-07 15:54:11 -06:00
template: |
2020-04-28 10:09:52 +02:00
- import_playbook: common_deploy_steps_playbooks.yaml
vars:
deploy_source_host: "DEPLOY_SOURCE_HOST"
deploy_target_host: "DEPLOY_TARGET_HOST"
2018-05-07 15:54:11 -06:00
- hosts: DEPLOY_TARGET_HOST
2018-11-21 15:48:53 +01:00
any_errors_fatal: yes
2018-05-07 15:54:11 -06:00
tasks:
2018-07-03 15:50:26 +05:30
- include_tasks: post_upgrade_steps_tasks.yaml
2018-05-07 15:54:11 -06:00
with_sequence: start=0 end={{post_upgrade_steps_max-1}}
2018-10-16 12:53:38 -04:00
vars:
2018-10-25 12:15:12 +02:00
bootstrap_server_id: BOOTSTRAP_SERVER_ID
deploy_identifier: DEPLOY_IDENTIFIER
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
2018-10-16 12:53:38 -04:00
container_cli: CONTAINER_CLI
2019-02-08 09:55:07 +01:00
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
2019-04-12 12:08:31 -04:00
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
2018-10-25 12:15:12 +02:00
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2018-05-07 15:54:11 -06:00
loop_control:
loop_var: step
2018-06-29 16:14:36 +02:00
external_upgrade_steps_tasks: {get_attr: [ExternalUpgradeTasks, value]}
external_upgrade_steps_playbook:
2020-02-24 16:09:02 +00:00
{{ self.deploy_steps_str_replace_params() }}
2018-06-29 16:14:36 +02:00
template: |
2020-02-24 17:44:24 +00:00
- import_playbook: common_deploy_steps_playbooks.yaml
vars:
deploy_source_host: "DEPLOY_SOURCE_HOST"
deploy_target_host: "DEPLOY_TARGET_HOST"
2019-08-30 23:25:11 +02:00
{%- for step in range(external_upgrade_steps_max) %}
2018-06-29 16:14:36 +02:00
- hosts: DEPLOY_SOURCE_HOST
2019-08-30 23:25:11 +02:00
name: External upgrade step {{step}}
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2018-06-29 16:14:36 +02:00
any_errors_fatal: yes
become: false
2018-11-05 11:44:31 -05:00
vars:
2019-05-28 10:49:28 +00:00
# Explicit ansible_python_interpreter to allow connecting
# to different OS releases (EL7/8) while using delegate_to.
ansible_python_interpreter: /usr/libexec/platform-python
2019-08-30 23:25:11 +02:00
step: '{{step}}'
2018-10-25 12:15:12 +02:00
bootstrap_server_id: BOOTSTRAP_SERVER_ID
deploy_identifier: DEPLOY_IDENTIFIER
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
2018-11-05 11:44:31 -05:00
container_cli: CONTAINER_CLI
2019-02-08 09:55:07 +01:00
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
2019-04-12 12:08:31 -04:00
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
2018-10-25 12:15:12 +02:00
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2018-06-29 16:14:36 +02:00
tasks:
2019-08-30 23:25:11 +02:00
- import_tasks: external_upgrade_steps_tasks.yaml
2018-06-29 16:14:36 +02:00
tags:
2019-08-30 23:25:11 +02:00
- step{{step}}
2018-06-29 16:14:36 +02:00
- external
- external_upgrade_steps
2019-08-30 23:25:11 +02:00
{%- endfor %}
{%- for step in range(1,deploy_steps_max) %}
2018-06-29 16:14:36 +02:00
# putting both upgrade and deploy tasks in the same
# playbook allows influencing the deploy tasks by
# variables "exported" from upgrade tasks
- hosts: DEPLOY_SOURCE_HOST
2019-08-30 23:25:11 +02:00
name: External deploy step {{step}}
2020-03-11 16:52:52 +00:00
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
2018-06-29 16:14:36 +02:00
any_errors_fatal: yes
become: false
2018-11-05 11:44:31 -05:00
vars:
2019-05-28 10:49:28 +00:00
# Explicit ansible_python_interpreter to allow connecting
# to different OS releases (EL7/8) while using delegate_to.
ansible_python_interpreter: /usr/libexec/platform-python
2019-08-30 23:25:11 +02:00
step: '{{step}}'
2018-10-25 12:15:12 +02:00
bootstrap_server_id: BOOTSTRAP_SERVER_ID
deploy_identifier: DEPLOY_IDENTIFIER
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
2018-11-05 11:44:31 -05:00
container_cli: CONTAINER_CLI
2019-02-08 09:55:07 +01:00
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
2019-04-12 12:08:31 -04:00
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
2018-10-25 12:15:12 +02:00
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
2018-06-29 16:14:36 +02:00
tasks:
2019-08-30 23:25:11 +02:00
- import_tasks: external_deploy_steps_tasks.yaml
2018-06-29 16:14:36 +02:00
tags:
2019-08-30 23:25:11 +02:00
- step{{step}}
2018-06-29 16:14:36 +02:00
- external
- external_deploy_steps
2019-08-30 23:25:11 +02:00
{%- endfor %}
2019-04-10 07:49:20 -04:00
scale_steps_tasks: {get_attr: [ScaleTasks, value]}
scale_playbook:
2020-02-24 16:09:02 +00:00
{{ self.deploy_steps_str_replace_params() }}
2019-04-10 07:49:20 -04:00
template: |
# Collect the facts from the overcloud nodes but ignore unreachable
# nodes in the case of a dead node which needs to be part of the
# scale-down operation.
2020-02-24 17:44:24 +00:00
- import_playbook: common_deploy_steps_playbooks.yaml
vars:
deploy_source_host: "DEPLOY_SOURCE_HOST"
deploy_target_host: "DEPLOY_TARGET_HOST"
2020-06-03 09:53:16 -06:00
scale_ignore_unreachable: true
2020-02-24 17:44:24 +00:00
2019-04-10 07:49:20 -04:00
- hosts: DEPLOY_TARGET_HOST
name: Scaling
2019-12-11 10:27:26 -05:00
# NOTE(cloudnull): This is set to true explicitly so that we have up-to-date facts
# on all DEPLOY_TARGET_HOST when performing a scaling operation.
# Without up-to-date facts, we're creating a potential failure
# scenario.
gather_facts: true
2020-04-27 12:58:22 +02:00
ignore_unreachable: true
2019-04-10 07:49:20 -04:00
become: false
vars:
bootstrap_server_id: BOOTSTRAP_SERVER_ID
deploy_identifier: DEPLOY_IDENTIFIER
enable_debug: ENABLE_DEBUG
enable_puppet: ENABLE_PUPPET
container_cli: CONTAINER_CLI
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
docker_puppet_debug: DOCKER_PUPPET_DEBUG
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
tasks:
# Only run the scale tasks on the nodes that are alive.
# We expect the tasks to work on the nodes that are alive.
# If a task is allowed to fail, it needs to be configured at
# the task definition level but not here.
- include_tasks: scale_steps_tasks.yaml
2019-12-11 10:27:26 -05:00
with_sequence: start=1 end={{scale_steps_max}}
2019-04-10 07:49:20 -04:00
loop_control:
loop_var: step
tags: always
# we use ansible_hostname to determine if the host is alive
# or not.
when: ansible_hostname is defined
# We don't want to run the scale tasks on dead nodes, to allow
# the operator to scale down the cloud no matter the state of
# the servers.
# However, we notify the operator if the node wasn't reachable.
# Using fail and not debug module to make it more visible
# in the logs.
- fail:
msg: "Node is unreachable. No scale tasks will be run."
ignore_errors: True
tags: always
# we use ansible_hostname to determine if the host is alive
# or not.
when: ansible_hostname is not defined
tags:
- scale
ffu: Add fast-forward upgrade outputs to RoleConfig
As outlined in the spec, fast-forward upgrades aim to take an
environment from an initial release of N to a release of N>=2, beyond
that of the traditionally supported N+1 upgrade path provided today by
many OpenStack projects.
For TripleO the first phase of this upgrade will be to move the
environment to the release prior to the target release. This will be
achieved by disabling all OpenStack control plane services and then
preforming the minimum number of steps required to upgrade each service
through each release until finally reaching the target release.
This change introduces the framework for this phase of the fast-forward
upgrades by adding playbooks and task files as outputs to RoleConfig.
- fast_forward_upgrade_playbook.yaml
This is the top level play and acts as the outer loop of the process,
iterating through the required releases as set by the
FastForwardUpgradeReleases parameter for the fast-forward section of the
upgrade. This currently defaults to Ocata and Pike for Queens.
Note that this play is run against the overcloud host group and it is
currently assumed that the inventory used to run this play is provided
by the tripleo-ansible-inventory command.
- fast_forward_upgrade_release_tasks.yaml
This output simply imports the top level prep and bootstrap task files.
- fast_forward_upgrade_prep_tasks.yaml
- fast_forward_upgrade_bootstrap_tasks.yaml
These outputs act as the inner loop for the fast-forward upgrade phase,
iterating over step values while importing their associated role tasks.
As prep tasks are carried out first for each release we loop over step
values starting at 0 and ending at the defined
fast_forward_upgrade_prep_steps_max, currently 3.
Following this we then complete the bootstrap tasks for each release,
looping over steps values starting at
fast_forward_upgrade_prep_steps_max + 1 , currently 4 and ending at
fast_forward_upgrade_steps_max,currently 9.
- fast_forward_upgrade_prep_role_tasks.yaml
- fast_forward_upgrade_bootstrap_role_tasks.yaml
These outputs then finally import the fast_forward_upgrade_tasks files
generated by the FastForwardUpgradeTasks YAQL query for each role. For
prep tasks these are always included when on an Ansible host of a given
role. This differs from bootstrap tasks that are only included for the
first host associated with a given role.
This will result in the following order of task imports with their
associated value of release and step:
fast_forward_upgrade_playbook
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=ocata
\_fast_forward_upgrade_prep_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=3
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=ocata
\_fast_forward_upgrade_bootstrap_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=N
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=N
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=pike
\_fast_forward_upgrade_prep_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=3
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=pike
\_fast_forward_upgrade_bootstrap_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=N
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=N
bp fast-forward-upgrades
Change-Id: Ie2683fd7b81167abe724a7b9245bf85a0a87ad1d
2017-08-25 14:25:08 +01:00
fast_forward_upgrade_playbook:
2020-02-24 16:09:02 +00:00
{{ self.deploy_steps_str_replace_params() }}
2018-05-07 15:54:11 -06:00
template: |
- hosts: DEPLOY_TARGET_HOST
2018-11-21 15:48:53 +01:00
any_errors_fatal: yes
2018-05-07 15:54:11 -06:00
tasks:
- set_fact:
releases: {get_param: [FastForwardUpgradeReleases]}
2018-02-24 22:40:28 +01:00
{% raw %}
2018-05-07 15:54:11 -06:00
- set_fact:
ffu_releases: "{{ releases | difference( releases | last )}}"
- include_tasks: fast_forward_upgrade_release_tasks.yaml
loop_control:
loop_var: release
with_items: '{{ ffu_releases }}'
- set_fact:
release: "{{ releases | last }}"
ffu_packages_apply: True
2018-02-24 22:40:28 +01:00
{% endraw %}
2018-05-07 15:54:11 -06:00
- include_tasks: fast_forward_upgrade_post_role_tasks.yaml
ffu: Add fast-forward upgrade outputs to RoleConfig
As outlined in the spec, fast-forward upgrades aim to take an
environment from an initial release of N to a release of N>=2, beyond
that of the traditionally supported N+1 upgrade path provided today by
many OpenStack projects.
For TripleO the first phase of this upgrade will be to move the
environment to the release prior to the target release. This will be
achieved by disabling all OpenStack control plane services and then
preforming the minimum number of steps required to upgrade each service
through each release until finally reaching the target release.
This change introduces the framework for this phase of the fast-forward
upgrades by adding playbooks and task files as outputs to RoleConfig.
- fast_forward_upgrade_playbook.yaml
This is the top level play and acts as the outer loop of the process,
iterating through the required releases as set by the
FastForwardUpgradeReleases parameter for the fast-forward section of the
upgrade. This currently defaults to Ocata and Pike for Queens.
Note that this play is run against the overcloud host group and it is
currently assumed that the inventory used to run this play is provided
by the tripleo-ansible-inventory command.
- fast_forward_upgrade_release_tasks.yaml
This output simply imports the top level prep and bootstrap task files.
- fast_forward_upgrade_prep_tasks.yaml
- fast_forward_upgrade_bootstrap_tasks.yaml
These outputs act as the inner loop for the fast-forward upgrade phase,
iterating over step values while importing their associated role tasks.
As prep tasks are carried out first for each release we loop over step
values starting at 0 and ending at the defined
fast_forward_upgrade_prep_steps_max, currently 3.
Following this we then complete the bootstrap tasks for each release,
looping over steps values starting at
fast_forward_upgrade_prep_steps_max + 1 , currently 4 and ending at
fast_forward_upgrade_steps_max,currently 9.
- fast_forward_upgrade_prep_role_tasks.yaml
- fast_forward_upgrade_bootstrap_role_tasks.yaml
These outputs then finally import the fast_forward_upgrade_tasks files
generated by the FastForwardUpgradeTasks YAQL query for each role. For
prep tasks these are always included when on an Ansible host of a given
role. This differs from bootstrap tasks that are only included for the
first host associated with a given role.
This will result in the following order of task imports with their
associated value of release and step:
fast_forward_upgrade_playbook
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=ocata
\_fast_forward_upgrade_prep_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=3
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=ocata
\_fast_forward_upgrade_bootstrap_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=N
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=N
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=pike
\_fast_forward_upgrade_prep_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=3
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=pike
\_fast_forward_upgrade_bootstrap_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=N
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=N
bp fast-forward-upgrades
Change-Id: Ie2683fd7b81167abe724a7b9245bf85a0a87ad1d
2017-08-25 14:25:08 +01:00
fast_forward_upgrade_release_tasks: |
- include_tasks: fast_forward_upgrade_prep_tasks.yaml
- include_tasks: fast_forward_upgrade_bootstrap_tasks.yaml
fast_forward_upgrade_prep_tasks: |
2018-02-06 18:58:49 +01:00
{%- for role in roles %}
- shell: |
#!/bin/bash
if [ ! -f /root/.ffu_workaround ]; then
touch /root/.ffu_workaround
os-apply-config -m /var/lib/os-collect-config/{{role.deprecated_server_resource_name|default(role.name)}}Deployment.json
systemctl stop os-collect-config
rm -r /var/lib/os-collect-config/*
rm -f /usr/libexec/os-refresh-config/configure.d/40-hiera-datafiles
rm -f /usr/libexec/os-apply-config/templates/etc/puppet/hiera.yaml
rm -f /usr/libexec/os-refresh-config/configure.d/10-hiera-disable
fi
2018-05-14 11:15:09 -07:00
when: tripleo_role_name == '{{role.name}}'
2018-02-06 18:58:49 +01:00
name: Run Fast Forward Upgrade Prep Workarounds for {{role.name}}
{%- endfor %}
2019-03-01 14:58:57 -05:00
- name: Create /var/lib/container-puppet
2020-02-07 13:33:20 +01:00
file: path=/var/lib/container-puppet state=directory setype=container_file_t selevel=s0 recurse=true
2019-09-19 21:49:21 -05:00
- name: Write container-puppet.sh
no_log: True
2019-11-28 16:25:33 +01:00
copy: src=container_puppet_script.yaml dest=/var/lib/container-puppet/container-puppet.sh force=yes mode=0755 setype=container_file_t
ffu: Add fast-forward upgrade outputs to RoleConfig
As outlined in the spec, fast-forward upgrades aim to take an
environment from an initial release of N to a release of N>=2, beyond
that of the traditionally supported N+1 upgrade path provided today by
many OpenStack projects.
For TripleO the first phase of this upgrade will be to move the
environment to the release prior to the target release. This will be
achieved by disabling all OpenStack control plane services and then
preforming the minimum number of steps required to upgrade each service
through each release until finally reaching the target release.
This change introduces the framework for this phase of the fast-forward
upgrades by adding playbooks and task files as outputs to RoleConfig.
- fast_forward_upgrade_playbook.yaml
This is the top level play and acts as the outer loop of the process,
iterating through the required releases as set by the
FastForwardUpgradeReleases parameter for the fast-forward section of the
upgrade. This currently defaults to Ocata and Pike for Queens.
Note that this play is run against the overcloud host group and it is
currently assumed that the inventory used to run this play is provided
by the tripleo-ansible-inventory command.
- fast_forward_upgrade_release_tasks.yaml
This output simply imports the top level prep and bootstrap task files.
- fast_forward_upgrade_prep_tasks.yaml
- fast_forward_upgrade_bootstrap_tasks.yaml
These outputs act as the inner loop for the fast-forward upgrade phase,
iterating over step values while importing their associated role tasks.
As prep tasks are carried out first for each release we loop over step
values starting at 0 and ending at the defined
fast_forward_upgrade_prep_steps_max, currently 3.
Following this we then complete the bootstrap tasks for each release,
looping over steps values starting at
fast_forward_upgrade_prep_steps_max + 1 , currently 4 and ending at
fast_forward_upgrade_steps_max,currently 9.
- fast_forward_upgrade_prep_role_tasks.yaml
- fast_forward_upgrade_bootstrap_role_tasks.yaml
These outputs then finally import the fast_forward_upgrade_tasks files
generated by the FastForwardUpgradeTasks YAQL query for each role. For
prep tasks these are always included when on an Ansible host of a given
role. This differs from bootstrap tasks that are only included for the
first host associated with a given role.
This will result in the following order of task imports with their
associated value of release and step:
fast_forward_upgrade_playbook
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=ocata
\_fast_forward_upgrade_prep_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=3
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=ocata
\_fast_forward_upgrade_bootstrap_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=N
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=N
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=pike
\_fast_forward_upgrade_prep_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=3
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=pike
\_fast_forward_upgrade_bootstrap_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=N
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=N
bp fast-forward-upgrades
Change-Id: Ie2683fd7b81167abe724a7b9245bf85a0a87ad1d
2017-08-25 14:25:08 +01:00
- include_tasks: fast_forward_upgrade_prep_role_tasks.yaml
with_sequence: start=0 end={{fast_forward_upgrade_prep_steps_max}}
loop_control:
loop_var: step
2018-02-24 22:40:28 +01:00
fast_forward_upgrade_post_role_tasks: |
{%- for role in roles %}
- include_tasks: {{role.name}}/fast_forward_post_upgrade_tasks.yaml
2018-05-14 11:15:09 -07:00
when: tripleo_role_name == '{{role.name}}'
2020-02-21 12:10:02 +00:00
tags:
- always
2018-02-24 22:40:28 +01:00
{%- endfor %}
- name: Openstack Heat Agents package update
2018-07-20 14:03:57 -04:00
package: name=openstack-heat-agents state=latest
2018-02-24 22:40:28 +01:00
- name: Update os-collect-config
2018-07-20 14:03:57 -04:00
package: name=os-collect-config state=latest
2018-02-24 22:40:28 +01:00
- name: Start os-collect-config back up
service: name=os-collect-config state=started enabled=yes
ffu: Add fast-forward upgrade outputs to RoleConfig
As outlined in the spec, fast-forward upgrades aim to take an
environment from an initial release of N to a release of N>=2, beyond
that of the traditionally supported N+1 upgrade path provided today by
many OpenStack projects.
For TripleO the first phase of this upgrade will be to move the
environment to the release prior to the target release. This will be
achieved by disabling all OpenStack control plane services and then
preforming the minimum number of steps required to upgrade each service
through each release until finally reaching the target release.
This change introduces the framework for this phase of the fast-forward
upgrades by adding playbooks and task files as outputs to RoleConfig.
- fast_forward_upgrade_playbook.yaml
This is the top level play and acts as the outer loop of the process,
iterating through the required releases as set by the
FastForwardUpgradeReleases parameter for the fast-forward section of the
upgrade. This currently defaults to Ocata and Pike for Queens.
Note that this play is run against the overcloud host group and it is
currently assumed that the inventory used to run this play is provided
by the tripleo-ansible-inventory command.
- fast_forward_upgrade_release_tasks.yaml
This output simply imports the top level prep and bootstrap task files.
- fast_forward_upgrade_prep_tasks.yaml
- fast_forward_upgrade_bootstrap_tasks.yaml
These outputs act as the inner loop for the fast-forward upgrade phase,
iterating over step values while importing their associated role tasks.
As prep tasks are carried out first for each release we loop over step
values starting at 0 and ending at the defined
fast_forward_upgrade_prep_steps_max, currently 3.
Following this we then complete the bootstrap tasks for each release,
looping over steps values starting at
fast_forward_upgrade_prep_steps_max + 1 , currently 4 and ending at
fast_forward_upgrade_steps_max,currently 9.
- fast_forward_upgrade_prep_role_tasks.yaml
- fast_forward_upgrade_bootstrap_role_tasks.yaml
These outputs then finally import the fast_forward_upgrade_tasks files
generated by the FastForwardUpgradeTasks YAQL query for each role. For
prep tasks these are always included when on an Ansible host of a given
role. This differs from bootstrap tasks that are only included for the
first host associated with a given role.
This will result in the following order of task imports with their
associated value of release and step:
fast_forward_upgrade_playbook
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=ocata
\_fast_forward_upgrade_prep_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=3
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=ocata
\_fast_forward_upgrade_bootstrap_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=N
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=N
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=pike
\_fast_forward_upgrade_prep_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=3
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=pike
\_fast_forward_upgrade_bootstrap_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=N
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=N
bp fast-forward-upgrades
Change-Id: Ie2683fd7b81167abe724a7b9245bf85a0a87ad1d
2017-08-25 14:25:08 +01:00
fast_forward_upgrade_prep_role_tasks: |
{%- for role in roles %}
- include_tasks: {{role.name}}/fast_forward_upgrade_tasks.yaml
2018-05-14 11:15:09 -07:00
when: tripleo_role_name == '{{role.name}}'
2020-02-21 12:10:02 +00:00
tags:
- always
ffu: Add fast-forward upgrade outputs to RoleConfig
As outlined in the spec, fast-forward upgrades aim to take an
environment from an initial release of N to a release of N>=2, beyond
that of the traditionally supported N+1 upgrade path provided today by
many OpenStack projects.
For TripleO the first phase of this upgrade will be to move the
environment to the release prior to the target release. This will be
achieved by disabling all OpenStack control plane services and then
preforming the minimum number of steps required to upgrade each service
through each release until finally reaching the target release.
This change introduces the framework for this phase of the fast-forward
upgrades by adding playbooks and task files as outputs to RoleConfig.
- fast_forward_upgrade_playbook.yaml
This is the top level play and acts as the outer loop of the process,
iterating through the required releases as set by the
FastForwardUpgradeReleases parameter for the fast-forward section of the
upgrade. This currently defaults to Ocata and Pike for Queens.
Note that this play is run against the overcloud host group and it is
currently assumed that the inventory used to run this play is provided
by the tripleo-ansible-inventory command.
- fast_forward_upgrade_release_tasks.yaml
This output simply imports the top level prep and bootstrap task files.
- fast_forward_upgrade_prep_tasks.yaml
- fast_forward_upgrade_bootstrap_tasks.yaml
These outputs act as the inner loop for the fast-forward upgrade phase,
iterating over step values while importing their associated role tasks.
As prep tasks are carried out first for each release we loop over step
values starting at 0 and ending at the defined
fast_forward_upgrade_prep_steps_max, currently 3.
Following this we then complete the bootstrap tasks for each release,
looping over steps values starting at
fast_forward_upgrade_prep_steps_max + 1 , currently 4 and ending at
fast_forward_upgrade_steps_max,currently 9.
- fast_forward_upgrade_prep_role_tasks.yaml
- fast_forward_upgrade_bootstrap_role_tasks.yaml
These outputs then finally import the fast_forward_upgrade_tasks files
generated by the FastForwardUpgradeTasks YAQL query for each role. For
prep tasks these are always included when on an Ansible host of a given
role. This differs from bootstrap tasks that are only included for the
first host associated with a given role.
This will result in the following order of task imports with their
associated value of release and step:
fast_forward_upgrade_playbook
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=ocata
\_fast_forward_upgrade_prep_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=3
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=ocata
\_fast_forward_upgrade_bootstrap_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=N
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=N
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=pike
\_fast_forward_upgrade_prep_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=3
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=pike
\_fast_forward_upgrade_bootstrap_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=N
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=N
bp fast-forward-upgrades
Change-Id: Ie2683fd7b81167abe724a7b9245bf85a0a87ad1d
2017-08-25 14:25:08 +01:00
{%- endfor %}
fast_forward_upgrade_bootstrap_tasks: |
- include_tasks: fast_forward_upgrade_bootstrap_role_tasks.yaml
with_sequence: start={{fast_forward_upgrade_prep_steps_max+1}} end={{fast_forward_upgrade_steps_max}}
loop_control:
loop_var: step
fast_forward_upgrade_bootstrap_role_tasks: |
{%- for role in roles %}
- include_tasks: {{role.name}}/fast_forward_upgrade_tasks.yaml
2019-02-25 19:18:09 +01:00
when:
- tripleo_role_name == '{{role.name}}'
- is_bootstrap_node|bool
2020-02-21 12:10:02 +00:00
tags:
- always
ffu: Add fast-forward upgrade outputs to RoleConfig
As outlined in the spec, fast-forward upgrades aim to take an
environment from an initial release of N to a release of N>=2, beyond
that of the traditionally supported N+1 upgrade path provided today by
many OpenStack projects.
For TripleO the first phase of this upgrade will be to move the
environment to the release prior to the target release. This will be
achieved by disabling all OpenStack control plane services and then
preforming the minimum number of steps required to upgrade each service
through each release until finally reaching the target release.
This change introduces the framework for this phase of the fast-forward
upgrades by adding playbooks and task files as outputs to RoleConfig.
- fast_forward_upgrade_playbook.yaml
This is the top level play and acts as the outer loop of the process,
iterating through the required releases as set by the
FastForwardUpgradeReleases parameter for the fast-forward section of the
upgrade. This currently defaults to Ocata and Pike for Queens.
Note that this play is run against the overcloud host group and it is
currently assumed that the inventory used to run this play is provided
by the tripleo-ansible-inventory command.
- fast_forward_upgrade_release_tasks.yaml
This output simply imports the top level prep and bootstrap task files.
- fast_forward_upgrade_prep_tasks.yaml
- fast_forward_upgrade_bootstrap_tasks.yaml
These outputs act as the inner loop for the fast-forward upgrade phase,
iterating over step values while importing their associated role tasks.
As prep tasks are carried out first for each release we loop over step
values starting at 0 and ending at the defined
fast_forward_upgrade_prep_steps_max, currently 3.
Following this we then complete the bootstrap tasks for each release,
looping over steps values starting at
fast_forward_upgrade_prep_steps_max + 1 , currently 4 and ending at
fast_forward_upgrade_steps_max,currently 9.
- fast_forward_upgrade_prep_role_tasks.yaml
- fast_forward_upgrade_bootstrap_role_tasks.yaml
These outputs then finally import the fast_forward_upgrade_tasks files
generated by the FastForwardUpgradeTasks YAQL query for each role. For
prep tasks these are always included when on an Ansible host of a given
role. This differs from bootstrap tasks that are only included for the
first host associated with a given role.
This will result in the following order of task imports with their
associated value of release and step:
fast_forward_upgrade_playbook
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=ocata
\_fast_forward_upgrade_prep_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=0
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=1
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=2
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=3
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=ocata
\_fast_forward_upgrade_bootstrap_role_tasks - release=ocata
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=4
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=5
\_$roleA/fast_forward_upgrade_tasks - release=ocata, step=N
\_$roleB/fast_forward_upgrade_tasks - release=ocata, step=N
\_fast_forward_upgrade_release_tasks
\_fast_forward_upgrade_prep_tasks - release=pike
\_fast_forward_upgrade_prep_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=0
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=1
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=2
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=3
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=3
\_fast_forward_upgrade_bootstrap_tasks - release=pike
\_fast_forward_upgrade_bootstrap_role_tasks - release=pike
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=4
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=5
\_$roleA/fast_forward_upgrade_tasks - release=pike, step=N
\_$roleB/fast_forward_upgrade_tasks - release=pike, step=N
bp fast-forward-upgrades
Change-Id: Ie2683fd7b81167abe724a7b9245bf85a0a87ad1d
2017-08-25 14:25:08 +01:00
{%- endfor %}
2018-01-23 22:43:49 +05:30
post_update_steps_tasks: |
{%- for role in roles %}
2020-02-21 12:10:02 +00:00
- include_tasks: {{role.name}}/post_update_tasks.yaml
2018-05-14 11:15:09 -07:00
when: tripleo_role_name == '{{role.name}}'
2020-02-21 12:10:02 +00:00
tags:
- always
2018-01-23 22:43:49 +05:30
{%- endfor %}