|
| 1 | +//Module included in the following assemblies |
| 2 | +// |
| 3 | +//post_installation_configuration/cluster-tasks.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="mixed-arch-creating-arm64-bootimage_{context}"] |
| 7 | + |
| 8 | += Creating an `arm64` boot image using the Azure image gallery |
| 9 | + |
| 10 | +To configure your heterogeneous cluster, you must create an `arm64` boot image and add it to your Azure machine set. The following procedure describes how to manually generate an `arm64` boot image. |
| 11 | + |
| 12 | +.Prerequisites |
| 13 | + |
| 14 | +* You installed the Azure CLI (`az`). |
| 15 | +* You created a single-architecture Azure installer-provisioned cluster with the heterogeneous installer binary. |
| 16 | + |
| 17 | +.Procedure |
| 18 | +. Log in to your Azure account: |
| 19 | ++ |
| 20 | +[source,terminal] |
| 21 | +---- |
| 22 | +$ az login |
| 23 | +---- |
| 24 | +. Create a storage account and upload the `arm64` virtual hard disk (VHD) to your storage account. The {product-title} installation program creates a resource group, however, the boot image can also be uploaded to a custom named resource group: |
| 25 | ++ |
| 26 | +[source,terminal] |
| 27 | +---- |
| 28 | +$ az storage account create -n ${STORAGE_ACCOUNT_NAME} -g ${RESOURCE_GROUP} -l westus --sku Standard_LRS <1> |
| 29 | +---- |
| 30 | ++ |
| 31 | +<1> The `westus` object is an example region. |
| 32 | ++ |
| 33 | +. Create a storage container using the storage account you generated: |
| 34 | ++ |
| 35 | +[source,terminal] |
| 36 | ++ |
| 37 | +---- |
| 38 | +$ az storage container create -n ${CONTAINER_NAME} --account-name ${STORAGE_ACCOUNT_NAME} |
| 39 | +---- |
| 40 | +. You must use the {product-title} installation program JSON file to extract the URL and `arch64` VHD name: |
| 41 | +.. Extract the `URL` field and set it to `RHCOS_VHD_ORIGIN_URL` as the file name by running the following command: |
| 42 | ++ |
| 43 | +[source,terminal] |
| 44 | +---- |
| 45 | +$ RHCOS_VHD_ORIGIN_URL=$(./openshift-install coreos print-stream-json | jq -r '.architectures.aarch64."rhel-coreos-extensions"."azure-disk".url') |
| 46 | +---- |
| 47 | +.. Extract the `aarch64` VHD name and set it to `BLOB_NAME` as the file name by running the following command: |
| 48 | ++ |
| 49 | +[source,terminal] |
| 50 | +---- |
| 51 | +$ BLOB_NAME=rhcos-$(./openshift-install coreos print-stream-json | jq -r '.architectures.aarch64."rhel-coreos-extensions"."azure-disk".release')-azure.aarch64.vhd |
| 52 | +---- |
| 53 | +. Generate a shared access signature (SAS) token. Use this token to upload the {op-system} VHD to your storage container with the following commands: |
| 54 | ++ |
| 55 | +[source,terminal] |
| 56 | +---- |
| 57 | +$ end=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'` |
| 58 | +---- |
| 59 | ++ |
| 60 | +[source,terminal] |
| 61 | +---- |
| 62 | +$ sas=`az storage container generate-sas -n ${CONTAINER_NAME} --account-name ${STORAGE_ACCOUNT_NAME} --https-only --permissions dlrw --expiry $end -o tsv` |
| 63 | +---- |
| 64 | +. Copy the {op-system} VHD into the storage container: |
| 65 | ++ |
| 66 | +[source, terminal] |
| 67 | +---- |
| 68 | +$ az storage blob copy start --account-name ${STORAGE_ACCOUNT_NAME} --sas-token "$sas" \ |
| 69 | + --source-uri "${RHCOS_VHD_ORIGIN_URL}" \ |
| 70 | + --destination-blob "${BLOB_NAME}" --destination-container ${CONTAINER_NAME} |
| 71 | +---- |
| 72 | ++ |
| 73 | +You can check the status of the copying process with the following command: |
| 74 | ++ |
| 75 | +[source,terminal] |
| 76 | +---- |
| 77 | +$ az storage blob show -c ${CONTAINER_NAME} -n ${BLOB_NAME} --account-name ${STORAGE_ACCOUNT_NAME} | jq .properties.copy |
| 78 | +---- |
| 79 | ++ |
| 80 | +.Example output |
| 81 | +[source,terminal] |
| 82 | +---- |
| 83 | +{ |
| 84 | + "completionTime": null, |
| 85 | + "destinationSnapshot": null, |
| 86 | + "id": "1fd97630-03ca-489a-8c4e-cfe839c9627d", |
| 87 | + "incrementalCopy": null, |
| 88 | + "progress": "17179869696/17179869696", |
| 89 | + "source": "https://rhcos.blob.core.windows.net/imagebucket/rhcos-411.86.202207130959-0-azure.aarch64.vhd", |
| 90 | + "status": "success", <1> |
| 91 | + "statusDescription": null |
| 92 | +} |
| 93 | +---- |
| 94 | ++ |
| 95 | +<1> If the status parameter displays the `success` object, the copying process is complete. |
| 96 | + |
| 97 | +. Create an image gallery using the following command: |
| 98 | ++ |
| 99 | +[source,terminal] |
| 100 | +---- |
| 101 | +$ az sig create --resource-group ${RESOURCE_GROUP} --gallery-name ${GALLERY_NAME} |
| 102 | +---- |
| 103 | +Use the image gallery to create an image definition. In the following example command, `rhcos-arm64` is the name of the image definition. |
| 104 | ++ |
| 105 | +[source,terminal] |
| 106 | +---- |
| 107 | +$ az sig image-definition create --resource-group ${RESOURCE_GROUP} --gallery-name ${GALLERY_NAME} --gallery-image-definition rhcos-arm64 --publisher RedHat --offer arm --sku arm64 --os-type linux --architecture Arm64 --hyper-v-generation V2 |
| 108 | +---- |
| 109 | +. To get the URL of the VHD and set it to `RHCOS_VHD_URL` as the file name, run the following command: |
| 110 | ++ |
| 111 | +[source,terminal] |
| 112 | +---- |
| 113 | +$ RHCOS_VHD_URL=$(az storage blob url --account-name ${STORAGE_ACCOUNT_NAME} -c ${CONTAINER_NAME} -n "${BLOB_NAME}" -o tsv) |
| 114 | +---- |
| 115 | +. Use the `RHCOS_VHD_URL` file, your storage account, resource group, and image gallery to create an image version. In the following example, `1.0.0` is the image version. |
| 116 | ++ |
| 117 | +[source,terminal] |
| 118 | +---- |
| 119 | +$ az sig image-version create --resource-group ${RESOURCE_GROUP} --gallery-name ${GALLERY_NAME} --gallery-image-definition rhcos-arm64 --gallery-image-version 1.0.0 --os-vhd-storage-account ${STORAGE_ACCOUNT_NAME} --os-vhd-uri ${RHCOS_VHD_URL} |
| 120 | +---- |
| 121 | +. Your `arm64` boot image is now generated. You can access the ID of your image with the following command: |
| 122 | ++ |
| 123 | +[source,terminal] |
| 124 | +---- |
| 125 | +$ az sig image-version show -r $GALLERY_NAME -g $RESOURCE_GROUP -i rhcos-arm64 -e 1.0.0 |
| 126 | +---- |
| 127 | +The following example image ID is used in the `recourseID` parameter of the machine set: |
| 128 | ++ |
| 129 | +.Example `resourceID` |
| 130 | +[source,terminal] |
| 131 | +---- |
| 132 | +/resourceGroups/${RESOURCE_GROUP}/providers/Microsoft.Compute/galleries/${GALLERY_NAME}/images/rhcos-arm64/versions/1.0.0 |
| 133 | +---- |
0 commit comments