Skip to content

Commit 2fc95e8

Browse files
authored
zuul: overall improvements (#1911)
* 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]>
1 parent 54e2486 commit 2fc95e8

19 files changed

+98
-260
lines changed

.zuul.yaml

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
name: testbed-deploy-stable
105105
parent: testbed-abstract-deploy
106106
vars:
107-
docker_namespace_kolla: "kolla/release"
108107
manager_version: "6.0.2"
109108
refstack: true
110109

@@ -113,42 +112,10 @@
113112
parent: testbed-abstract-deploy
114113
run: playbooks/upgrade-stable.yml
115114
vars:
116-
docker_namespace_kolla: "kolla/release"
117-
docker_namespace_kolla_next: "kolla/release"
118115
manager_version: 5.3.0
119116
manager_version_next: 6.0.2
120117
nodeset: testbed-orchestrator
121118

122-
- job:
123-
name: testbed-update-stable
124-
parent: testbed-abstract-deploy
125-
run: playbooks/upgrade-stable.yml
126-
vars:
127-
docker_namespace_kolla: "kolla/release"
128-
docker_namespace_kolla_next: "kolla"
129-
manager_version: 6.0.2
130-
# NOTE: Update to the rolling tag to always ensure that an update to
131-
# the next release will be possible.
132-
manager_version_next: latest
133-
# NOTE: Make sure that the Ceph and OpenStack version does not change
134-
# when we go to the latest tag of the manager. This can happen
135-
# if we have already switched to the next OpenStack release by
136-
# default in latest, for example. As long as we are still working
137-
# with the major releases this has to stay here.
138-
ceph_version_next: quincy
139-
openstack_version_next: 2023.1
140-
nodeset: testbed-orchestrator
141-
142-
- job:
143-
name: testbed-upgrade-ceph
144-
parent: testbed-upgrade
145-
run: playbooks/upgrade-ceph.yml
146-
147-
- job:
148-
name: testbed-deploy-ceph
149-
parent: testbed-abstract-deploy
150-
run: playbooks/deploy-ceph.yml
151-
152119
- job:
153120
name: testbed-deploy-cleura
154121
parent: testbed-abstract-deploy
@@ -190,11 +157,8 @@
190157
label:
191158
jobs:
192159
- testbed-deploy
193-
- testbed-deploy-ceph
194160
- testbed-deploy-stable
195-
- testbed-update-stable
196161
- testbed-upgrade
197-
- testbed-upgrade-ceph
198162
- testbed-upgrade-stable
199163
gate:
200164
jobs:
@@ -206,20 +170,20 @@
206170
branches: main
207171
- testbed-deploy-stable:
208172
branches: main
209-
post:
210-
jobs:
211-
- testbed-deploy-managerless
212-
# - testbed-deploy-stable
173+
# post:
174+
# jobs:
175+
# - testbed-deploy-stable
213176
periodic-daily:
214177
jobs:
215-
- testbed-deploy-cleura
216-
- testbed-deploy-pco
178+
- testbed-deploy-managerless
217179
- testbed-deploy-stable
218-
- testbed-deploy-wavestack
219-
- testbed-upgrade-cleura
220-
- testbed-upgrade-pco
221180
- testbed-upgrade-stable
222-
- testbed-upgrade-wavestack
181+
# - testbed-deploy-cleura
182+
# - testbed-deploy-pco
183+
# - testbed-deploy-wavestack
184+
# - testbed-upgrade-cleura
185+
# - testbed-upgrade-pco
186+
# - testbed-upgrade-wavestack
223187
- ansible-lint
224188
- flake8
225189
- python-black

ansible/manager-part-1.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
operator_user: dragon
99
repo_path: /home/ubuntu/src/github.com
1010
version_manager: latest
11+
is_zuul: false
1112

1213
tasks:
1314
- name: Copy SSH public key
@@ -50,13 +51,38 @@
5051

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

