Skip to content

Commit

Permalink
zuul: overall improvements (#1911)
Browse files Browse the repository at this point in the history
* use local registry
* disable ARA
* also test upgrades with latest tags
* disable jobs that are already parts of other jobs
* cleanup some deploy scripts
* always deploy monitoring services
* disable periodic jobs on external clouds

Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt committed Dec 22, 2023
1 parent 54e2486 commit 2fc95e8
Show file tree
Hide file tree
Showing 19 changed files with 98 additions and 260 deletions.
56 changes: 10 additions & 46 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
name: testbed-deploy-stable
parent: testbed-abstract-deploy
vars:
docker_namespace_kolla: "kolla/release"
manager_version: "6.0.2"
refstack: true

Expand All @@ -113,42 +112,10 @@
parent: testbed-abstract-deploy
run: playbooks/upgrade-stable.yml
vars:
docker_namespace_kolla: "kolla/release"
docker_namespace_kolla_next: "kolla/release"
manager_version: 5.3.0
manager_version_next: 6.0.2
nodeset: testbed-orchestrator

- job:
name: testbed-update-stable
parent: testbed-abstract-deploy
run: playbooks/upgrade-stable.yml
vars:
docker_namespace_kolla: "kolla/release"
docker_namespace_kolla_next: "kolla"
manager_version: 6.0.2
# NOTE: Update to the rolling tag to always ensure that an update to
# the next release will be possible.
manager_version_next: latest
# NOTE: Make sure that the Ceph and OpenStack version does not change
# when we go to the latest tag of the manager. This can happen
# if we have already switched to the next OpenStack release by
# default in latest, for example. As long as we are still working
# with the major releases this has to stay here.
ceph_version_next: quincy
openstack_version_next: 2023.1
nodeset: testbed-orchestrator

- job:
name: testbed-upgrade-ceph
parent: testbed-upgrade
run: playbooks/upgrade-ceph.yml

- job:
name: testbed-deploy-ceph
parent: testbed-abstract-deploy
run: playbooks/deploy-ceph.yml

- job:
name: testbed-deploy-cleura
parent: testbed-abstract-deploy
Expand Down Expand Up @@ -190,11 +157,8 @@
label:
jobs:
- testbed-deploy
- testbed-deploy-ceph
- testbed-deploy-stable
- testbed-update-stable
- testbed-upgrade
- testbed-upgrade-ceph
- testbed-upgrade-stable
gate:
jobs:
Expand All @@ -206,20 +170,20 @@
branches: main
- testbed-deploy-stable:
branches: main
post:
jobs:
- testbed-deploy-managerless
# - testbed-deploy-stable
# post:
# jobs:
# - testbed-deploy-stable
periodic-daily:
jobs:
- testbed-deploy-cleura
- testbed-deploy-pco
- testbed-deploy-managerless
- testbed-deploy-stable
- testbed-deploy-wavestack
- testbed-upgrade-cleura
- testbed-upgrade-pco
- testbed-upgrade-stable
- testbed-upgrade-wavestack
# - testbed-deploy-cleura
# - testbed-deploy-pco
# - testbed-deploy-wavestack
# - testbed-upgrade-cleura
# - testbed-upgrade-pco
# - testbed-upgrade-wavestack
- ansible-lint
- flake8
- python-black
Expand Down
28 changes: 27 additions & 1 deletion ansible/manager-part-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
operator_user: dragon
repo_path: /home/ubuntu/src/github.com
version_manager: latest
is_zuul: false

tasks:
- name: Copy SSH public key
Expand Down Expand Up @@ -50,13 +51,38 @@

# shell required because of: command module does not accept
# setting environment variables inline.
- name: Sync testbed repo with generics # noqa: command-instead-of-shell
- name: Sync configuration with generics # noqa: command-instead-of-shell
ansible.builtin.shell:
chdir: /opt/configuration
cmd: MANAGER_VERSION={{ version_manager }} gilt overlay
when: version_manager != "latest"
changed_when: true

- name: Set docker registries
ansible.builtin.command:
cmd: /opt/configuration/scripts/set-docker-registry.sh
changed_when: true

- name: Set docker namespace for kolla (when working with stable tags)
ansible.builtin.lineinfile:
path: /opt/configuration/environments/kolla/configuration.yml
regexp: "^docker_namespace"
line: "docker_namespace: kolla/release"
when:
- is_zuul|bool
- version_manager != "latest"
changed_when: true

- name: Set docker namespace for kolla (when working with latest tags)
ansible.builtin.lineinfile:
path: /opt/configuration/environments/kolla/configuration.yml
regexp: "^docker_namespace"
line: "docker_namespace: kolla"
when:
- is_zuul|bool
- version_manager == "latest"
changed_when: true

- name: Copy testbed crt
become: true
ansible.builtin.copy:
Expand Down
2 changes: 1 addition & 1 deletion environments/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ docker_opts:

ceph_docker_registry: quay.io
docker_registry: index.docker.io
docker_registry_ansible: osism.harbor.regio.digital
docker_registry_ansible: quay.io
docker_registry_kolla: quay.io
docker_registry_netbox: quay.io

Expand Down
135 changes: 0 additions & 135 deletions playbooks/deploy-ceph.yml

This file was deleted.

8 changes: 5 additions & 3 deletions playbooks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,21 @@
- name: Set facts (Zuul deployment)
ansible.builtin.set_fact:
cloud_env: "{{ cloud_envs[hostvars[groups['all'][0]]['nodepool']['label']] }}"
is_zuul: true
terragrunt_tfpath: "{{ ansible_user_dir }}/.local/bin/terraform"
when: "'nodepool' in hostvars[groups['all'][0]]"

- name: Set facts (local deployment)
ansible.builtin.set_fact:
cloud_env: "{{ testbed_environment | default('ci') }}"
is_zuul: false
terragrunt_tfpath: terraform
when: "'nodepool' not in hostvars[groups['all'][0]]"

- name: Create infrastructure (latest)
ansible.builtin.command:
chdir: "{{ terraform_path }}"
cmd: make ENVIRONMENT={{ cloud_env }} TERRAFORM={{ terraform_binary }} VERSION_CEPH={{ version_ceph }} VERSION_MANAGER={{ version_manager }} VERSION_OPENSTACK={{ version_openstack }} REFSTACK={{ run_refstack | lower }} create
cmd: make ENVIRONMENT={{ cloud_env }} TERRAFORM={{ terraform_binary }} VERSION_CEPH={{ version_ceph }} VERSION_MANAGER={{ version_manager }} VERSION_OPENSTACK={{ version_openstack }} REFSTACK={{ run_refstack | lower }} IS_ZUUL={{ is_zuul | lower }} create
when:
- not manual_create | bool
- version_manager == "latest"
Expand All @@ -54,7 +56,7 @@
- name: Create infrastructure (stable)
ansible.builtin.command:
chdir: "{{ terraform_path }}"
cmd: make ENVIRONMENT={{ cloud_env }} TERRAFORM={{ terraform_binary }} VERSION_MANAGER={{ version_manager }} REFSTACK={{ run_refstack | lower }} create
cmd: make ENVIRONMENT={{ cloud_env }} TERRAFORM={{ terraform_binary }} VERSION_MANAGER={{ version_manager }} REFSTACK={{ run_refstack | lower }} IS_ZUUL={{ is_zuul | lower }} create
when:
- not manual_create | bool
- version_manager != "latest"
Expand Down Expand Up @@ -126,7 +128,7 @@
ansible.builtin.shell:
chdir: "{{ ansible_path }}"
cmd: |
{{ ansible_playbook }} -i {{ terraform_path }}/inventory.{{ cloud_env }} --key-file {{ terraform_path }}/.id_rsa.{{ cloud_env }} manager-part-1.yml -e cloud_env={{ cloud_env }} -e repo_path={{ repo_path }} -e version_manager={{ version_manager }}
{{ ansible_playbook }} -i {{ terraform_path }}/inventory.{{ cloud_env }} --key-file {{ terraform_path }}/.id_rsa.{{ cloud_env }} manager-part-1.yml -e cloud_env={{ cloud_env }} -e repo_path={{ repo_path }} -e version_manager={{ version_manager }} -e is_zuul={{ is_zuul }}
changed_when: true

# NOTE: Errors are ignored as the connection is lost immediately
Expand Down
42 changes: 0 additions & 42 deletions playbooks/upgrade-ceph.yml

This file was deleted.

4 changes: 2 additions & 2 deletions playbooks/upgrade-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
ansible.builtin.import_playbook: deploy.yml
vars:
version_manager: "{{ manager_version | default('latest') }}"

run_bootstrap: false

- name: Upgrade testbed
Expand All @@ -28,6 +27,7 @@
- name: Set cloud_env fact (Zuul deployment)
ansible.builtin.set_fact:
cloud_env: "{{ cloud_envs[hostvars[groups['all'][0]]['nodepool']['label']] }}"
kolla_namespace: "kolla/release"
when: "'nodepool' in hostvars[groups['all'][0]]"

- name: Set cloud_env fact (local deployment)
Expand All @@ -38,7 +38,7 @@
- name: Run upgrade
ansible.builtin.command:
chdir: "{{ terraform_path }}"
cmd: make ENVIRONMENT={{ cloud_env }} VERSION_MANAGER={{ version_manager_next }} VERSION_CEPH={{ version_ceph_next }} VERSION_OPENSTACK={{ version_openstack_next }} upgrade
cmd: make ENVIRONMENT={{ cloud_env }} VERSION_MANAGER={{ version_manager_next }} VERSION_CEPH={{ version_ceph_next }} VERSION_OPENSTACK={{ version_openstack_next }} KOLLA_NAMESPACE={{ kolla_namespace | default("osism") }} upgrade
changed_when: true

- name: Bootstrap services
Expand Down
Loading

0 comments on commit 2fc95e8

Please sign in to comment.