Skip to content

Change fat image build to create raw image for speed #650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
- name: Make image usable for further builds
run: |
. venv/bin/activate
openstack image unset --property signature_verified "${{ steps.manifest.outputs.image-id }}"
openstack image unset --property signature_verified "${{ steps.manifest.outputs.image-id }}" || true

- name: Delete image for automatically-run workflows
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/fatimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
matrix: # build RL8, RL9
build:
- image_name: openhpc-RL8
source_image_name: Rocky-8-GenericCloud-Base-8.10-20240528.0.x86_64.qcow2
source_image_name: Rocky-8-GenericCloud-Base-8.10-20240528.0.x86_64.raw
inventory_groups: control,compute,login,update
- image_name: openhpc-RL9
source_image_name: Rocky-9-GenericCloud-Base-9.5-20241118.0.x86_64.qcow2
source_image_name: Rocky-9-GenericCloud-Base-9.5-20241118.0.x86_64.raw
inventory_groups: control,compute,login,update
env:
ANSIBLE_FORCE_COLOR: True
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Make image usable for further builds
run: |
. venv/bin/activate
openstack image unset --property signature_verified "${{ steps.manifest.outputs.image-id }}"
openstack image unset --property signature_verified "${{ steps.manifest.outputs.image-id }}" || true

- name: Upload manifest artifact
uses: actions/upload-artifact@v4
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/s3-image-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:

- name: Install s3cmd
run: |
sudo apt-get update
sudo apt-get --yes install s3cmd

- name: Cleanup S3 bucket
Expand Down Expand Up @@ -75,20 +76,38 @@ jobs:
echo "${{ secrets['ARCUS_S3_CFG'] }}" > ~/.s3cfg
shell: bash

- name: Install s3cmd
- name: Install s3cmd and qemu-utils
run: |
sudo apt-get --yes install s3cmd
sudo apt-get update
sudo apt-get --yes install s3cmd qemu-utils

- name: Retrieve image name
run: |
TARGET_IMAGE=$(jq --arg version "${{ matrix.build }}" -r '.cluster_image[$version]' "${{ env.IMAGE_PATH }}")
echo "TARGET_IMAGE=${TARGET_IMAGE}" >> "$GITHUB_ENV"
shell: bash

- name: Clear up some space on runner
run: |
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get clean
df -h

- name: Download image to runner
run: |
. venv/bin/activate
openstack image save --file ${{ env.TARGET_IMAGE }} ${{ env.TARGET_IMAGE }}
openstack image save --file "${{ env.TARGET_IMAGE }}.raw" "${{ env.TARGET_IMAGE }}"
df -h
shell: bash

- name: Convert image to QCOW2
run: |
. venv/bin/activate
qemu-img convert -f raw -O qcow2 -c "${{ env.TARGET_IMAGE }}.raw" "${{ env.TARGET_IMAGE }}"
shell: bash

- name: Upload Image to S3
Expand Down
2 changes: 1 addition & 1 deletion packer/openstack.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ source "openstack" "openhpc" {
ssh_bastion_private_key_file = var.ssh_bastion_private_key_file

# Output image:
image_disk_format = "qcow2"
image_disk_format = "raw"
image_visibility = var.image_visibility

}
Expand Down
Loading