Skip to content

Commit ea8cb1b

Browse files
committed
Merge tag '0.7.2' into 0.7.2-sync
2 parents 8616f73 + a558b2b commit ea8cb1b

File tree

23 files changed

+383
-168
lines changed

23 files changed

+383
-168
lines changed

.github/environments/arcus-ha/inventory/group_vars/all/variables.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ infra_fixed_floatingip:
66
capi_cluster_addons_ingress_load_balancer_ip: "{{ lookup('env', 'INGRESS_IP') }}"
77

88
# Flavor auto-detection picks the wrong flavors on Arcus, so override them
9-
# The flavor to use for the seed VM (vm.ska.cpu.general.small)
10-
infra_flavor_id: c8b72062-5d52-4590-9d7a-68a670b44442
9+
# The flavor to use for the seed VM
10+
infra_flavor_id: >-
11+
{{ lookup('pipe', 'openstack flavor show vm.azimuth.ci.ec1.medium -f value -c id') }}
1112
# The flavor to use for the control plane nodes
12-
capi_cluster_control_plane_flavor: vm.ska.cpu.general.small
13+
capi_cluster_control_plane_flavor: vm.azimuth.ci.ec1.medium
1314
# The flavor to use for worker nodes
14-
capi_cluster_worker_flavor: vm.ska.cpu.general.small
15+
capi_cluster_worker_flavor: vm.azimuth.ci.en1.medium
1516

1617
# Although this is a "HA" test, what we are really testing is the spawning
1718
# of the CAPI cluster and deployment of Azimuth onto that
18-
# We have also preferred to use 3 small workers rather than 1 or 2 eighth workers,
19-
# as they are more likely to fit in the gaps between other workloads
20-
# So one control plane node and two workers is sufficient for that
19+
# So one control plane node is sufficient for that
2120
capi_cluster_control_plane_count: 1
22-
capi_cluster_worker_count: 3
21+
capi_cluster_worker_count: 2
2322

2423
# Use a single replica for Consul
2524
# The risk of failed upgrades is too great, and it is going away soon
@@ -34,4 +33,4 @@ velero_backup_schedule_name: default
3433
velero_backup_schedule_timings: "0 0 * * *"
3534
velero_backup_schedule_ttl: "168h"
3635
velero_aws_access_key_id: required-but-not-used
37-
velero_aws_secret_access_key : required-but-not-used
36+
velero_aws_secret_access_key : required-but-not-used

.github/environments/arcus/inventory/group_vars/all/variables.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ infra_network_id: "{{ lookup('pipe', 'openstack network show portal-internal -f
88
infra_fixed_floatingip: "{{ lookup('env', 'INGRESS_IP') }}"
99

1010
# Flavor auto-detection picks the wrong flavors on Arcus, so override them
11-
# The flavor to use for the Azimuth AIO VM (vm.ska.cpu.general.eighth)
12-
infra_flavor_id: 5f9def81-c93f-4c1f-a521-3b810061ff6c
13-
# The flavor to use for the workstation test case (vm.ska.cpu.general.small)
14-
generate_tests_caas_test_case_workstation_param_cluster_flavor: c8b72062-5d52-4590-9d7a-68a670b44442
11+
# The flavor to use for the Azimuth AIO VM
12+
infra_flavor_id: >-
13+
{{ lookup('pipe', 'openstack flavor show vm.azimuth.ci.en1.medium -f value -c id') }}
14+
# The flavor to use for the workstation test case
15+
generate_tests_caas_test_case_workstation_param_cluster_flavor: >-
16+
{{ lookup('pipe', 'openstack flavor show vm.azimuth.ci.ec1.medium -f value -c id') }}
1517
# The flavor to use for the repo2docker test case
1618
generate_tests_caas_test_case_repo2docker_param_cluster_flavor: "{{ generate_tests_caas_test_case_workstation_param_cluster_flavor }}"
1719
# The flavor to use for the R-Studio test case

