openstack-ansible/zuul.d/playbooks/pre-osa-aio.yml
Jonathan Rosser b3932f0e82 Use zuul cached repos for openstack services
In CI there are cached repos for the openstack services as well as
the OSA repos. We are currently using the cached repos for OSA ansible
roles, but not for the wider openstack services which are installed
from specific git repository SHA as defined by
playbooks/defaults/repo_packages/openstack_services.yml.

This patch parses the openstack_services.yml file and generates a
set of OSA override variables to use the locally cached git repos
instead of those at opendev.org. Network traffic is reduced and the
impact of OSA jobs on the opendev git servers is eased which has
caused problems when the proposal bot makes changes to all OSA repos
simultaneously.

Depends-On: https://review.opendev.org/712459
Change-Id: I88087e3b4d6a688670e40165f127049956705801
2020-03-13 18:09:47 +00:00

51 lines
1.8 KiB
YAML

---
# Copyright 2019, Logan Vig <logan2211@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Bootstrap the OSA AIO
hosts: all[0]
vars_files:
- "{{ zuul.executor.work_root }}/osa-gate-scenario.yml"
vars:
_zuul_src_path: "{{ ansible_user_dir }}/src"
tasks:
- name: Run bootstrap-ansible script
become: yes
become_user: root
shell: scripts/bootstrap-ansible.sh
args:
chdir: "src/opendev.org/openstack/openstack-ansible"
executable: /bin/bash
environment:
# ZUUL_SRC_PATH is used by tests/get-ansible-role-requirements to
# where the CI provided git sources were cloned.
ZUUL_SRC_PATH: "{{ _zuul_src_path }}"
ANSIBLE_PACKAGE: "{{ ansible_package | default('') }}"
SETUP_ARA: 'true'
when: action != 'upgrade'
- name: Run bootstrap-aio script
become: yes
become_user: root
shell: scripts/bootstrap-aio.sh
args:
chdir: "src/opendev.org/openstack/openstack-ansible"
executable: /bin/bash
environment:
# ZUUL_SRC_PATH is used by tests/roles/bootstrap-host
# symlink the zuul roles into /openstack/src
ZUUL_SRC_PATH: "{{ _zuul_src_path }}"
SCENARIO: "{{ scenario }}"
ACTION: "{{ action }}"
INSTALL_METHOD: "{{ install_method }}"
when: action != 'upgrade'