Este conteúdo não está disponível no idioma selecionado.
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 Copiar o linkLink copiado para a área de transferência!
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 Insights, click
. The Insights 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 Review step.
to proceed to the- 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.
Insights 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 Copiar o linkLink copiado para a área de transferência!
To optimize runtime configuration of your image, you can customize and pre-configure your blueprint with optional settings, such as:
- 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 Copiar o linkLink copiado para a área de transferência!
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 Insights, click
. The Insights 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 Review page. . You are redirected to the
- 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 Copiar o linkLink copiado para a área de transferência!
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 Insights, click
. The Insights 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 Review page. . You are redirected to the
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 Copiar o linkLink copiado para a área de transferência!
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 Insights, click
. The Insights 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 Import pipeline window opens. . The
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 Copiar o linkLink copiado para a área de transferência!
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 Insights, click menu:[Images]. The Insights 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
.json
format to the local storage that you define in your web browser.
3.7. Deleting a blueprint Copiar o linkLink copiado para a área de transferência!
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 Insights, click
. The Insights 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 .