Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 6. Installing RHEL AI on Azure
There are multiple ways you can install, and deploy Red Hat Enterprise Linux AI on Azure.
- You can purchase RHEL AI from the Azure marketplace.
- You can download the RHEL AI VHD on the RHEL AI download page and convert it to an Azure image.
For installing and deploying Red Hat Enterprise Linux AI on Azure using the VHD, you must first convert the RHEL AI image into an Azure image. You can then launch an instance using the Azure image and deploy RHEL AI on an Azure machine.
6.1. Converting the RHEL AI image into a Azure image Copier lienLien copié sur presse-papiers!
To create a bootable image on Azure you must configure your Azure account, create an Azure Storage Container, and create an Azure image using the RHEL AI VHD image.
Prerequisites
- You installed the Azure CLI on your specific machine. For more information on installing the Azure CLI, see Install the Azure CLI on Linux.
- You installed the AzCopy on your specific machine. For more information on installing AzCopy, see Install AzCopy on Linux.
Procedure
Log in to Azure by running the following command:
az login
$ az login
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output of the login
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Log in with the
azcopy
tool using the following commands:keyctl new_session azcopy login
$ keyctl new_session $ azcopy login
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You need to set up various Azure configurations and create your Azure Storage Container before creating the Azure image.
Create an environment variable defining the location of your instance with the following command:
az_location=eastus
$ az_location=eastus
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a resource group and save the name in an environment variable named
az_resource_group
. The following example creates a resource group namedDefault
in the locationeastus
. (You can omit this step if you want to use an already existing resource group).az_resource_group=Default az group create --name ${az_resource_group} --location ${az_location}
$ az_resource_group=Default $ az group create --name ${az_resource_group} --location ${az_location}
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create an Azure storage account and save the name in an environment variable named
az_storage_account
by running the following commands:az_storage_account=THE_NAME_OF_YOUR_STORAGE_ACCOUNT
$ az_storage_account=THE_NAME_OF_YOUR_STORAGE_ACCOUNT
Copy to Clipboard Copied! Toggle word wrap Toggle overflow az storage account create \ --name ${az_storage_account} \ --resource-group ${az_resource_group} \ --location ${az_location} \ --sku Standard_LRS
$ az storage account create \ --name ${az_storage_account} \ --resource-group ${az_resource_group} \ --location ${az_location} \ --sku Standard_LRS
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create your Azure Storage Container named as the environment variable
az_storage_container
with the following commands:az_storage_container=NAME_OF_MY_BUCKET az storage container create \ --name ${az_storage_container} \ --account-name ${az_storage_account} \ --public-access off
$ az_storage_container=NAME_OF_MY_BUCKET $ az storage container create \ --name ${az_storage_container} \ --account-name ${az_storage_account} \ --public-access off
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can get your Subscription ID from the Azure account list by running the following command:
az account list --output table
$ az account list --output table
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a variable named ` az_subscription_id` with your Subscription ID .
az_subscription_id=46c08fb3-83c5-4b59-8372-bf9caf15a681
$ az_subscription_id=46c08fb3-83c5-4b59-8372-bf9caf15a681
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Grant
azcopy
write permission to user into the storage container. This example grants permission to the useruser@example.com
.az role assignment create \ --assignee user@example.com \ --role "Storage Blob Data Contributor" \ --scope /subscriptions/${az_subscription_id}/resourceGroups/${az_resource_group}/providers/Microsoft.Storage/storageAccounts/${az_storage_account}/blobServices/default/containers/${az_storage_container}
$ az role assignment create \ --assignee user@example.com \ --role "Storage Blob Data Contributor" \ --scope /subscriptions/${az_subscription_id}/resourceGroups/${az_resource_group}/providers/Microsoft.Storage/storageAccounts/${az_storage_account}/blobServices/default/containers/${az_storage_container}
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Now that your Azure storage container is set up, you need to download the Azure VHD image from Red Hat Enterprise Linux AI download page.
Unzip the
vhd.gz
file with the following command:gunzip <downloaded-azure-gz-image>
$ gunzip <downloaded-azure-gz-image>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the name you want to use as the RHEL AI Azure image.
image_name=rhel-ai-1.5
$ image_name=rhel-ai-1.5
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Upload the VHD file to the Azure Storage Container by running the following command:
az_vhd_url="https://${az_storage_account}.blob.core.windows.net/${az_storage_container}/$(basename ${vhd_file})" azcopy copy "$vhd_file" "$az_vhd_url"
$ az_vhd_url="https://${az_storage_account}.blob.core.windows.net/${az_storage_container}/$(basename ${vhd_file})" $ azcopy copy "$vhd_file" "$az_vhd_url"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create an Azure image from the VHD file you just uploaded with the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
6.2. Deploying your instance on Azure using the CLI Copier lienLien copié sur presse-papiers!
You can launch an instance with your new RHEL AI Azure image from the Azure web console or the CLI. You can use whichever method of deployment you want to launch your instance. The following procedure displays how you can use the CLI to launch an Azure instance with the custom Azure image
If you choose to use the CLI as a deployment option, there are several configurations you have to create, as shown in "Prerequisites".
Prerequisites
- You created your RHEL AI Azure image. For more information, see "Converting the RHEL AI image to an Azure image".
- You installed the Azure CLI on your specific machine, see Install the Azure CLI on Linux.
Procedure
Log in to your Azure account by running the following command:
az login
$ az login
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You need to select the instance profile that you want to use for the deployment. List all the profiles in the desired region by running the following command:
az vm list-sizes --location <region> --output table
$ az vm list-sizes --location <region> --output table
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Make a note of your preferred instance profile, you will need it for your instance deployment.
You can now start creating your Azure instance. Populate environment variables for when you create the instance.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can launch your instance, by running the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
To verify that your Red Hat Enterprise Linux AI tools are installed correctly, run the
ilab
command:ilab
$ ilab
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Updating Red Hat Enterprise Linux AI
To update to the latest z-stream version of RHEL AI, follow the procedures in the Updating Red Hat Enterprise Linux AI documentation.