Add support for using custom FFU repository scripts

This change adds support for passing custom repository scripts
for the FFU repositories setup. This makes use of the
custom-script option enabled by this change:
https://review.openstack.org/#/c/539503/

Change-Id: I70f348409ddb7773dd68a1022c6f3697bb82b64c
This commit is contained in:
Marius Cornea 2018-02-23 15:01:52 -05:00
parent 7100f56525
commit 8f876f8d2d
5 changed files with 41 additions and 0 deletions

View File

@ -167,3 +167,9 @@ ffu_undercloud_repo_args:
# Tripleo OOOQ variables.
composable_scenario: False
upgrade_composable_scenario: False
## ffu overcloud upgrade
ffu_overcloud_releases: ['ocata', 'pike', 'queens']
## ffu overcloud to use custom scripts instead of tripleo-repos
ffu_overcloud_repo_type: tripleo-repos

View File

@ -149,5 +149,12 @@
ffu_overcloud_upgrade: true
when: install.overcloud.ffu.upgrade
- name: Set overcloud FFU upgrade releases
set_fact:
ffu_overcloud_releases: "{{ install.overcloud.ffu.releases }}"
- name: Set overcloud FFU upgrade repo
set_fact:
ffu_overcloud_repo_type: "{{ install.overcloud.ffu.repo }}"
roles:
- tripleo-upgrade

View File

@ -155,3 +155,20 @@ subparsers:
help: |
Apply FFU upgrade workarounds
default: false
overcloud-ffu-releases:
type: ListValue
help: |
Overcloud FFU upgrade releases
default: 11,12,13
overcloud-ffu-repo:
type: Value
help: |
Overcloud FFU upgrade repository method
default: 'rhos-release'
- title: Set up FFU packages
options:
mirror:
type: Value
help: |
Enable usage of specified mirror (for rpm, pip etc) [brq,qeos,tlv - or hostname].
(Specified mirror needs to proxy multiple rpm source hosts and pypi packages.)

View File

@ -40,6 +40,12 @@
set_fact:
deployment_with_ha: "{{ is_upstream.rc == 0 and pacemaker_present.rc == 0 }}"
- name: Create FFU custom repos environment
template:
src: fast-forward-upgrade/ffu_repos.yaml.j2
dest: "{{working_dir}}/ffu_repos.yaml"
when: "'tripleo-repos' not in ffu_overcloud_repo_type"
- name: create ffu overcloud upgrade scripts
include: ../upgrade/step_upgrade.yml
loop_control:
@ -52,6 +58,7 @@
- "{% if upstream_container_images and deployment_with_ha %}{{ tht_directory }}/environments/docker-ha.yaml{% endif %}"
- "{{ working_dir}}/{{ container_registry_file }}"
- "{{ tht_directory }}/environments/fast-forward-upgrade.yaml"
- "{% if 'tripleo-repos' not in ffu_overcloud_repo_type %}{{working_dir}}/ffu_repos.yaml{% endif %}"
- "{{ tht_directory }}/environments/config-download-environment.yaml"
- name: Adjust ffu scenario file.

View File

@ -0,0 +1,4 @@
parameter_defaults:
FastForwardRepoType: custom-script
FastForwardCustomRepoScriptContent: |
{{ ffu_repo_script | default('') | indent(4) }}