Bookmark this page

Manage Content Hosts on Microsoft Azure

Objectives

  • Manage content host cloud instances on Microsoft Azure by using Red Hat Satellite.

Provision Cloud Instances in Microsoft Azure Resource Manager

Note

This section is optional.

You can go through the section if you are interested in provisioning cloud instances in Microsoft Azure Resource Manager.

Microsoft Azure Resource Manager is a web service that provides a public cloud platform. Satellite interacts with Azure Resource Manager to create virtual machines and to control their power management states. Azure supports only image-based provisioning for creating hosts.

To prepare your on-premise Satellite Server to manage Azure instances, synchronize the appropriate content repositories for Red Hat Enterprise Linux and custom products. Create activation keys for host registrations by configuring each key with subscriptions, a lifecycle environment, content view, repositories, and host collection membership to support the content host's applications. Ensure that you have the correct permissions to create an Azure Active Directory application. Create and configure it to obtain the application or client ID, the directory or tenant ID, and the client secret. Then, associate a finish or user-data provisioning template with the operating system to use.

Create a Connection for the Azure Compute Resource

To create an Azure Resource Manager connection, navigate to InfrastructureCompute Resources in the Satellite web UI, click Create Compute Resource, and enter a name for the compute resource. From the Provider list, select Azure Resource Manager. Use the Description field to enter information to recognize the resource later. By default, the Cloud parameter is set to Public/Standard. If you are using the Azure Government Cloud, then select the appropriate region (US Government, China, or Germany).

Complete the Client ID, Client Secret, Subscription ID, and Tenant ID fields with the required information. Click Load Regions to populate the list, and select the Azure region to use for this connection. Finally, click Submit.

You can also use the hammer command for the same task.

[root@satellite ~]# hammer compute-resource create --name "azure_resource" \
--provider "azurerm" --tenant "tenant_id" \
--app-ident "client_id" --secret-key "client_secret" \
--sub-id "subscription_id" --region "region"

Add Azure Resource Manager Images to Satellite Server

Azure Resource Manager uses image-based provisioning to create hosts. Load your Cloud Access-enabled images to Azure. Alternatively, Red Hat provides Gold Azure Machine Images for Red Hat Cloud Access clients to use.

Azure gold images for RHEL 8.4 and later versions are preconfigured to use the Red Hat Update Infrastructure (RHUI) by default. You can use RHUI to maintain the cloud instances that are deployed from the gold images, or disable it to maintain the cloud instances with Red Hat Subscription Management or Red Hat Satellite. Azure gold images for RHEL 8.3 and earlier versions are not preconfigured to use the Red Hat Update Infrastructure (RHUI). You must use the Red Hat Subscription Management or Red Hat Satellite to keep them updated.

To add image details for your uploaded or existing Azure images to the Satellite Server, including access details and image location, navigate to InfrastructureCompute Resources and select an Azure Resource Manager connection. Then, click Create Image.

Supply a name to identify the image for future use. Select the operating system and architecture that correspond with the image. Enter the username and password for an account that is already configured on that image that allows access for post-configuration and ongoing management. Specify a user other than the root user, because the root user cannot connect to an Azure instance by using SSH keys. Enter an image name in the prefix://UUID format in the Azure Image Name field. Use the custom prefix for a custom image, the gallery prefix for a shared gallery image, and the marketplace prefix for public and RHEL Bring Your Own Subscription (BYOS) images.

If your image supports user data input, then select the User Data checkbox. For user-data input, you must build the image with the cloud-init tool or similar configuration tooling. Click Submit to save the image details.

You can use the hammer command for the same task:

[root@satellite ~]# hammer compute-resource image create --name "azure_image" \
--username admin --user-data true --uuid "prefix://uuid" \
--compute-resource "azure_resource"

Add Azure Resource Manager Details to a Compute Profile

You can add Azure Resource Manager hardware settings to a compute profile, so that when you create a host by using the compute profile, the settings are automatically populated.

To add hardware settings to a compute profile, navigate to InfrastructureCompute Profiles and select an Azure compute profile. Select the resource group to provision in the Resource group list. Enter the size of the virtual machine to provision in the VM Size list. In the Platform list, select Linux. Complete the username and password fields or enter the SSH key in the SSH Key field. Select the disc caching settings in the OS Disk Caching list.

Click Add Interface to add a network interface for your compute profile. Select the appropriate public IP in the Public IP field, and the subnet in the Azure Subnet list. Finally, click Submit to save the image details.

You can use the hammer command for the same task. Enter the --interface and --compute-attributes options as long, single lines.

[root@satellite ~]# hammer compute-resource values create \
--compute-profile "azure_profile" --compute-resource "azure_resource"\
--volume="disk_size_gb=5,data_disk_caching=None" \
--interface="compute_public_ip=Dynamic,compute_network=mysubnetID,
compute_private_ip=false" \
--compute-attributes="resource_group=resource_group,vm_size=Standard_B1s,
username=azure_user,password=azure_password,platform=Linux,
script_command=touch /var/tmp/text.txt"

Deploy a Host on Azure Resource Manager

The Azure Resource Manager provisioning process creates hosts from existing images.

To deploy a new host, navigate to HostsCreate Host. After entering a name for the new host, select a host group from the Host Group list to populate most of the new host's fields. Select an Azure connection and compute profile to automatically populate the virtual-machine-based settings.

On the Interface tab, verify that the host's interface information is already populated. Satellite Server automatically selects an IP address, and sets the Managed, Primary, and Provision options for the first interface on the host. Leave the MAC address field blank, for the cloud provider to autogenerate it.

Verify that the fields on the Operating System and Virtual Machine tabs are populated. Ensure that Image Based is selected as the Provisioning Method, and select the Azure Resource Manager image from the Image list. Enter the root password in the Root Password field.

On the Parameters tab, ensure that a parameter exists that provides an activation key. If the parameter does not exist, then add an activation key. Click Submit to save your host entry

You can also use the hammer command for the same task.

[root@satellite ~]# hammer host create --name "azure-test1" \
--organization "Finance" --location "Boston" --hostgroup "Base" \
--compute-resource "azure_resource" --compute-profile "azure_profile" \
--provision-method image --image "azure_image" \
--domain "domain_name" --architecture x86_64 --operatingsystem "RHEL 7.7"

References

For more information about Red Hat in the public cloud, see https://access.redhat.com/public-cloud

For more information, see the Provisioning Cloud Instances on Microsoft Azure Resource Manager section in the Provisioning Guide at https://access.redhat.com/documentation/en-us/red_hat_satellite/6.11/html-single/provisioning_hosts/index#Provisioning_Cloud_Instances_on_Microsoft_Azure_Resource_Manager_provisioning

Revision: rh403-6.11-3ad886e