이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Deploying and managing RHEL systems in hybrid clouds
Deploying and managing your customized RHEL system images in hybrid clouds
Abstract
Use Red Hat Lightspeed to launch and manage your customized RHEL systems images in the open hybrid cloud environments.
You can use Red Hat Lightspeed to deploy and manage the RHEL systems in the following clouds:
- Amazon Web Services
- Microsoft Azure
- Google Cloud Platform
You can access the Red Hat Lightspeed with your Red Hat account, a RHEL subscription, and an activation key. No additional SKUs are required. See Creating an activation key.
As part of the deployment, by using Red Hat Lightspeed, you can follow an end-to-end workflow to:
In addition, you can manage your systems by granting users access, monitoring the inventory of your system infrastructure, and applying patches to improve security and stability.
Chapter 2. Managing repositories to build your customized operating systems 링크 복사링크가 클립보드에 복사되었습니다!
You can define your customized repositories with third-party content without having to manage their lifecycle. You can use your third-party content to build an image, and when you launch that image to the public cloud environment, you can use those repositories with the dnf tool.
2.1. Adding a custom repository 링크 복사링크가 클립보드에 복사되었습니다!
Define your repository to be able to add packages from this repository to your customized images.
Prerequisites
- You have a RHEL subscription.
- You have administrator access to the Red Hat Hybrid Cloud Console web user interface or repository administrator role.
- You have the URL link to your repository content.
Procedure
- Access Hybrid Cloud Console, click → . For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
- Click . The Add custom repositories wizard opens.
- In the Name field provide a name for your custom repository.
In the Repository type, select:
- Snapshotting
- Enables creating a daily snapshot of this repository if this repository has updates since the last snapshot. That enables you to create Image Blueprints with consistent repository content.
- Introspect only
- Disables snapshots for this repository.
- Upload
Enables uploading packages to your custom repository. The file must have an
rpmextension.Note, the Upload option is available only in the Preview mode.
- If you selected Snapshotting or Introspect only, in the URL field, provide the URL to your repository.
- Optional: In the Restrict architecture drop-down menu, select an architecture. You can allow all the architectures or restrict it to your system architecture to prevent incorrect repositories availability.
- Optional: In the Restrict OS version drop-down menu, select an operating system (OS). You can allow all the RHEL versions or select one for your system version to prevent incorrect repositories being available.
- Optional: Disable Modularity filtering option. When the Modularity filtering option is disabled, you can update packages in this repository even if the packages are part of a module.
-
Optional: In the GPG key field, upload the
.txtfile with a GPG key or paste the URL or value of an existing GPG key. The GPG key can be used to verify the signed packages of a repository. If you do not provide the GPG key for a repository, your system cannot perform the verification. -
If you selected Snapshotting or Introspect only, click . The Red Hat Hybrid Cloud Console validates the project status. If your repository is marked as
Invalid, check the repository URL that you added. For details about the repository status, see the Repository status section. If you selected Upload:
- Click . The Upload content window opens.
-
Click , select the
rpmfiles you want to upload, and click . - Click when your file uploading is complete.
Verification
- On the Repositories page, select the Custom tab, and verify that the repository you added is listed. Note, that the repositories from the EPEL and the Red Hat tabs are available to your custom images by default.
2.2. Modifying a custom repository 링크 복사링크가 클립보드에 복사되었습니다!
You can modify a custom repository when you need to update information for that repository.
Prerequisites
- You have a RHEL subscription.
- You have administrator access to the Red Hat Hybrid Cloud Console web user interface or repository administrator role.
Procedure
- Access Hybrid Cloud Console, click → . For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
-
Find a repository you want to modify and click
Editin theOptionsmenu. -
In the
Edit custom repositorywizard, modify the information you need. Click .
2.3. Removing a custom repository 링크 복사링크가 클립보드에 복사되었습니다!
When you no longer need a custom repository you can delete it.
Prerequisites
- You have a RHEL subscription.
- You have administrator access to the Red Hat Hybrid Cloud Console web user interface or repository administrator role.
Procedure
- Access Hybrid Cloud Console, click → . For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
-
Find a repository to delete and click
Deletein theOptionsmenu.
Verification
- Open the list of custom repositories, and verify that the repository no longer exists.
2.4. Removing snapshots from a repository 링크 복사링크가 클립보드에 복사되었습니다!
You can delete snapshots from your custom repository to avoid broken functionality or security vulnerabilities that the old content might introduce.
Snapshots get removed automatically after 365 days unless there is no newer snapshot of this repository. If a repository has multiple snapshots and the snapshot for removal is used in a content template, this snapshot will be replaced with the newer snapshot in the content template.
Prerequisites
- You have a RHEL subscription.
- You have administrator access to the Red Hat Hybrid Cloud Console web user interface or repository administrator role.
- You have added a custom repository. See Adding a custom repository.
Procedure
- Access Hybrid Cloud Console, click → . For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
-
In the Your repositories tab, find the repository containing the snapshot to be removed, and click
View all snapshotsin theOptionmenu. - In the Snapshot window, select all snapshots that you want to remove from this repository, and click .
- In the Remove snapshot window, confirm the removal of the selected snapshots and click .
2.5. Updating custom repository after changes 링크 복사링크가 클립보드에 복사되었습니다!
When you make changes to your repository you can trigger a refresh of that repository in the Red Hat Hybrid Cloud Console.
Prerequisites
- You have a RHEL subscription.
- You have administrator access to the Red Hat Hybrid Cloud Console web user interface or repository administrator role.
- You updated your custom repository.
Procedure
- Access Hybrid Cloud Console, click → . For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
-
Find a repository you want to modify and click
Introspect Nowin theOptionsmenu. The status of that repository changes to
In progressthat indicates the Hybrid Cloud Console is connecting to the repository and checking for changes.The Red Hat Hybrid Cloud Console checks the status of the repositories every 24 hours and again every 8 hours if the status check fails.
2.6. Repository status in the Red Hat Hybrid Cloud Console 링크 복사링크가 클립보드에 복사되었습니다!
The repository status shows if the repository is available. The Red Hat Hybrid Cloud Console checks the repository status periodically and can change it. The following table describes the repository status in the Red Hat Hybrid Cloud Console.
| Status | Description |
|---|---|
| Valid | The Red Hat Hybrid Cloud Console has validated the repository and you can use it. |
| Invalid | The Red Hat Hybrid Cloud Console never validated this repository. You cannot use it. |
| Unavailable | The repository was valid at least once. The Red Hat Hybrid Console cannot reach this repository at the moment. You cannot use it. |
| In progress | The repository validation is in progress. |
Chapter 3. Creating blueprints and blueprint images 링크 복사링크가 클립보드에 복사되었습니다!
An image blueprint is a persistent definition of the required image customizations. that enables you to create multiple builds from it, without having to configure the blueprint for each image build. You can edit, rebuild, delete, and save a blueprint to keep rebuilding images from it. You can define and manage, by editing or deleting a blueprint, and to keep rebuilding it, removing the need to configure the build each time. When you rebuild a blueprint, all targets specified in the blueprint are rebuilt. The blueprint groups the images that were built from it, so that you can have access to all the related images when dealing with large amounts of images.
The blueprints are persistent and you can manage their customizations. Even if the resulting builds, and images from those builds have different content versions, the customizations stored in that blueprint are always applied across all builds resulting from this blueprint.
When creating an image from the blueprint, unless you define a name to the image, it takes the name of the parent blueprint.
3.1. Creating a blueprint 링크 복사링크가 클립보드에 복사되었습니다!
You can create a blueprint with a name, specify the packages that you want to install and define other customizations. You can build images from this blueprint, and the resulting images have all customizations that you specified in this blueprint.
Prerequisites
- You have a RHEL subscription.
- You have Organization Administrator permissions.
- Optional: If you want to launch your images to the public clouds, you must have access to Integrations. To connect your public cloud with the Red Hat Hybrid Cloud Console, see Configuring integrations to launch RHEL images.
- Optional: You have the Activation key for the RHEL system. For details, see Creating an activation key.
Procedure
- Access Hybrid Cloud Console, click → . The Lightspeed Images dashboard appears. For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
- Click . The wizard for the blueprint creation opens.
On the Image output page, select the following options and click :
From the Release list, select the release that you want to use.
ImportantThe image builder builds the latest minor version of the selected release.
- From the Architecture list, select the architecture that you want to use.
- From the Select target environments options, select the environments that you want to use.
On the Optional steps page, you can further configure your image with additional customizations. For a complete list, see Optional blueprint customizations.
To finish creating your image blueprint, click to proceed to the Review step.
- On the Details page, the blueprint name is prefilled in the <distribution>-<architecture>-<datetimeString> format. You can enter a name for the blueprint, and the system checks for validity and duplicity against already existing blueprint names. Click .
On the Review page, verify the image details about the image creation and from the Create blueprint drop-down menu, select one of the following options:
- Create blueprint
- Create the blueprint and save the customizations for your blueprint.
- Create blueprint and build image(s)
Create the blueprint, save the customizations for your blueprint and build images for the target environment or environments that you choose.
The system verifies the build manifest of the image. After it reaches 100%, the image appears in the build queue.
Lightspeed Images service starts to compose a RHEL image for the selected architecture. After the image build is ready, you can see the images related to the parent blueprint in the Images dashboard.
3.2. Optional blueprint customizations 링크 복사링크가 클립보드에 복사되었습니다!
To optimize runtime configuration of your image, you can customize and pre-configure your blueprint with optional settings.
For example, you can customize the following settings:
- Automatically register your system.
- Apply your custom compliance policies.
- Configure the file system and partitioning.
- Pre-install additional packages from your custom repositories.
- Add your custom action script for the initial boot of the image.
The additional customizations help you to create your ready to deploy images with all the settings already in place.
| Customization | Options |
|---|---|
| Register |
|
| Compliance |
|
| File system configuration |
|
| Repeatable build |
|
| Custom repositories | Select the custom repository to add it to your image. |
| Additional packages | Search and select additional packages to pre-install them to your image. |
| Users | Click to add a user, and follow the instruction on the wizard page. |
| Timezone |
|
| Locale |
|
| Hostname | Select a custom host name for your image in the Hostname field. |
| Kernel |
|
| Firewall |
|
| Systemd services |
|
| Ansible Automation Platform |
|
| First boot configuration | Add your custom script that is executed during the first boot of the image. It is useful when you want to enable your custom services or run an Ansible playbook at the boot time of the image.
You must start your script with a shebang, for example the |
3.3. Editing an existing blueprint 링크 복사링크가 클립보드에 복사되었습니다!
You can edit a blueprint. For example, to include an extra package. After you finish the blueprint editing, all the images related to the parent blueprint are rebuilt and updated with the new package.
Prerequisites
- You have created a blueprint.
Procedure
- Access Hybrid Cloud Console, click → . The Lightspeed Images dashboard appears. For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
- Search for the blueprint that you want to edit. You can use the Search field to search for the blueprint name.
- Click the blueprint that you want to edit.
- Click . You are redirected to the Review page.
- From the navigation menu, select the section that you want to edit.
- After making the changes, click the Review page.
Click .
The images related to the parent blueprint that you modified will be rebuilt and updated with the new changes.
3.4. Rebuilding an existing blueprint 링크 복사링크가 클립보드에 복사되었습니다!
Every time that you edit your blueprint, it creates a new version of that blueprint. It also impacts the images that are related to that blueprint, making them out of sync with the blueprint. To fix this, and ensure that you have the least updates available on your parent blueprint and the related images, you can edit your blueprint and rebuild it with the latest updates. This action updates all the packages specified in the blueprint and rebuild the related images with the updated packages.
Prerequisites
- You have created a blueprint.
Procedure
- Access Hybrid Cloud Console, click → . The Lightspeed Images dashboard appears. For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
- Search for the blueprint that you want to edit. You can use the Search field to search for the blueprint name.
- Click the blueprint that you want to edit.
- Click . You are redirected to the Review page.
Make the changes to the blueprint and select one of the options:
- Save
- Save the customizations for your blueprint.
- Save and build image
- Save the customizations for your blueprint and build images from the target environments that you chose.
3.5. Importing a blueprint 링크 복사링크가 클립보드에 복사되었습니다!
You can import a blueprint from an external source to the Hybrid Cloud Console.
The Import feature is only available in the Preview mode.
Prerequisites
- You have created a blueprint in the JSON format.
Procedure
- Access Hybrid Cloud Console, click → . The Lightspeed Images dashboard appears. For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
- Click . The Import pipeline window opens.
Optional: To add custom repositories from the blueprint to your repositories, select the Import missing custom repositories after file upload checkbox.
WarningIf the blueprint contains missing repositories, the images that you create from this blueprint might not work as expected.
- Upload the blueprint that you want to import either drag and drop or by selecting the file from your local storage.
- Click .
3.6. Downloading a blueprint 링크 복사링크가 클립보드에 복사되었습니다!
You can export a blueprint that you created in the Hybrid Cloud Console by downloading it in the JSON format.
The ability to download a blueprint is only available in the "Preview" mode.
Prerequisites
- You have created a blueprint.
Procedure
- Access Hybrid Cloud Console, click menu:[Images]. The Lightspeed Images dashboard appears. For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
- Search for the blueprint that you want to download. You can use the Search field to search for the blueprint name.
- Click the blueprint that you want to download.
From the More options menu, select the "Download blueprint" option.
The blueprint is saved as a file in the
.jsonformat to the local storage that you define in your web browser.
3.7. Deleting a blueprint 링크 복사링크가 클립보드에 복사되었습니다!
If you no longer need a blueprint, you can delete it. All the images related to this blueprint will also be deleted.
Prerequisites
- You have created a blueprint.
Procedure
- Access Hybrid Cloud Console, click → . The Lightspeed Images dashboard appears. For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
- Search for the blueprint that you want to delete. You can use the Search field to search for the blueprint name.
- Click the blueprint that you want to delete.
- From the More options menu, select the "Delete blueprint" option.
- Confirm the deletion by clicking .
Chapter 4. Building and managing customized RHEL images 링크 복사링크가 클립보드에 복사되었습니다!
You can use a blueprint to build customized RHEL images for a variety of deployment types by using Lightspeed Images. You can build Conventional (RPM-DNF) images.
- You can only launch customized images directly from the Hybrid Cloud Console to the AWS, GCP, and Microsoft Azure public clouds.
- The VMDK customized images must first be uploaded to VMWare vSphere, deployed there, and then you can create a VM.
-
For the Guest image (
.qcow2), and Installer (.iso), you can download these images and deploy them directly to virtual machines. -
You can use Lightspeed image builder to build images for the
x86_64and theaarch64architectures.
Red Hat Hybrid Cloud Console does not support uploading Amazon Web Services (AWS), Google Cloud Platform (GCP), and *Microsoft Azure images to GovCloud regions.
4.1. About building customized images 링크 복사링크가 클립보드에 복사되었습니다!
You can build Conventional (RPM-DNF) images from a blueprint.
- The Conventional (RPM-DNF) enables you to manage or modify the system software by using the DNF package manager and updated RPM packages.
The image artifacts are saved for 14 days and expire after that. To avoid losing the image, transfer the image to your account before the expiration date. If an image has already expired, you can also re-create the exact image based on an existing blueprint to reuse the previous configuration.
You can also download the compose request of your image and use the image builder API to automate your image building tasks.
4.2. Building customized RHEL system image 링크 복사링크가 클립보드에 복사되었습니다!
Create customized RHEL system images from a blueprint by using Lightspeed Images, and deploy the images on your target environment.
Prerequisites
- You have created a blueprint. See Creating blueprints and blueprint images.
Procedure
- Access Hybrid Cloud Console, click → . The list of existing blueprints appears. For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
Select the blueprint that you want to build an image from.
- Optionally, you can select the blueprint version from the dropdown menu.
Click . A pop-up alert informs that the image is being built.
After the image process status is marked as Ready, you can use it in your deployments.
4.3. Accessing your customized RHEL image for AWS from your account 링크 복사링크가 클립보드에 복사되었습니다!
After you built your image, uploaded it to AWS, and the cloud registration process status is marked as Ready, you can access the image that you created and shared with your AWS EC2 account.
The shared image expire within 14 days. To permanently access your image, copy the image to your own AWS account.
Prerequisites
- You have access to your AWS Management Console.
Procedure
- Access your AWS account and navigate to → .
-
In the navigation bar, verify if you are under the correct region:
us-east-1. - Click Images, and choose AMIs. The dashboard with the Owned by me images opens.
From the drop-down menu, choose Private images.
You can see the image successfully shared with the AWS account you specified.
4.4. Launching your customized RHEL system image for AWS from your AWS EC2 링크 복사링크가 클립보드에 복사되었습니다!
Launch the image that you shared with your AWS account to the Amazon Elastic Compute Cloud(Amazon EC2) compute platform.
Prerequisites
- You have access to your customized image on AWS. See Accessing your customized RHEL system image for AWS from your account.
Procedure
- From the drop-down menu, under Private images, locate the image that you shared to the AWS account you specified.
- Select the image you want to launch.
- On the top of the panel, Launch. You are redirected to the Choose an Instance Type window.
- Choose the instance type according to the resources you need to launch your image. Review and Launch.
- Review your instance launch details. You can edit each section, such as Security, Storage, for example, if you need to make any changes. After you finish the review, click .
To launch the instance, you must select a public key to access it.
Create a new key pair in EC2 and attach it to the new instance.
- From the drop-down menu list, select Create a new key pair.
- Enter the name to the new key pair. It generates a new key pair.
- Click Download Key Pair to save the new key pair on your local system.
Then, you can click to launch your instance.
You can check the status of the instance, it shows as Initializing.
- After the instance status is running, the Connect button turns available.
Click . A popup window appears with instructions on how to connect by using SSH.
- Select the preferred connection method to A standalone SSH client and open a terminal.
In the location you store your private key, make sure that your key is publicly viewable for SSH to work. To do so, run the command:
chmod 400 <your-instance-name.pem>
$ chmod 400 <your-instance-name.pem>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Connect to your instance by using its Public DNS:
ssh -i "<your-instance-name.pem> ec2-user@<your-instance-IP-address>"
$ ssh -i "<your-instance-name.pem> ec2-user@<your-instance-IP-address>"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Type yes to confirm that you want to continue connecting.
As a result, you are connected to your instance over SSH.
Verification
- From a terminal, check if you are able to perform any action while connected to your instance by using SSH.
4.5. Copying your customized RHEL system image for AWS to a different region on your AWS EC2 링크 복사링크가 클립보드에 복사되었습니다!
You can copy the image you successfully shared with the Amazon Web Services EC2 to your own account. Doing so, you grant that the image you shared and copied is available until you delete it, instead of expiring after some time. To copy your image to your own account, follow the steps:
Prerequisites
- You have access to your customized image on AWS.
Procedure
- From the list of Private images, select the image you want to copy.
- On the top of the panel, click .
- From the drop-down menu, choose Copy AMI. A pop-up window appears.
Choose the Destination region and click .
After the copying process is complete, you are provided with the new AMI ID. You can launch a new instance in the new region.
NoteWhen you copy an image to a different region, it results in a separate and new AMI in the destination region, with a unique AMI ID.
4.6. Authorizing image builder to push images to Microsoft Azure Cloud 링크 복사링크가 클립보드에 복사되었습니다!
You must authorize Lightspeed image builder to push images to the Microsoft Azure cloud. This is a one-time action. he following are high-level steps:
- Configure Lightspeed Images as an authorized application for your tenant GUID
Give the role of
Contributorto at least one resource group of the authorized application .To authorize Image Builder as an authorized application, follow the steps:
Prerequisites
- You have an existing Resource Group in Microsoft Azure portal.
-
You have the
User Access Administratorrole rights. -
Your Microsoft Azure subscription has
Microsoft.StorageandMicrosoft.Computeas a resource provider.
Procedure
- Access Hybrid Cloud Console, click → . The Lightspeed image builder dashboard appears. For details on how to access the Red Hat Hybrid Cloud Console, see Getting started with the Red Hat Hybrid Cloud Console.
- Click . The Image output wizard opens.
On the Image output page, complete the following steps:
- From the Release list, select the release that you want to use.
From the Select target environments option, select
Microsoft Azure.Click .
On the Target Environment - Microsoft Azure window, to add Image Builder as an authorized application, select one of the following share method options:
Use an account configured from Sources:
- From the Source name dropdown menu, select the source that you previously configured. See Connecting Microsoft Azure account to the Red Hat Hybrid Cloud Console.
The Azure tenant GUID, the Subscription ID, and the Resource group are automatically completed, and the button becomes available.
Image builder checks if your Tenant GUID is correctly formatted and the Authorize image builder button becomes available.
Manually enter the account information:
Enter your Azure Tenant GUID.
Image builder checks if your Tenant GUID is correctly formatted and the Authorize image builder button becomes available.
One time action: Click Authorize image builder to authorize Image Builder to push images to the Microsoft Azure cloud.
This redirects you to the Microsoft Azure portal.
- Login with your credentials.
- Click the Permission requested. Note that, if you already went through the authentication process before, you will not see the . It is already granted.
Confirm that Image Builder is authorized for your tenant.
- In the search bar, search for Azure Active Directory.
- From the Services menu, click Microsoft Entra ID, from the left menu. The Azure Active Directory page opens.
- Search for Lightspeed image builder and confirm it is authorized.
- In the Azure Active Directory, from the Services list, select Enterprise applications.
- In the Enterprise applications page, from the Manage list menu, click All applications. You can see Red Hat Image Builder is authorized in the Microsoft Azure cloud.
Add the Red Hat Image Builder as a contributor to your
Resource Group.-
In the search bar, type
Resource Groupsand select the first entry under Services. This redirects you to theResource Groupsdashboard. -
Search and select your
Resource Groupby name. - On the lateral menu, click to add a permission to the Red Hat Image Builder application to access your resource group.
- From the menu, click the tab Role assignments.
- Click .
From the dropdown menu, choose Add role assignment. A menu appears on the left side.
- Select role
-
Assign the
Contributorrole. - Assign access to
- Select the option Assign access to user, group, and service principal.
- Members
- Click and type Red Hat in the search bar. Click .
- Select
Red Hat Image Builder application.
The Red Hat Image Builder application is now authorized to push images to the Microsoft Azure cloud.
NoteThe Red Hat Image Builder application can locate resources only when the account administrator adds the shared application as a contributor under the
IAMsection of the resource group.
-
In the search bar, type
Verification
From the menu, click the tab Role assignments.
You can see Red Hat Image Builder set as a Contributor of the
Resource Groupyou selected.
4.7. Accessing your customized RHEL system image from your Microsoft Azure account 링크 복사링크가 클립보드에 복사되었습니다!
After finishing to build and upload the image, and the cloud registration process status is marked as Ready, you can access the Azure Disk Image from your Microsoft Azure account.
Prerequisites
- You have access to your Microsoft Azure dashboard.
Procedure
- Access your Microsoft Azure dashboard and navigate to the Resource group page.
Verification
After you access your Microsoft Azure Account, you can see that the image successfully shared with the resource group account you specified.
NoteIf the image is not visible there, you might have issues with the upload process. Return to the Lightspeed image builder dashboard and check if the image is marked as Ready.
4.8. Creating a VM instance by using your GCP image 링크 복사링크가 클립보드에 복사되었습니다!
After the image is built, uploaded, and the cloud registration process status is Ready, you can create a Virtual Machine (VM) instance by using the GCP image.
Prerequisites
- You have the universally unique identifier (UUID) of the image you created.
- You have access to the image-builder service API endpoint.
- You have access to your project details at Google Cloud Platform.
- You can access Google Cloud Shell from your browser.
Procedure
- From the Lightspeed image builder dashboard, copy the image UUID of the image that you created.
- Access /composes/{composeId} API endpoint.
- Click to activate the composeId string path.
-
Enter the UUID into the
composes/{composeId}field in the API endpoint. Click . The API endpoint generates a response in the Response body, for example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - From the Response body field, copy the image_name and project_id to access the image from the Google Cloud Platform environment.
From your browser, access Google Cloud Shell and set your Google Cloud Platform Project ID as the default GCP project. You can find the Product ID of your project by accessing the Google Cloud Platform dashboard.
gcloud config set project PROJECT_ID
$ gcloud config set project PROJECT_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow - In the Authorize Cloud Shell window prompt, click to allow this and future calls that require your credentials.
Create a VM instance with the image by using the
gcloudcommand in the Google Cloud Shell:gcloud compute instances create INSTANCE_NAME \ --image-project PROJECT_ID_FROM_RESPONSE \ --image IMAGE_NAME \ --zone GCP_ZONE
$ gcloud compute instances create INSTANCE_NAME \ --image-project PROJECT_ID_FROM_RESPONSE \ --image IMAGE_NAME \ --zone GCP_ZONECopy to Clipboard Copied! Toggle word wrap Toggle overflow Where:
- INSTANCE_NAME is the name for your instance;
- PROJECT_ID_FROM_RESPONSE is the project_id generated by Response body;
- IMAGE_NAME is the image_name generated by Response body;
- GCP_ZONE is the GCP zone in which the instance will be created.
Verification
Verify that Compute Engine created the VM:
gcloud compute instances describe INSTANCE_NAME
$ gcloud compute instances describe INSTANCE_NAMECopy to Clipboard Copied! Toggle word wrap Toggle overflow Connect to the VM instance using SSH:
gcloud compute ssh --project=PROJECT_ID --zone=ZONE INSTANCE_NAME
$ gcloud compute ssh --project=PROJECT_ID --zone=ZONE INSTANCE_NAMECopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.9. Copying the GCE image to your project group 링크 복사링크가 클립보드에 복사되었습니다!
You can create a Virtual Machine (VM) instance using the GCE image.
Prerequisites
- The universally unique identifier (UUID) of the image you created.
- Access to the Image-builder service API endpoint.
- Access to the Google Cloud Shell from your browser.
Procedure
- From the Images dashboard, copy the UUID image of the image you created.
- Access /composes/{composeId} API endpoint.
- Click to activate the composeId string path.
-
Enter the UUID into the
composes/{composeId}field in the API endpoint. Click . The API endpoint generates a response in the Response body, for example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow From the Response body field, copy the image_name and project_id to access the image from the Google Cloud Platform environment. From the Response body:
"image_name": "composer-api-03f0e19c-0050-4c8a-a69e-88790219b086", "project_id": "red-hat-image-builder"
"image_name": "composer-api-03f0e19c-0050-4c8a-a69e-88790219b086", "project_id": "red-hat-image-builder"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - From your browser, access Google Cloud Shell.
Set your Google Cloud Platform Project ID as the default GCP project. You can find the Product ID of your project by accessing the Google Cloud Platform dashboard.
gcloud config set project PROJECT_ID
$ gcloud config set project PROJECT_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow - In the Authorize Cloud Shell window prompt, click to allow this and future calls that require your credentials.
Copy the image to your project by using the gcloud command:
gcloud compute images create MY_IMAGE_NAME \ --source-image-project red-hat-image-builder \ --source-image IMAGE_NAME
$ gcloud compute images create MY_IMAGE_NAME \ --source-image-project red-hat-image-builder \ --source-image IMAGE_NAMECopy to Clipboard Copied! Toggle word wrap Toggle overflow Where:
- MY_IMAGE_NAME is the name you give to your instance;
- red-hat-image-builder is the project_id generated by Response body;
- IMAGE_NAME is the image_name generated by Response body;
Verification
Confirm that the image has been successfully copied to your project:
- Using the Google Cloud Platform UI, by accessing the Compute Engine / Images section.
Using the
gcloudtool, by running the command in Google Cloud Shell:gcloud compute images list --no-standard-images
$ gcloud compute images list --no-standard-imagesCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.10. Creating a new image from an existing build 링크 복사링크가 클립보드에 복사되었습니다!
You can create a new image from an existing customized RHEL image by using Lightspeed Images. The Lightspeed Images re-creates the exact image, with a different UUID, which you can use to identify the image in the Hybrid Cloud Console.
The new image also fetches package updates and refreshes the content with those updates. You can customize this new image to fit your requirements.
+ NOTE: You can re-create images from failed builds.
Prerequisites
- You created an AWS image with Lightspeed Images.
Procedure
- From the Images dashboard, select the image from which you want to create your customized image.
Click the Node options menu (⫶) and select Re-create image. The Create image wizard opens.
NoteIf the image status is
Expired, click the button.- Optional: You can customize the new image by using the Navigation panel to open a step and making changes. Click .
On the Review page, click .
The Lightspeed Images dashboard opens. The image build starts to re-create the image and lists the following information:
- Image name
- UUID
- Cloud target environment
- Image operating system release
- Status of the image creation
Verification
-
From the Status column, check if the image is
Ready. - Optional: Click Image details to display additional information about the re-created image.
4.11. Downloading the JSON compose request 링크 복사링크가 클립보드에 복사되었습니다!
If you download the .json compose request of your image, you can use the image builder API to automate your image building tasks. For example, you can automate customizing the image with extra packages, customizing the partition layout, or embedding an activation key.
Prerequisites
- You created an image with Lightspeed Images.
Procedure
-
From the Images table, select the image that you want to download as a
.jsoncompose request. Click the Node options (
⫶) menu and select Download compose request (.json).The
.jsoncompose request is now saved to your host server. To use the image builder API, see Using hosted image builder via its API.
Chapter 5. Deploying your customized images 링크 복사링크가 클립보드에 복사되었습니다!
After creating customized images for the VMWare vSphere private cloud, you can deploy the images to VMware vSphere. For the Guest image (.qcow2), and Installer (.iso), you can then download these images and deploy them to virtual machines.
You can only launch customized images directly from Hybrid Cloud Console to the following public clouds: AWS, GCP, and Azure. The VMDK customized images must first be uploaded to VMWare vSphere, deployed there, and then you can create a VM. For the Guest image (.qcow2), and Installer (.iso), you can then download these images and deploy them directly to virtual machines.
5.1. Configuring credentials to access your deployed systems with cloud-init 링크 복사링크가 클립보드에 복사되었습니다!
You cannot add a username and password to a blueprint by using the Red Hat Lightspeed images UI interface. To add a username and password to your image, use the cloud-init tool.
The following example shows how to add credentials to a VMware OVA image type created with Lightspeed image builder. You can add credentials to other image types by using this method.
The Open virtualization format (.ova) is a .vmdk image with additional metadata about the virtual hardware. The .ova image contains the cloud-init package installed that you can use to provision users by using a user-data file, for example.
Instead of sharing your login credentials to a hosted service, use cloud-init and open-vm-tools, that are installed within the image and enabled by default. For example, you can use it to pass the credentials to the VMware vSphere Cloud Director by using cloud-init.
Prerequisites
-
You created an image in the
.ovaformat by using the Hybrid Cloud Console.
Procedure
-
Access the directory where you downloaded your
.ovaimage. Create a file named
metadata.yamland add the following information to this file:instance-id: cloud-vm local-hostname: vmname
instance-id: cloud-vm local-hostname: vmnameCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a file
userdata.yaml. Add the following information to the file:Copy to Clipboard Copied! Toggle word wrap Toggle overflow This file contains the administrator or root user credentials with no password that you can use to access your system after the first boot and create additional users later. The
ssh_authorized_keysfield is your SSH public key. You can find your SSH public key in~/.ssh/id_rsa.pub.
5.2. Configuring credentials to access your deployed systems with API 링크 복사링크가 클립보드에 복사되었습니다!
You cannot add a username and password to a blueprint by using the Red Hat Lightspeed images UI interface. To add a username and password to your image, use the Image-builder service API.
The following example shows how to add credentials to a VMware OVA image type created with Lightspeed image builder. You can also use this method to add credentials to other image types.
Prerequisites
- Access to Hybrid Cloud Console.
- OAuth 2.0 authorization.
- You created an access token by using the Image Builder API. See Generating an access token for the Image Builder API queries.
-
The
jqtool is installed.
Procedure
Generate an access token for API queries by following the step in Generating an access token for the Image Builder API queries.
ImportantAccess tokens expire after fifteen (15) minutes. The expiration is included within the JSON response. You must repeat the process of obtaining an access token approximately every ten (10) minutes so that the token is rotated before it expires.
In your system, create a file in the
.jsonformat to create an image. The following example shows how to create an up-to-date RHEL 9.4ovaimage for x86_64 CPU architecture.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Send the compose request to the image builder API:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the request is successful, you can see an output similar to the following, that is the image ID:
{"id":"fd4ecf3c-f0ce-43dd-9fcc-6ad11208b939"}{"id":"fd4ecf3c-f0ce-43dd-9fcc-6ad11208b939"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the status of the image building:
curl \ --silent \ --header "Authorization: Bearer $access_token" \ "https://console.redhat.com/api/image-builder/v1/composes/$compose_id" \ | image_ID.$ curl \ --silent \ --header "Authorization: Bearer $access_token" \ "https://console.redhat.com/api/image-builder/v1/composes/$compose_id" \ | image_ID.Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the request is successful, you can see an output similar to the following, that is the image ID:
{"id":"fd4ecf3c-f0ce-43dd-9fcc-6ad11208b939"}{"id":"fd4ecf3c-f0ce-43dd-9fcc-6ad11208b939"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can also check the image building progress by accessing Red Hat Hybrid Cloud Console.
After the image builds, you can see the following output:
If the request is successful, you can see an output similar to the following, that is the image ID:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow After finishing the image creation, download the image.
curl --location --output vsphere-ova.vmdk \ “https://image-builder-service-production.s3.amazonaws.com/composer-api-76...-disk.ova?e42...”$ curl --location --output vsphere-ova.vmdk \ “https://image-builder-service-production.s3.amazonaws.com/composer-api-76...-disk.ova?e42...”Copy to Clipboard Copied! Toggle word wrap Toggle overflow The image is saved to your system and ready to be used.
5.3. Uploading VMDK images and creating a RHEL virtual machine in vSphere 링크 복사링크가 클립보드에 복사되었습니다!
After creating and configuring your image, you can deploy it to VMware vSphere by using the CLI, and you can create a VM and log in to it.
Prerequisites
-
You configured credentials to access your deployed systems by using the
cloud-inittool. See Configuring credentials to access your deployed systems. You configured the
govcVMware CLI tool client with the following values in the environment by setting the following values in the environment:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure
Export the
metadata.yamlanduserdata.yamlfiles to the environment, compressed withgzip, encoded inbase64as follows. They will be used in further steps.export METADATA=$(gzip -c9 <metadata.yaml | { base64 -w0 2>/dev/null || base64; }) \ USERDATA=$(gzip -c9 <userdata.yaml | { base64 -w0 2>/dev/null || base64; })export METADATA=$(gzip -c9 <metadata.yaml | { base64 -w0 2>/dev/null || base64; }) \ USERDATA=$(gzip -c9 <userdata.yaml | { base64 -w0 2>/dev/null || base64; })Copy to Clipboard Copied! Toggle word wrap Toggle overflow Launch the image on vSphere with the
metadata.yamlanduserdata.yamlfiles:Import the
.vmdkimage in to vSphere:govc import.vmdk ./composer-api.vmdk foldername
$ govc import.vmdk ./composer-api.vmdk foldernameCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the VM in vSphere without powering it on:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Change the VM to add
ExtraConfigvariables, thecloud-initconfig:govc vm.change -vm vmname \ -e guestinfo.metadata="${METADATA}" \ -e guestinfo.metadata.encoding="gzip+base64" \ -e guestinfo.userdata="${USERDATA}" \ -e guestinfo.userdata.encoding="gzip+base64"govc vm.change -vm vmname \ -e guestinfo.metadata="${METADATA}" \ -e guestinfo.metadata.encoding="gzip+base64" \ -e guestinfo.userdata="${USERDATA}" \ -e guestinfo.userdata.encoding="gzip+base64"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Power-on the VM:
govc vm.power -on vmname
govc vm.power -on vmnameCopy to Clipboard Copied! Toggle word wrap Toggle overflow Retrieve the VM IP address:
HOST=$(govc vm.ip vmname)
HOST=$(govc vm.ip vmname)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use SSH to log in to the VM, using the user-data specified in
cloud-initfile configuration:ssh admin@HOST
$ ssh admin@HOSTCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.4. Deploying OVA VMDK images to the vSphere GUI 링크 복사링크가 클립보드에 복사되었습니다!
After creating your .vmdk image in the open virtualization format (.ova), you can deploy it to VMware vSphere by using the vSphere GUI client. It will create a VM which can be customized further before booting.
Prerequisite
- You logged in to the vSphere UI in a browser.
-
You downloaded your (
.ova) image.
Procedure
- In the vSphere Client, from the Actions menu, select Deploy OVF Template.
- On the Deploy OVF Template page, complete the settings for each configuration option and click .
Click . The
.ovaimage starts to be deployed.After the image deployment is complete, you have a new virtual machine (VM) from the
.ovaimage.In the deployed image page, perform the following steps:
- From the Actions menu, select Edit Setting.
On the Virtual Hardware tab, configure resources such as CPU, memory, add a new network adapter, between others of your choice.
On the CD/DVD drive 1 option, attach a CD or DVD Drive that contains a
cloud-init.iso, to provision a user on startup.The VM is now ready to boot with the username and password from the
cloud-init.isofile.
Additional resources
5.5. Creating a virtual machine from the customized RHEL Guest system image 링크 복사링크가 클립보드에 복사되었습니다!
You can create a virtual machine (VM) from the QCOW2 image that you created by using Lightspeed Images.
Prerequisites
- You created and downloaded a QCOW2 image by using Lightspeed Images.
Procedure
- Access the directory where you downloaded your QCOW2 image.
Create a file named
meta-data. Add the following information to this file:instance-id: nocloud local-hostname: vmname
instance-id: nocloud local-hostname: vmnameCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a file named
user-data. Add the following information to the file:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
ssh_authorized_keysis your SSH public key. You can find your SSH public key in~/.ssh/id_rsa.pub.
-
Use the
genisoimagecommand to create an ISO image that includes theuser-dataandmeta-datafiles.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a new VM from the KVM Guest Image using the
virt-installcommand. Include the ISO image you created on step 4 as an attachment to the VM image.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Where,
- --graphics none - indicates that it is a headless RHEL Virtual Machine.
- --vcpus 4 - indicates that it uses 4 virtual CPUs.
- --memory 4096 - indicates that it uses 4096 MB RAM.
The VM installation starts:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.6. Installing a customized RHEL ISO system image to a bare metal system 링크 복사링크가 클립보드에 복사되었습니다!
You can create a virtual machine (VM) from the ISO image that you created using the Lightspeed image builder.
Prerequisites
- You created and downloaded an ISO image by using Lightspeed image builder.
- A 8 GB USB flash drive.
Procedure
- Access the directory where you downloaded your ISO image.
- Place the bootable ISO image file on a USB flash drive.
- Connect the USB flash drive to the port of the computer you want to boot.
- Boot the ISO image from the USB flash drive.
Perform the steps to install the customized bootable ISO image.
The boot screen shows you the following options:
- Install Red Hat Enterprise Linux 1-latest
- Test this media & install Red Hat Enterprise Linux 1-latest
5.7. Importing and running QCOW2 images on OCI 링크 복사링크가 클립보드에 복사되었습니다!
You can import your customized .qcow2 image to the Oracle Cloud Infrastructure (OCI). Then, you can launch the customized .qcow2 image on a virtual machine.
Prerequisites
- You logged in to the Oracle Cloud UI in a browser.
-
You downloaded your
.qcow2image. -
You have copied the
.qcow2image Image Link URL from Lightspeed Instance column, in the Images dashboard.
Procedure
- In the Oracle Cloud UI dashboard, click Compute > Custom Images.
- On the Custom Images dashboard, click Import image.
On the Import image window, set the following configuration:
- Select the Import from an object storage URL option.
- In the Object Storage URL field, paste the URL given by Lightspeed Images into it.
- Choose the QCOW2 image type.
- Under Launch mode, select the Paravirtualized mode option.
- Click .
You can launch your customized RHEL image to the public cloud platforms by using the tools that are available from the cloud providers.
6.1. Launching customized images on AWS web console 링크 복사링크가 클립보드에 복사되었습니다!
You can launch your customized image on the Amazon Web Service (AWS) by using AWS Management Console.
Prerequisites
- You have already built a custom image for your target environment on AWS.
- You have access to your custom image on AWS.
Procedure
- In the AWS Management Console, navigate to → → .
- Copy your custom image to your AWS account to create a permanent copy. For details, follow the Copying your customized RHEL system image for AWS to a different region on your AWS EC2 procedure.
- From the AWS Management Console, launch your image as an instance.
Verification
-
From your terminal, connect to your instance with the
sshcommand, and using the ec2-user username.
6.2. Launching customized images on Microsoft Azure 링크 복사링크가 클립보드에 복사되었습니다!
You can launch your custom image on the Microsoft Azure using Microsoft Azure portal.
Prerequisites
- You have already built a custom image for your target environment on Microsoft Azure.
- You have access to your custom image on Microsoft Azure.
- You granted permissions for image builder to push images to Microsoft Azure. For details, see Authorizing image builder to push images to Microsoft Azure Cloud.
Procedure
- Access the Images on the Microsoft Azure portal, and click on your custom image.
- On the Overview dashboard, click .
- In the Microsoft Azure wizard, configure the settings for the new virtual machine that you want to launch.
- On the Review + create tab, review the information about your image and click .
Verification
- After the deployment is complete, access → , and locate your new VM.
6.3. Launching customized images on Google Cloud Platform 링크 복사링크가 클립보드에 복사되었습니다!
You can launch your custom image on the Google Cloud Platform (GCP) by using the Google Cloud command line interface.
Prerequisites
-
You have the
gcloudcli installed. - You have already built a custom image for your target environment on Google Cloud.
Procedure
Log in to your Google Cloud account from your terminal:
gcloud auth login
$ gcloud auth loginCopy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Google project where you want to create your image:
gcloud config set project your-project-name
$ gcloud config set project your-project-nameCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the custom image:
gcloud compute images create image-name --source-image composer-api-image-builder-uuid --source-image-project red-hat-image-builder
$ gcloud compute images create image-name --source-image composer-api-image-builder-uuid --source-image-project red-hat-image-builderCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the image-builder-uuid from the ComposeID API endpoint.
- Access the Google Cloud Console from your browser, and locate your new image in → .
- To launch a new virtual machine from your image, click → .
Verification
- In the Google Cloud console, navigate to the VM instances page. The Status of your new instance is running with a green check mark icon.
Chapter 7. Using Image Builder API 링크 복사링크가 클립보드에 복사되었습니다!
The Image Builder API contains examples for using various types of request. Administrators and developers can use the Image Builder API to write custom scripts to integrate Image Builder services with third-party applications.
Providing feedback on Red Hat documentation 링크 복사링크가 클립보드에 복사되었습니다!
We appreciate and prioritize your feedback regarding our documentation. Provide as much detail as possible, so that your request can be quickly addressed.
Prerequisites
- You are logged in to the Red Hat Customer Portal.
Procedure
- Click the following link: Create Issue.
- Describe the issue or enhancement in the Summary text box.
- Provide details about the issue or requested enhancement in the Description text box.
- Type your name in the Reporter text box.
Click the button.
This action creates a documentation ticket and routes it to the appropriate documentation team. Thank you for taking the time to provide feedback.
Opening a support case at Red Hat Support 링크 복사링크가 클립보드에 복사되었습니다!
Create a support case from Red Hat Lightspeed at Red Hat Support by performing the following steps:
Prerequisites
- You are logged in to the Red Hat Customer Portal.
Procedure
- Access the Red Hat Hybrid Cloud Console:
Click and select Open a support case.
You are redirected to the Customer support page.
- From the Get Support page, select the type of issue that you want to report and click .
From the Summarize page, perform the following steps:
On the Summary field, describe the issue.
NoteIf Red Hat Lightspeed is not auto-selected, you must manually select the product.
- From the Product drop-down menu, select Red Hat Lightspeed.
- From the Version drop-down menu, select the component you have issues with.
From the Review page, click .
A support case is created.