Skip to content

Commit

Permalink
feat: updates azure rocky image to resf publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
manoj-nutanix committed Oct 28, 2024
1 parent 40815f7 commit a77e0e5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
include:
- os: "rocky 9.1"
buildConfig: "basic"
- os: "ubuntu 20.04"
buildConfig: "basic"
# - os: "ubuntu 20.04"
# buildConfig: "basic"

runs-on:
- self-hosted
Expand Down
21 changes: 14 additions & 7 deletions ansible/roles/providers/tasks/azure-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,25 @@
- block:
# TODO: remove cut utility fix to initramfs after its been fixed upstream
# https://bugzilla.redhat.com/show_bug.cgi?id=2165042
- name: expose cut utility to initramfs setup
- name: Expose cut utility to initramfs setup
shell: echo 'install_items+=" /usr/bin/cut "' > /etc/dracut.conf.d/cut.conf

- name: refresh dracut
- name: Refresh dracut
shell: dracut -f

when:
- packer["image_publisher"] == "resf"

- block:
# https://d2iq.atlassian.net/browse/D2IQ-96417 removes extra 4 and 5 partitions so that growpart cloud-init module can expand the root filesystem to the rest of the disk.
#
# [packer@pkrvmia9ljyrxtg ~]$ lsblk -oMOUNTPOINT,PKNAME -P | grep 'MOUNTPOINT="/"' | cut -d= -f3 | xargs
# sda
- name: Get Device that holds root filesystem
shell: lsblk -oMOUNTPOINT,PKNAME -P | grep 'MOUNTPOINT="/"' | cut -d= -f3 | xargs
shell: lsblk -oMOUNTPOINT,PKNAME -P | grep 'MOUNTPOINT="/"' | cut -d= -f3 | xargs
register: rootdevice

- name: Loop over ansible block devices
- name: Remove extra partitions for Rocky 9.1
parted:
number: "{{ item }}"
state: absent
Expand All @@ -41,12 +45,15 @@
- 4
- 5

- name: unconditionally reboot the machine with all defaults
ansible.builtin.reboot:
when:
- packer["image_publisher"] == "erockyenterprisesoftwarefoundationinc1653071250513" and packer["image_version"] == "9.1.20230215"
- packer["image_publisher"] == "resf"
- packer["image_version"] == "9.1.20230215"

- name: Unconditionally reboot the machine after all tasks
ansible.builtin.reboot:

when:
- packer["image_publisher"] == "resf"

- name: Add the yum repository for the azure cli
yum_repository:
Expand Down
14 changes: 7 additions & 7 deletions images/azure/rocky-91.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ build_name: "rocky-91-az"
packer_builder_type: "azure"
python_path: ""
packer:
distribution: "rockylinux-9" # Offer
distribution_version: "rockylinux-9" # SKU
distribution: "rockylinux-x86_64" # Offer
distribution_version: "9-base" # SKU
# Azure Rocky linux official image: https://portal.azure.com/#view/Microsoft_Azure_Marketplace/GalleryItemDetailsBladeNopdl/id/erockyenterprisesoftwarefoundationinc1653071250513.rockylinux-9
image_publisher: "erockyenterprisesoftwarefoundationinc1653071250513"
image_version: "9.1.20230215"
image_publisher: "resf"
image_version: "9.3.20231113"
ssh_username: "azureuser"
plan_image_sku: "rockylinux-9" # SKU
plan_image_offer: "rockylinux-9" # offer
plan_image_publisher: "erockyenterprisesoftwarefoundationinc1653071250513" # publisher
plan_image_sku: "9-base" # SKU
plan_image_offer: "rockylinux-x86_64" # offer
plan_image_publisher: "resf" # publisher

0 comments on commit a77e0e5

Please sign in to comment.