.github/environments/leafcloud-ha/inventory/group_vars/all/variables.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,14 @@ capi_cluster_addons_csi_cinder_volume_type: unencrypted
3434
# Use a single replica for Consul
3535
# The risk of failed upgrades is too great, and it is going away soon
3636
consul_server_replicas: 1
37+
38+
# Enable Velero just to check that installation works
39+
velero_enabled: true
40+
velero_s3_url: https://required-but-not-used.com
41+
velero_bucket_name: not-used
42+
velero_backup_schedule_enabled: true
43+
velero_backup_schedule_name: default
44+
velero_backup_schedule_timings: "0 0 * * *"
45+
velero_backup_schedule_ttl: "168h"
46+
velero_aws_access_key_id: required-but-not-used
47+
velero_aws_secret_access_key : required-but-not-used

.github/workflows/test-full.yml

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,15 @@ jobs:
4747
uses: ./.github/actions/destroy
4848
if: ${{ always() }}
4949

50-
# Tests an Azimuth upgrade from the current latest release
51-
# Currently, this just tests the Azimuth upgrade itself with no appliances
52-
# TODO(mkjpryor) add appliance provisioning and verification before and after upgrade
50+
# Tests an Azimuth upgrade from the current latest release to the code under test
51+
#
52+
# Note that success() and failure() consider *all previous steps*, and continue-on-failure
53+
# prevents the job from being marked as failed if that step fails
54+
# This means that in order to get the execution flow that we want while still resulting in a
55+
# failed job when required, we need to use step ids and the conclusions of specific steps
5356
test_azimuth_upgrade:
54-
needs: [test_clean_ha]
5557
runs-on: ubuntu-latest
58+
needs: [test_clean_ha]
5659
steps:
5760
- name: Get latest tag
5861
id: latest-tag
@@ -87,31 +90,105 @@ jobs:
8790
# So wait a maximum of 3 hours to acquire the lock, leaving 3 hours for other tasks in the job
8891
timeout-minutes: 180
8992

90-
- name: Provision Azimuth
93+
- name: Provision Azimuth at latest tag
9194
uses: ./.actions/.github/actions/provision
9295

96+
- name: Generate test suite
97+
id: generate-tests
98+
run: |
99+
set -e
100+
source ./ci.env
101+
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
102+
ansible-playbook stackhpc.azimuth_ops.generate_tests -e @extra-vars.yml
103+
104+
- name: Create test platforms
105+
id: tests-create
106+
run: |
107+
set -e
108+
source ./ci.env
109+
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
110+
./.actions/bin/run-tests --include create --outputdir reports/create
111+
112+
- name: Verify test platforms
113+
run: |
114+
set -e
115+
source ./ci.env
116+
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
117+
./.actions/bin/run-tests --include verify --outputdir reports/verify-create
118+
if: ${{ !cancelled() && contains(fromJSON('["success", "failure"]'), steps.tests-create.conclusion) }}
119+
93120
- name: Checkout code under test
121+
id: checkout-latest
94122
uses: actions/checkout@v3
95123
with:
96124
# Make sure not to remove working directories
97125
clean: false
126+
if: ${{ !cancelled() && steps.generate-tests.conclusion == 'success' }}
98127

99128
- name: Install updated Python dependencies
129+
id: update-py
100130
run: |
101131
set -e
102132
source ci.env
103133
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
104134
python -m pip install -r requirements.txt
135+
if: ${{ !cancelled() && steps.checkout-latest.conclusion == 'success' }}
105136

106137
- name: Upgrade Ansible dependencies
138+
id: update-ansible
107139
run: |
108140
set -e
109141
source ci.env
110142
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
111143
ansible-galaxy install -f -r requirements.yml
144+
if: ${{ !cancelled() && steps.update-py.conclusion == 'success' }}
112145

