@@ -84,21 +84,33 @@ jobs:
84
84
EOF
85
85
working-directory : ${{ github.workspace }}/src/kayobe-config/terraform/aio
86
86
87
+ - name : Output image tag
88
+ id : image_tag
89
+ run : |
90
+ echo image_tag=$(grep stackhpc_ubuntu_jammy_overcloud_host_image_version: etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
91
+ working-directory : ${{ github.workspace }}/src/kayobe-config
92
+
93
+ # Use the image override if set, otherwise use overcloud-os_distribution-os_release-tag
94
+ - name : Output image name
95
+ id : image_name
96
+ run : |
97
+ echo image_name=overcloud-ubuntu-jammy-${{ steps.image_tag.outputs.image_tag }} >> $GITHUB_OUTPUT
98
+
87
99
- name : Generate terraform.tfvars
88
100
run : |
89
101
cat << EOF > terraform.tfvars
90
102
ssh_public_key = "id_rsa.pub"
91
103
ssh_username = "ubuntu"
92
- aio_vm_name = "skc-host-image-builder"
93
- # Must be an Ubuntu Jammy host to successfully build all images
94
- # This MUST NOT be an LVM image. It can cause confusing conficts with the built image.
95
- aio_vm_image = "Ubuntu-22.04"
104
+ aio_vm_name = "skc-ipa-image-builder"
105
+ aio_vm_image = "${{ env.VM_IMAGE }}"
96
106
aio_vm_flavor = "en1.medium"
97
107
aio_vm_network = "stackhpc-ci"
98
108
aio_vm_subnet = "stackhpc-ci"
99
109
aio_vm_interface = "ens3"
100
110
EOF
101
111
working-directory : ${{ github.workspace }}/src/kayobe-config/terraform/aio
112
+ env :
113
+ VM_IMAGE : ${{ steps.image_name.outputs.image_name }}
102
114
103
115
- name : Terraform Plan
104
116
run : terraform plan
@@ -170,56 +182,69 @@ jobs:
170
182
source src/kayobe-config/kayobe-env --environment ci-builder &&
171
183
kayobe control host bootstrap
172
184
173
- - name : Configure the seed host (Builder VM)
185
+ - name : Growpart
174
186
run : |
175
187
source venvs/kayobe/bin/activate &&
176
188
source src/kayobe-config/kayobe-env --environment ci-builder &&
177
- kayobe seed host configure -e seed_bootstrap_user=ubuntu
189
+ kayobe playbook run src/kayobe-config/etc/kayobe/ansible/growroot.yml \
190
+ -e growroot_group="seed" \
191
+ -e seed_bootstrap_user="ubuntu"
192
+ env :
193
+ KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
178
194
179
- - name : Install dependencies
195
+ - name : Configure the seed host (Builder VM)
180
196
run : |
181
197
source venvs/kayobe/bin/activate &&
182
198
source src/kayobe-config/kayobe-env --environment ci-builder &&
183
- kayobe seed host command run \
184
- --command "sudo apt update && sudo apt -y install gcc git libffi-dev python3-dev python-is-python3 python3-venv" --show-output
199
+ kayobe seed host configure \
200
+ -e seed_bootstrap_user=ubuntu \
201
+ --skip-tags network,apt,docker,docker-registry
185
202
env :
186
203
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
187
204
188
- - name : Deploy Bifrost (Builder VM)
205
+ - name : Install dependencies
189
206
run : |
190
207
source venvs/kayobe/bin/activate &&
191
208
source src/kayobe-config/kayobe-env --environment ci-builder &&
192
- kayobe seed service deploy --kolla-tags bifrost --tags bifrost -ke include_dhcp_server=false
209
+ kayobe seed host command run \
210
+ --command "sudo apt update && sudo apt -y install gcc git libffi-dev python3-dev python-is-python3 python3-venv" --show-output
211
+ env :
212
+ KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
193
213
194
- - name : Create bifrost_httpboot Docker volume
214
+ - name : Build an Ironic Python Agent (IPA) image
215
+ id : build_ipa
216
+ continue-on-error : true
195
217
run : |
196
218
source venvs/kayobe/bin/activate &&
197
219
source src/kayobe-config/kayobe-env --environment ci-builder &&
198
- kayobe seed host command run --command "sudo mkdir -p /var/lib/docker/volumes/bifrost_httpboot/_data" --show-output
220
+ kayobe overcloud deployment image build --force-rebuild \
221
+ -e os_distribution="ubuntu" \
222
+ -e os_release="jammy" \
199
223
env :
200
224
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
201
225
202
- - name : Build an Ironic Python Agent (IPA) image
203
- id : build_ipa
226
+ - name : Show last error logs
204
227
continue-on-error : true
205
228
run : |
206
229
source venvs/kayobe/bin/activate &&
207
230
source src/kayobe-config/kayobe-env --environment ci-builder &&
208
- kayobe seed deployment image build --force-rebuild
231
+ kayobe seed host command run --command "tail -200 /opt/kayobe/images/ipa/ipa.stdout" --show-output
209
232
env :
210
233
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
234
+ if : steps.build_ipa.outcome == 'failure'
211
235
212
236
- name : Upload IPA kernel image to Ark
213
237
run : |
214
238
source venvs/kayobe/bin/activate &&
215
239
source src/kayobe-config/kayobe-env --environment ci-builder &&
216
240
kayobe playbook run \
217
241
src/kayobe-config/etc/kayobe/ansible/pulp-image-upload.yml \
218
- -e image_path=/etc/kolla/ipa.kernel \
219
- -e repository_name="ipa-{{ openstack_release }}" \
220
- -e pulp_base_path="ipa/{{ openstack_release }}" \
242
+ -e image_path=/opt/kayobe/images/ipa \
243
+ -e image_name=ipa \
221
244
-e image_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
222
- -e file_extension='ipa.*'
245
+ -e os_distribution="ubuntu" \
246
+ -e os_release="jammy" \
247
+ -e file_extension='kernel'
223
248
env :
224
249
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
225
250
if : steps.build_ipa.outcome == 'success'
@@ -230,15 +255,29 @@ jobs:
230
255
source src/kayobe-config/kayobe-env --environment ci-builder &&
231
256
kayobe playbook run \
232
257
src/kayobe-config/etc/kayobe/ansible/pulp-image-upload.yml \
233
- -e image_path=/etc/kolla/ipa.initramfs \
234
- -e repository_name="ipa-{{ openstack_release }}" \
235
- -e pulp_base_path="ipa/{{ openstack_release }}" \
258
+ -e image_path=/opt/kayobe/images/ipa \
259
+ -e image_name=ipa \
236
260
-e image_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
237
- -e file_extension='ipa.*'
261
+ -e os_distribution="ubuntu" \
262
+ -e os_release="jammy" \
263
+ -e file_extension='initramfs'
238
264
env :
239
265
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
240
266
if : steps.build_ipa.outcome == 'success'
241
267
268
+ - name : Copy logs back
269
+ continue-on-error : true
270
+ run : |
271
+ mkdir logs
272
+ scp -r ubuntu@$(jq -r .access_ip_v4.value src/kayobe-config/etc/kayobe/environments/ci-builder/tf-outputs.yml):/opt/kayobe/images/*/*.std* ./logs/
273
+ if : always()
274
+
275
+ - name : Upload logs artifact
276
+ uses : actions/upload-artifact@v4
277
+ with :
278
+ name : Build logs
279
+ path : ./logs
280
+
242
281
- name : Fail if the IPA image build failed
243
282
run : |
244
283
echo "Builds failed. See workflow artifacts for details." &&
0 commit comments