Chapter 5. 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. 5.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 Services Red Hat Enterprise Linux Inventory Images . The Insights Images dashboard appears. Click Create blueprint . 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. 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. The following steps are optional, and if you do not want to customize your image further, click the Review and finish button to finish the image creation process. You will be redirected to the Review step. Optional: On the Register page, the "Automatically register and enable advanced capabilities" is enabled by default and the activation key drop down is automatically populated. The button gets temporarily disabled when the activation key is loading. You can disable the automatic registration by clearing the checkbox if you prefer to register your system during initial boot. If you have previously added a key during recent blueprint creation, the same key gets automatically selected. If you have activation keys, but have not used any key previously, the first activation key will get selected. If you have no activation keys, select "Automatically create and select a default key" to automatically create and use an activation-key-default- <ID> default activation key. You can also select any of the available activation keys. Optional: On the OpenSCAP profile page, from the drop down menu, select one of the available options and click : OpenSCAP The standard option profile does not enable you to customize policies. The policy must match the RHEL version. For more details, see Supported configurations . None The default visible option. Keep this option selected if you do not want to secure your system. (Tech Preview) Insights compliance Choose this option to attach the system to a customized predefined sets of policies. The compliance system is attached to the customized policy. The images you build with image builder will automatically appear under the scap policy of the system. You must have an existing set of policies to choose from. See Creating new SCAP policies on how to create your policy. If you do not have created your set of policies, click Define new policies in Insights Compliance to create the policy, and refresh the Console to see the policy that you created under the Insights compliance drop down menu. The system is attached to the customized policy. After you create the image, the system will show up under the compliance system. Optional: On the File system configuration page, select one of the following options and click : Use automatic partitioning : The recommended partitioning, depending on the target environment. Manually configure partitions Use to manually configure the image file system partitions, by following the steps: Click the Manually configure partitioning radio button to show the Configure partitions section and configure the partitions based on Red Hat standards and security guides. From the drop-down menu, provide details to configure the partitions: For the Mount point field, select one mount point type option You can also add an additional path to the Mount point , such as /tmp . For example: /var as a prefix and /tmp as an additional path results in /var/tmp . Note Depending on the Mount point type you choose, the file system type changes, for example to xfs , or other type. For the Minimum size partition field of the file system, enter the desired minimum partition size. In the Minimum size drop-down menu, you can use common size units such as GiB , MiB , or KiB . The default unit is GiB . To add more partitions, click Add partition and repeat the steps for each added partition. Optional: On the Repository snapshot page, choose one of the following options and click . Note that this step is available in the Preview mode only. Use latest content:: the image uses the latest state of the repository. Use a snapshot:: The image selects a specific date of snapshot creation. If you choose the Use a snapshot option, the images will have the static state of the repository based on a date you specify. Optional: On the Custom repositories page, select the custom repositories from which you can add packages to the image and click . Optional: On the Additional Red Hat packages page, search for the packages with the search field and choose the packages you need. Click . Optional: On the First boot configuration page, include a file with an action script or write it in the </> SHELL field. That script is executed during the first boot of this image. It is useful when you want to enable your custom services or run an Ansible playbook at the boot time of the image. Click . You must start your script with a shebang, for example the #!/bin/sh for Bash shell. The first boot feature supports Python, Bash and YAML syntax. 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, choose one of the following options: Create blueprint Creates the blueprint and saves the customizations for your blueprint. Create blueprint and build image 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. 5.2. 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 Services Red Hat Enterprise Linux Inventory Images . The Insights Images dashboard appears. 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 Edit blueprint . 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 Save changes to the blueprint . The images related to the parent blueprint that you modified will be rebuilt and updated with the new changes. 5.3. 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 Services Red Hat Enterprise Linux Inventory Images . The Insights Images dashboard appears. 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 Edit blueprint . 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. 5.4. Importing a blueprint You can import a blueprint from an external source to the Hybrid Cloud Console. Important 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 Services Red Hat Enterprise Linux Inventory Images . The Insights Images dashboard appears. Click Import . 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. Warning If 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 Review and finish . 5.5. Downloading a blueprint You can export a blueprint that you created in the Hybrid Cloud Console by downloading it in the JSON format. Important 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 Services Red Hat Enterprise Linux Inventory Images . The Insights Images dashboard appears. 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. 5.6. 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 Services Red Hat Enterprise Linux Inventory Images . The Insights Images dashboard appears. 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 Delete .

Commands: