@@ -3,22 +3,10 @@ name: Upload overcloud host images
3
3
on :
4
4
workflow_dispatch :
5
5
inputs :
6
- centos :
7
- description : Upload CentOS Stream 8
8
- type : boolean
9
- default : true
10
- rocky8 :
11
- description : Upload Rocky Linux 8
12
- type : boolean
13
- default : true
14
6
rocky9 :
15
7
description : Upload Rocky Linux 9
16
8
type : boolean
17
9
default : true
18
- ubuntu-focal :
19
- description : Upload Ubuntu 20.04 Focal
20
- type : boolean
21
- default : true
22
10
ubuntu-jammy :
23
11
description : Upload Ubuntu 22.04 Jammy
24
12
type : boolean
94
82
source venvs/kayobe/bin/activate &&
95
83
pip install python-openstackclient -c https://opendev.org/openstack/requirements/raw/branch/stable/zed/upper-constraints.txt
96
84
97
- - name : Output CentOS Stream 8 image tag
98
- id : centos_8_stream_image_tag
99
- run : |
100
- echo image_tag=$(grep stackhpc_centos_8_stream_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
101
-
102
- - name : Check if image exists already
103
- id : centos_8_stream_image_exists
104
- run : |
105
- source venvs/kayobe/bin/activate &&
106
- openstack image show \
107
- overcloud-centos-8-stream-${{ steps.centos_8_stream_image_tag.outputs.image_tag }}
108
- env :
109
- OS_CLOUD : openstack
110
- OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
111
- OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
112
- continue-on-error : true
113
-
114
- - name : Download CentOS Stream 8 overcloud host image from Ark
115
- run : |
116
- source venvs/kayobe/bin/activate &&
117
- source src/kayobe-config/kayobe-env --environment ${{ inputs.kayobe-environment }} &&
118
- kayobe playbook run \
119
- src/kayobe-config/etc/kayobe/ansible/pulp-host-image-download.yml \
120
- -e os_distribution="centos" \
121
- -e os_release="8-stream"
122
- env :
123
- KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
124
- if : inputs.centos && steps.centos_8_stream_image_exists.outcome == 'failure'
125
-
126
- - name : Upload CentOS Stream 8 overcloud host image to Cloud
127
- run : |
128
- source venvs/kayobe/bin/activate &&
129
- openstack image create \
130
- overcloud-centos-8-stream-${{ steps.centos_8_stream_image_tag.outputs.image_tag }} \
131
- --container-format bare \
132
- --disk-format qcow2 \
133
- --file /tmp/centos-8-stream.qcow2 \
134
- --private \
135
- --progress
136
- env :
137
- OS_CLOUD : openstack
138
- OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
139
- OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
140
- if : inputs.centos && steps.centos_8_stream_image_exists.outcome == 'failure'
141
-
142
- - name : Output Rocky Linux 8 image tag
143
- id : rocky_8_image_tag
144
- run : |
145
- echo image_tag=$(grep stackhpc_rocky_8_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
146
-
147
- - name : Check if image exists already
148
- id : rocky_8_image_exists
149
- run : |
150
- source venvs/kayobe/bin/activate &&
151
- openstack image show \
152
- overcloud-rocky-8-${{ steps.rocky_8_image_tag.outputs.image_tag }}
153
- env :
154
- OS_CLOUD : openstack
155
- OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
156
- OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
157
- continue-on-error : true
158
-
159
- - name : Download Rocky Linux 8 overcloud host image from Ark
160
- run : |
161
- source venvs/kayobe/bin/activate &&
162
- source src/kayobe-config/kayobe-env --environment ${{ inputs.kayobe-environment }} &&
163
- kayobe playbook run \
164
- src/kayobe-config/etc/kayobe/ansible/pulp-host-image-download.yml \
165
- -e os_distribution="rocky" \
166
- -e os_release="8"
167
- env :
168
- KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
169
- if : inputs.rocky8 && steps.rocky_8_image_exists.outcome == 'failure'
170
-
171
- - name : Upload Rocky Linux 8 overcloud host image to Cloud
172
- run : |
173
- source venvs/kayobe/bin/activate &&
174
- openstack image create \
175
- overcloud-rocky-8-${{ steps.rocky_8_image_tag.outputs.image_tag }} \
176
- --container-format bare \
177
- --disk-format qcow2 \
178
- --file /tmp/rocky-8.qcow2 \
179
- --private \
180
- --progress
181
- env :
182
- OS_CLOUD : openstack
183
- OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
184
- OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
185
- if : inputs.rocky8 && steps.rocky_8_image_exists.outcome == 'failure'
186
-
187
85
- name : Output Rocky Linux 9 image tag
188
86
id : rocky_9_image_tag
189
87
run : |
@@ -229,51 +127,6 @@ jobs:
229
127
OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
230
128
if : inputs.rocky9 && steps.rocky_9_image_exists.outcome == 'failure'
231
129
232
- - name : Output Ubuntu Focal image tag
233
- id : ubuntu_focal_image_tag
234
- run : |
235
- echo image_tag=$(grep stackhpc_ubuntu_focal_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
236
-
237
- - name : Check if image exists already
238
- id : ubuntu_focal_image_exists
239
- run : |
240
- source venvs/kayobe/bin/activate &&
241
- openstack image show \
242
- overcloud-ubuntu-focal-${{ steps.ubuntu_focal_image_tag.outputs.image_tag }}
243
- env :
244
- OS_CLOUD : openstack
245
- OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
246
- OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
247
- continue-on-error : true
248
-
249
- - name : Download Ubuntu Focal 20.04 overcloud host image from Ark
250
- run : |
251
- source venvs/kayobe/bin/activate &&
252
- source src/kayobe-config/kayobe-env --environment ${{ inputs.kayobe-environment }} &&
253
- kayobe playbook run \
254
- src/kayobe-config/etc/kayobe/ansible/pulp-host-image-download.yml \
255
- -e os_distribution="ubuntu" \
256
- -e os_release="focal"
257
- env :
258
- KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
259
- if : inputs.ubuntu-focal && steps.ubuntu_focal_image_exists.outcome == 'failure'
260
-
261
- - name : Upload Ubuntu Focal 20.04 overcloud host image to Cloud
262
- run : |
263
- source venvs/kayobe/bin/activate &&
264
- openstack image create \
265
- overcloud-ubuntu-focal-${{ steps.ubuntu_focal_image_tag.outputs.image_tag }} \
266
- --container-format bare \
267
- --disk-format qcow2 \
268
- --file /tmp/ubuntu-focal.qcow2 \
269
- --private \
270
- --progress
271
- env :
272
- OS_CLOUD : openstack
273
- OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
274
- OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
275
- if : inputs.ubuntu-focal && steps.ubuntu_focal_image_exists.outcome == 'failure'
276
-
277
130
- name : Output Ubuntu Jammy image tag
278
131
id : ubuntu_jammy_image_tag
279
132
run : |
0 commit comments