61+
- name: Set docker registries
62+
ansible.builtin.command:
63+
cmd: /opt/configuration/scripts/set-docker-registry.sh
64+
changed_when: true
65+
66+
- name: Set docker namespace for kolla (when working with stable tags)
67+
ansible.builtin.lineinfile:
68+
path: /opt/configuration/environments/kolla/configuration.yml
69+
regexp: "^docker_namespace"
70+
line: "docker_namespace: kolla/release"
71+
when:
72+
- is_zuul|bool
73+
- version_manager != "latest"
74+
changed_when: true
75+
76+
- name: Set docker namespace for kolla (when working with latest tags)
77+
ansible.builtin.lineinfile:
78+
path: /opt/configuration/environments/kolla/configuration.yml
79+
regexp: "^docker_namespace"
80+
line: "docker_namespace: kolla"
81+
when:
82+
- is_zuul|bool
83+
- version_manager == "latest"
84+
changed_when: true
85+
6086
- name: Copy testbed crt
6187
become: true
6288
ansible.builtin.copy:

environments/configuration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ docker_opts:
1919

2020
ceph_docker_registry: quay.io
2121
docker_registry: index.docker.io
22-
docker_registry_ansible: osism.harbor.regio.digital
22+
docker_registry_ansible: quay.io
2323
docker_registry_kolla: quay.io
2424
docker_registry_netbox: quay.io
2525

playbooks/deploy-ceph.yml

Lines changed: 0 additions & 135 deletions
This file was deleted.

playbooks/deploy.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,21 @@
3131
- name: Set facts (Zuul deployment)
3232
ansible.builtin.set_fact:
3333
cloud_env: "{{ cloud_envs[hostvars[groups['all'][0]]['nodepool']['label']] }}"
34+
is_zuul: true
3435
terragrunt_tfpath: "{{ ansible_user_dir }}/.local/bin/terraform"
3536
when: "'nodepool' in hostvars[groups['all'][0]]"
3637

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

4345
- name: Create infrastructure (latest)
4446
ansible.builtin.command:
4547
chdir: "{{ terraform_path }}"
46-
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
48+
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
4749
when:
4850
- not manual_create | bool
4951
- version_manager == "latest"
@@ -54,7 +56,7 @@
5456
- name: Create infrastructure (stable)
5557
ansible.builtin.command:
5658
chdir: "{{ terraform_path }}"
57-
cmd: make ENVIRONMENT={{ cloud_env }} TERRAFORM={{ terraform_binary }} VERSION_MANAGER={{ version_manager }} REFSTACK={{ run_refstack | lower }} create
59+
cmd: make ENVIRONMENT={{ cloud_env }} TERRAFORM={{ terraform_binary }} VERSION_MANAGER={{ version_manager }} REFSTACK={{ run_refstack | lower }} IS_ZUUL={{ is_zuul | lower }} create
5860
when:
5961
- not manual_create | bool
6062
- version_manager != "latest"
@@ -126,7 +128,7 @@
126128
ansible.builtin.shell:
127129
chdir: "{{ ansible_path }}"
128130
cmd: |
129-
{{ 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 }}
131+
{{ 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 }}
130132
changed_when: true
131133

132134
# NOTE: Errors are ignored as the connection is lost immediately

playbooks/upgrade-ceph.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

playbooks/upgrade-stable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
ansible.builtin.import_playbook: deploy.yml
44
vars:
55
version_manager: "{{ manager_version | default('latest') }}"
6-
76
run_bootstrap: false
87

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

3333
- name: Set cloud_env fact (local deployment)
@@ -38,7 +38,7 @@
3838
- name: Run upgrade
3939
ansible.builtin.command:
4040
chdir: "{{ terraform_path }}"
41-
cmd: make ENVIRONMENT={{ cloud_env }} VERSION_MANAGER={{ version_manager_next }} VERSION_CEPH={{ version_ceph_next }} VERSION_OPENSTACK={{ version_openstack_next }} upgrade
41+
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
4242
changed_when: true
4343

4444
- name: Bootstrap services

0 commit comments

Comments
 (0)