113146
- name: Upgrade Azimuth
147+
id: upgrade-azimuth
114148
uses: ./.actions/.github/actions/provision
149+
if: ${{ !cancelled() && steps.update-ansible.conclusion == 'success' }}
150+
151+
- name: Verify test platforms post upgrade
152+
run: |
153+
set -e
154+
source ./ci.env
155+
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
156+
./.actions/bin/run-tests --include verify --outputdir reports/verify-post-upgrade
157+
if: ${{ !cancelled() && steps.upgrade-azimuth.conclusion == 'success' }}
158+
159+
# TODO(mkjpryor) patch/upgrade not implemented in test generation yet
160+
# - name: Upgrade test platforms
161+
# - name: Verify test platforms
162+
163+
- name: Delete test platforms
164+
run: |
165+
set -e
166+
source ./ci.env
167+
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
168+
./.actions/bin/run-tests --include delete --outputdir reports/delete
169+
if: ${{ always() }}
170+
171+
- name: Upload test report artifacts
172+
uses: actions/upload-artifact@v3
173+
with:
174+
name: azimuth-upgrade-test-reports
175+
path: reports/*
176+
if: ${{ always() }}
177+
178+
- name: Create debug bundle
179+
run: |
180+
set -e
181+
source ./ci.env
182+
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
183+
./.actions/bin/create-debug-bundle
184+
if: ${{ always() }}
185+
186+
- name: Upload debug bundle
187+
uses: actions/upload-artifact@v3
188+
with:
189+
name: azimuth-upgrade-debug-bundle
190+
path: debug-bundle.tar.gz
191+
if: ${{ always() }}
115192

116193
- name: Destroy Azimuth
117194
uses: ./.actions/.github/actions/destroy

.gitlab-ci.yml.sample

Lines changed: 17 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,18 @@ deploy_aio:
100100
when: never
101101
# Allow deployments to be manually triggered even when there are no changed files
102102
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "web"
103-
# Run when there is a push to a branch with a merge request that changes one of the relevant files
104-
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "merge_request_event"
105-
changes:
106-
# Files that affect the aio environment
107-
- env
108-
- env.secret
109-
- requirements.yml
110-
- environments/base/**/*
111-
- environments/singlenode/**/*
112-
- environments/site/**/*
113-
- environments/aio/**/*
103+
# Run when there is a push to a branch with a merge request to main
104+
- if: >-
105+
$CI_PIPELINE_SOURCE == "merge_request_event" &&
106+
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
114107
environment:
115108
name: aio/$CI_COMMIT_REF_SLUG
116109
on_stop: stop_aio
117110
variables:
118111
# This is normally taken from the GitLab environment name, but in this case that
119112
# depends on the branch name so we need to be explicit about the config to use
120113
AZIMUTH_CONFIG_ENVIRONMENT: aio
121-
ANSIBLE_FORCE_COLOR: true
114+
ANSIBLE_FORCE_COLOR: "true"
122115
before_script:
123116
- source ./bin/ci-setup
124117
script:
@@ -130,27 +123,17 @@ deploy_aio:
130123
test_aio:
131124
stage: aio_test
132125
rules:
133-
# Do not run for commits to main
134126
- if: $CI_COMMIT_BRANCH == "main"
135127
when: never
136-
# Allow deployments to be manually triggered even when there are no changed files
137128
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "web"
138-
# Run when there is a push to a branch with a merge request that changes one of the relevant files
139-
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "merge_request_event"
140-
changes:
141-
# Files that affect the aio environment
142-
- env
143-
- env.secret
144-
- requirements.yml
145-
- environments/base/**/*
146-
- environments/singlenode/**/*
147-
- environments/site/**/*
148-
- environments/aio/**/*
129+
- if: >-
130+
$CI_PIPELINE_SOURCE == "merge_request_event" &&
131+
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
149132
environment:
150133
name: aio/$CI_COMMIT_REF_SLUG
151134
variables:
152135
AZIMUTH_CONFIG_ENVIRONMENT: aio
153-
ANSIBLE_FORCE_COLOR: true
136+
ANSIBLE_FORCE_COLOR: "true"
154137
before_script:
155138
- source ./bin/ci-setup
156139
script:
@@ -174,16 +157,9 @@ stop_aio:
174157
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "web"
175158
when: manual
176159
allow_failure: true
177-
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "merge_request_event"
178-
changes:
179-
# Files that affect the aio environment
180-
- env
181-
- env.secret
182-
- requirements.yml
183-
- environments/base/**/*
184-
- environments/singlenode/**/*
185-
- environments/site/**/*
186-
- environments/aio/**/*
160+
- if: >-
161+
$CI_PIPELINE_SOURCE == "merge_request_event" &&
162+
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
187163
when: manual
188164
allow_failure: true
189165
environment:
@@ -192,7 +168,7 @@ stop_aio:
192168
variables:
193169
AZIMUTH_CONFIG_ENVIRONMENT: aio
194170
GIT_STRATEGY: none
195-
ANSIBLE_FORCE_COLOR: true
171+
ANSIBLE_FORCE_COLOR: "true"
196172
before_script:
197173
- git clone ${CI_REPOSITORY_URL} ${CI_PROJECT_NAME}
198174
- cd ${CI_PROJECT_NAME}
@@ -232,7 +208,7 @@ deploy_staging:
232208
environment:
233209
name: staging
234210
variables:
235-
ANSIBLE_FORCE_COLOR: true
211+
ANSIBLE_FORCE_COLOR: "true"
236212
before_script:
237213
- source ./bin/ci-setup
238214
script:
@@ -264,7 +240,7 @@ test_staging:
264240
environment:
265241
name: staging
266242
variables:
267-
ANSIBLE_FORCE_COLOR: true
243+
ANSIBLE_FORCE_COLOR: "true"
268244
before_script:
269245
- source ./bin/ci-setup
270246
script:
@@ -305,7 +281,7 @@ deploy_production:
305281
environment:
306282
name: production
307283
variables:
308-
ANSIBLE_FORCE_COLOR: true
284+
ANSIBLE_FORCE_COLOR: "true"
309285
before_script:
310286
- source ./bin/ci-setup
311287
script:
@@ -333,7 +309,7 @@ test_production:
333309
environment:
334310
name: production
335311
variables:
336-
ANSIBLE_FORCE_COLOR: true
312+
ANSIBLE_FORCE_COLOR: "true"
337313
before_script:
338314
- source ./bin/ci-setup
339315
script:

