22name : Build IPA images
33on :
44 workflow_dispatch :
5+ inputs :
6+ rocky9 :
7+ description : Build Rocky Linux 9
8+ type : boolean
9+ default : true
10+ ubuntu-jammy :
11+ description : Build Ubuntu 22.04 Jammy
12+ type : boolean
13+ default : true
514 secrets :
615 KAYOBE_VAULT_PASSWORD :
716 required : true
@@ -84,33 +93,20 @@ jobs:
8493 EOF
8594 working-directory : ${{ github.workspace }}/src/kayobe-config/terraform/aio
8695
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-
9996 - name : Generate terraform.tfvars
10097 run : |
10198 cat << EOF > terraform.tfvars
10299 ssh_public_key = "id_rsa.pub"
103100 ssh_username = "ubuntu"
104101 aio_vm_name = "skc-ipa-image-builder"
105- aio_vm_image = "${{ env.VM_IMAGE }} "
106- aio_vm_flavor = "en1.medium "
102+ aio_vm_image = "Ubuntu-22.04 "
103+ aio_vm_flavor = "en1.large "
107104 aio_vm_network = "stackhpc-ci"
108105 aio_vm_subnet = "stackhpc-ci"
109106 aio_vm_interface = "ens3"
107+ aio_vm_volume_size = 100
110108 EOF
111109 working-directory : ${{ github.workspace }}/src/kayobe-config/terraform/aio
112- env :
113- VM_IMAGE : ${{ steps.image_name.outputs.image_name }}
114110
115111 - name : Terraform Plan
116112 run : terraform plan
@@ -182,16 +178,6 @@ jobs:
182178 source src/kayobe-config/kayobe-env --environment ci-builder &&
183179 kayobe control host bootstrap
184180
185- - name : Growpart
186- run : |
187- source venvs/kayobe/bin/activate &&
188- source src/kayobe-config/kayobe-env --environment ci-builder &&
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 }}
194-
195181 - name : Configure the seed host (Builder VM)
196182 run : |
197183 source venvs/kayobe/bin/activate &&
@@ -211,17 +197,19 @@ jobs:
211197 env :
212198 KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
213199
214- - name : Build an Ironic Python Agent ( IPA) image
215- id : build_ipa
200+ - name : Build a Ubuntu 22.04 Jammy IPA image
201+ id : build_ubuntu_jammy_ipa
216202 continue-on-error : true
217203 run : |
218204 source venvs/kayobe/bin/activate &&
219205 source src/kayobe-config/kayobe-env --environment ci-builder &&
220206 kayobe overcloud deployment image build --force-rebuild \
221207 -e os_distribution="ubuntu" \
222208 -e os_release="jammy" \
209+ -e ipa_ci_builder_distribution="ubuntu"
223210 env :
224211 KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
212+ if : inputs.ubuntu-jammy
225213
226214 - name : Show last error logs
227215 continue-on-error : true
@@ -231,39 +219,95 @@ jobs:
231219 kayobe seed host command run --command "tail -200 /opt/kayobe/images/ipa/ipa.stdout" --show-output
232220 env :
233221 KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
234- if : steps.build_ipa .outcome == 'failure'
222+ if : steps.build_ubuntu_jammy_ipa .outcome == 'failure'
235223
236- - name : Upload IPA kernel image to Ark
224+ - name : Upload Ubuntu 22.04 Jammy IPA kernel image to Ark
237225 run : |
238226 source venvs/kayobe/bin/activate &&
239227 source src/kayobe-config/kayobe-env --environment ci-builder &&
240228 kayobe playbook run \
241- src/kayobe-config/etc/kayobe/ansible/pulp-image -upload.yml \
242- -e image_path =/opt/kayobe/images/ipa \
243- -e image_name =ipa \
244- -e image_tag =${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
229+ src/kayobe-config/etc/kayobe/ansible/pulp-artifact -upload.yml \
230+ -e artifact_path =/opt/kayobe/images/ipa \
231+ -e artifact_type =ipa \
232+ -e artifact_tag =${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
245233 -e os_distribution="ubuntu" \
246234 -e os_release="jammy" \
247- -e file_extension=' kernel'
235+ -e file_regex='*. kernel'
248236 env :
249237 KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
250- if : steps.build_ipa .outcome == 'success'
238+ if : inputs.ubuntu-jammy && steps.build_ubuntu_jammy_ipa .outcome == 'success'
251239
252- - name : Upload IPA ramdisk image to Ark
240+ - name : Upload Ubuntu 22.04 Jammy IPA ramdisk image to Ark
253241 run : |
254242 source venvs/kayobe/bin/activate &&
255243 source src/kayobe-config/kayobe-env --environment ci-builder &&
256244 kayobe playbook run \
257- src/kayobe-config/etc/kayobe/ansible/pulp-image -upload.yml \
258- -e image_path =/opt/kayobe/images/ipa \
259- -e image_name =ipa \
260- -e image_tag =${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
245+ src/kayobe-config/etc/kayobe/ansible/pulp-artifact -upload.yml \
246+ -e artifact_path =/opt/kayobe/images/ipa \
247+ -e artifact_type =ipa \
248+ -e artifact_tag =${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
261249 -e os_distribution="ubuntu" \
262250 -e os_release="jammy" \
263- -e file_extension='initramfs'
251+ -e file_regex='*.initramfs'
252+ env :
253+ KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
254+ if : inputs.ubuntu-jammy && steps.build_ubuntu_jammy_ipa.outcome == 'success'
255+
256+ - name : Build a Rocky 9 IPA image
257+ id : build_rocky_9_ipa
258+ continue-on-error : true
259+ run : |
260+ source venvs/kayobe/bin/activate &&
261+ source src/kayobe-config/kayobe-env --environment ci-builder &&
262+ kayobe overcloud deployment image build --force-rebuild \
263+ -e os_distribution="rocky" \
264+ -e os_release="9" \
265+ -e ipa_ci_builder_distribution="rocky"
266+ env :
267+ KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
268+ if : inputs.rocky9
269+
270+ - name : Show last error logs
271+ continue-on-error : true
272+ run : |
273+ source venvs/kayobe/bin/activate &&
274+ source src/kayobe-config/kayobe-env --environment ci-builder &&
275+ kayobe seed host command run --command "tail -200 /opt/kayobe/images/ipa/ipa.stdout" --show-output
276+ env :
277+ KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
278+ if : steps.build_rocky_9_ipa.outcome == 'failure'
279+
280+ - name : Upload Rocky 9 IPA kernel image to Ark
281+ run : |
282+ source venvs/kayobe/bin/activate &&
283+ source src/kayobe-config/kayobe-env --environment ci-builder &&
284+ kayobe playbook run \
285+ src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \
286+ -e artifact_path=/opt/kayobe/images/ipa \
287+ -e artifact_type=ipa \
288+ -e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
289+ -e os_distribution="rocky" \
290+ -e os_release="9" \
291+ -e file_regex='*.kernel'
292+ env :
293+ KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
294+ if : inputs.rocky9 && steps.build_rocky_9_ipa.outcome == 'success'
295+
296+ - name : Upload Rocky 9 IPA ramdisk image to Ark
297+ run : |
298+ source venvs/kayobe/bin/activate &&
299+ source src/kayobe-config/kayobe-env --environment ci-builder &&
300+ kayobe playbook run \
301+ src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \
302+ -e artifact_path=/opt/kayobe/images/ipa \
303+ -e artifact_type=ipa \
304+ -e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
305+ -e os_distribution="rocky" \
306+ -e os_release="9" \
307+ -e file_regex='*.initramfs'
264308 env :
265309 KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
266- if : steps.build_ipa .outcome == 'success'
310+ if : inputs.rocky9 && steps.build_rocky_9_ipa .outcome == 'success'
267311
268312 - name : Copy logs back
269313 continue-on-error : true
@@ -282,7 +326,8 @@ jobs:
282326 run : |
283327 echo "Builds failed. See workflow artifacts for details." &&
284328 exit 1
285- if : steps.build_ipa.outcome == 'failure'
329+ if : steps.build_rocky_9_ipa.outcome == 'failure' ||
330+ steps.build_ubuntu_jammy_ipa.outcome == 'failure'
286331
287332 - name : Destroy
288333 run : terraform destroy -auto-approve
0 commit comments