bin/ci-setup

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@ if [ -z "$AZIMUTH_ENVIRONMENT" ]; then
4040
fi
4141

4242
run_apt update
43-
run_apt install -y git python3 python3-pip qemu-utils
43+
run_apt install -y git jq python3 python3-pip qemu-utils software-properties-common zip
44+
45+
if [ "$(id -u)" -eq 0 ]; then
46+
add-apt-repository ppa:mozillateam/ppa
47+
else
48+
sudo add-apt-repository ppa:mozillateam/ppa
49+
fi
50+
51+
run_apt update
52+
run_apt install -y -t 'o=LP-PPA-mozillateam' firefox
4453

4554
pip install -U pip
4655
pip install -r requirements.txt

bin/port-forward

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
#####
4-
## This script sets up a port-forward to the specified Azimuth service, via the K3S
4+
## This script sets up a port-forward to the specified Azimuth service, via the K3s
55
## node for the environment
66
#####
77

docs/configuration/01-prerequisites.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ Currently, Azimuth is able to target OpenStack clouds with the following service
1616
* Amphora and OVN drivers supported
1717

1818
Azimuth has no specific requirement on the version of OpenStack. It is known to work on
19-
on Train release and newer.
19+
the OpenStack Train release and newer.
2020

2121
### Networking
2222

23-
OpenStack projects that are used for Azimuth deployments (infra projects) or into which
24-
Azimuth will deploy platforms on behalf of users (workload projects) require access to a
23+
OpenStack projects that are used for Azimuth deployments (infra projects), or into which
24+
Azimuth will deploy platforms on behalf of users (workload projects), require access to a
2525
network that is shared as `external` in Neutron, on which floating IPs can be allocated.
2626

2727
This network must provide egress to the internet, but does not need to provide ingress

0 commit comments

Comments
 (0)