diff --git a/modules/microshift-adding-containers-to-blueprint.adoc b/_unused_topics/microshift-adding-containers-to-blueprint.adoc similarity index 100% rename from modules/microshift-adding-containers-to-blueprint.adoc rename to _unused_topics/microshift-adding-containers-to-blueprint.adoc diff --git a/microshift_install/microshift-embed-in-rpm-ostree.adoc b/microshift_install/microshift-embed-in-rpm-ostree.adoc index 4380b3bf42..202e38dc9b 100644 --- a/microshift_install/microshift-embed-in-rpm-ostree.adoc +++ b/microshift_install/microshift-embed-in-rpm-ostree.adoc @@ -9,40 +9,51 @@ toc::[] You can embed {product-title} into a {op-system-ostree-first} {op-system-version} image. Use this guide to build a {op-system} image containing {product-title}. include::snippets/microshift-tech-preview-snip.adoc[leveloffset=+1] + include::modules/microshift-preparing-for-image-building.adoc[leveloffset=+1] + include::modules/microshift-adding-repos-to-image-builder.adoc[leveloffset=+1] [role="_additional-resources"] .Additional resources -* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/setting-up-image-builder_composing-installing-managing-rhel-for-edge-images#edge-image-builder-system-requirements_setting-up-image-builder[Image Builder system requirements]. -* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/setting-up-image-builder_composing-installing-managing-rhel-for-edge-images#edge-installing-image-builder_setting-up-image-builder[Installing Image Builder]. +* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/setting-up-image-builder_composing-installing-managing-rhel-for-edge-images#edge-image-builder-system-requirements_setting-up-image-builder[Image Builder system requirements] +* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/setting-up-image-builder_composing-installing-managing-rhel-for-edge-images#edge-installing-image-builder_setting-up-image-builder[Installing Image Builder] + include::modules/microshift-adding-service-to-blueprint.adoc[leveloffset=+1] +include::modules/microshift-creating-ostree-iso.adoc[leveloffset=+1] + +include::modules/microshift-add-blueprint-build-iso.adoc[leveloffset=+1] + +include::modules/microshift-download-iso-prep-for-use.adoc[leveloffset=+1] + [role="_additional-resources"] .Additional resources -* For more details on creating a blueprint, read link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/composing_installing_and_managing_rhel_for_edge_images/composing-a-rhel-for-edge-image-using-image-builder-command-line_composing-installing-managing-rhel-for-edge-images#proc_creating-a-rhel-for-edge-container-image-blueprint-using-image-builder-cli_composing-a-rhel-for-edge-image-using-image-builder-command-line[creating a RHEL for Edge Container blueprint using image builder CLI]. -* For further customizations such as adding users, firewall rules, or kernel arguments to a blueprint, read link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/composing-a-rhel-for-edge-image-using-image-builder-command-line_composing-installing-managing-rhel-for-edge-images#image-customizations_composing-a-rhel-for-edge-image-using-image-builder-command-line[supported image customizations]. -* For more about the composer cli, read https://www.osbuild.org/guides/user-guide/building-an-image-from-cli.html?highlight=push%20bluepring#blueprints-management-using-composer-cli[blueprint management using composer cli]. +* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/composing-a-rhel-for-edge-image-using-image-builder-command-line_composing-installing-managing-rhel-for-edge-images[Creating a RHEL for Edge Container blueprint using image builder CLI] +* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/composing-a-rhel-for-edge-image-using-image-builder-command-line_composing-installing-managing-rhel-for-edge-images#image-customizations_composing-a-rhel-for-edge-image-using-image-builder-command-line[Supported image customizations] +* link:https://www.osbuild.org/guides/image-builder-on-premises/building-ostree-images.html#building-ostree-image[Building ostree images] +* link:https://www.osbuild.org/guides/image-builder-on-premises/blueprint-reference.html[Blueprint reference] +* link:https://podman.io/docs/installation[Installing podman] -//include::modules/microshift-adding-containers-to-blueprint.adoc[leveloffset=+2] include::modules/microshift-provisioning-ostree.adoc[leveloffset=+1] [role="_additional-resources"] .Additional resources -* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/composing_installing_and_managing_rhel_for_edge_images/index[{op-system-ostree} documentation]. -* xref:../microshift_install/microshift-install-rpm.adoc#microshift-install-system-requirements_microshift-install-rpm[System requirements for installing MicroShift]. -* Red Hat Hybrid Cloud Console link:https://console.redhat.com/openshift/install/pull-secret[pull secret]. -* xref:../microshift_networking/microshift-firewall.adoc#microshift-firewall-req-settings_microshift-firewall[Required firewall settings]. -* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/performing_an_advanced_rhel_9_installation/creating-kickstart-files_installing-rhel-as-an-experienced-user[Creating a Kickstart file]. -* link:https://access.redhat.com/solutions/60959[How to embed a Kickstart file into an ISO image]. +* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/composing_installing_and_managing_rhel_for_edge_images/index[{op-system-ostree} documentation] +* xref:../microshift_install/microshift-install-rpm.adoc#microshift-install-system-requirements_microshift-install-rpm[System requirements for installing MicroShift] +* link:https://console.redhat.com/openshift/install/pull-secret[Red Hat Hybrid Cloud Console pull secret] +* xref:../microshift_networking/microshift-firewall.adoc#microshift-firewall-req-settings_microshift-firewall[Required firewall settings] +* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/performing_an_advanced_rhel_9_installation/creating-kickstart-files_installing-rhel-as-an-experienced-user[Creating a Kickstart file] +* link:https://access.redhat.com/solutions/60959[How to embed a Kickstart file into an ISO image] include::modules/microshift-accessing.adoc[leveloffset=+1] -include::modules/microshift-accessing-cluster-locally.adoc[leveloffset=+2] -include::modules/microshift-accessing-cluster-open-firewall.adoc[leveloffset=+2] -include::modules/microshift-accessing-cluster-remotely.adoc[leveloffset=+2] -//note: System requirements for installing MicroShift xref works on Netlify and local previews \ No newline at end of file +include::modules/microshift-accessing-cluster-locally.adoc[leveloffset=+2] + +include::modules/microshift-accessing-cluster-open-firewall.adoc[leveloffset=+2] + +include::modules/microshift-accessing-cluster-remotely.adoc[leveloffset=+2] diff --git a/modules/microshift-add-blueprint-build-iso.adoc b/modules/microshift-add-blueprint-build-iso.adoc new file mode 100644 index 0000000000..3736e5735d --- /dev/null +++ b/modules/microshift-add-blueprint-build-iso.adoc @@ -0,0 +1,47 @@ +// Module included in the following assemblies: +// +// microshift/microshift-embed-into-rpm-ostree.adoc + +:_content-type: PROCEDURE +[id="microshift-add-blueprint-build-iso_{context}"] += Add the blueprint to Image Builder and build the ISO + +. Add the blueprint to the Image Builder by running the following command: ++ +[source,terminal] ++ +---- +$ sudo composer-cli blueprints push microshift-installer.toml +---- + +. Start the `ostree` ISO build by running the following command: ++ +[source,terminal] +---- +$ BUILDID=$(sudo composer-cli compose start-ostree --url http://localhost:8085/repo/ --ref "rhel/9/$(uname -m)/edge" microshift-installer edge-installer | awk '{print $2}') +---- ++ +This command also returns the identification (ID) of the build for monitoring. + +. You can check the status of the build periodically by running the following command: ++ +[source,terminal] +---- +$ sudo composer-cli compose status +---- ++ +.Example output for a running build ++ +[source,terminal] +---- +ID Status Time Blueprint Version Type Size +c793c24f-ca2c-4c79-b5b7-ba36f5078e8d RUNNING Wed Jun 7 13:22:20 2023 microshift-installer 0.0.0 edge-installer +---- ++ +.Example output for a completed build ++ +[source,terminal] +---- +ID Status Time Blueprint Version Type Size +c793c24f-ca2c-4c79-b5b7-ba36f5078e8d FINISHED Wed Jun 7 13:34:49 2023 microshift-installer 0.0.0 edge-installer +---- diff --git a/modules/microshift-adding-repos-to-image-builder.adoc b/modules/microshift-adding-repos-to-image-builder.adoc index 2799c9a1b5..2cfc47cbb1 100644 --- a/modules/microshift-adding-repos-to-image-builder.adoc +++ b/modules/microshift-adding-repos-to-image-builder.adoc @@ -11,15 +11,69 @@ Use the following procedure to add the {product-title} repositories to Image Bui .Prerequisites * Your build host meets the Image Builder system requirements. * You have installed and set up Image Builder and the `composer-cli` tool. -* You have root user access to your build host. +* You have root-user access to your build host. .Procedure -* Enable the {product-title} RPM repositories on the build host by running the following command: +. Create an Image Builder configuration file for adding the `rhocp-4.13` RPM repository source required to pull {product-title} RPMs by running the following command: + -[source,terminal,subs="attributes+"] +[source,terminal] ---- -$ sudo subscription-manager repos \ - --enable rhocp-{ocp-version}-for-{rhel-major}-$(uname -i)-rpms \ - --enable fast-datapath-for-{rhel-major}-$(uname -i)-rpms +$ cat > rhocp-4.13.toml < fast-datapath.toml < minimal-microshift.toml < -version = "4.13.0-1" +version = "*" [customizations.services] enabled = ["microshift"] +EOF ---- +[.small] <1> Optional `microshift-greenboot` RPM. For more information, read the "Greenboot health check" guide in the "Running Applications" section. ++ +[NOTE] +==== +The wildcard `*` in the commands uses the latest {product-title} RPMs. If you need a specific version, substitute the wildcard for the version you want. For example, insert `4.13.1` to download the {product-title} 4.13.1 RPMs. +==== + +. Add the blueprint to the Image Builder by running the following command: ++ +[source,terminal] +---- +$ sudo composer-cli blueprints push minimal-microshift.toml +---- + +.Verification + +. Verify the Image Builder configuration listing only {product-title} packages by running the following command: ++ +[source,terminal] +---- +$ sudo composer-cli blueprints depsolve minimal-microshift | grep microshift +---- ++ +.Example output ++ +[source,terminal] +---- +blueprint: minimal-microshift v0.0.1 + microshift-greenboot-4.13.1-202305250827.p0.g4105d3b.assembly.4.13.1.el9.noarch + microshift-networking-4.13.1-202305250827.p0.g4105d3b.assembly.4.13.1.el9.x86_64 + microshift-release-info-4.13.1-202305250827.p0.g4105d3b.assembly.4.13.1.el9.noarch + microshift-4.13.1-202305250827.p0.g4105d3b.assembly.4.13.1.el9.x86_64 + microshift-selinux-4.13.1-202305250827.p0.g4105d3b.assembly.4.13.1.el9.noarch +---- + +. Optional: Verify the Image Builder configuration listing all components to be installed by running the following command: ++ +[source,terminal] +---- +$ sudo composer-cli blueprints depsolve minimal-microshift +---- diff --git a/modules/microshift-creating-ostree-iso.adoc b/modules/microshift-creating-ostree-iso.adoc new file mode 100644 index 0000000000..bb49b8bce4 --- /dev/null +++ b/modules/microshift-creating-ostree-iso.adoc @@ -0,0 +1,108 @@ +// Module included in the following assemblies: +// +// microshift/microshift-embed-into-rpm-ostree.adoc + +:_content-type: PROCEDURE +[id="microshift-creating-ostree-iso_{context}"] += Creating the {op-system-ostree-first} image + +Use the following procedure to create the ISO. The {op-system-ostree} Installer image pulls the commit from the running container and creates an installable boot ISO with a Kickstart file configured to use the embedded OSTree commit. + +.Prerequisites +* Your build host meets the Image Builder system requirements. +* You have installed and set up Image Builder and the `composer-cli` tool. +* You have root-user access to your build host. +* You have the `podman` tool. + +.Procedure + +. Start an `ostree` container image build by running the following command: ++ +[source,terminal] +---- +$ BUILDID=$(sudo composer-cli compose start-ostree --ref "rhel/9/$(uname -m)/edge" minimal-microshift edge-container | awk '{print $2}') +---- ++ +This command also returns the identification (ID) of the build for monitoring. + +. You can check the status of the build periodically by running the following command: ++ +[source,terminal] +---- +$ sudo composer-cli compose status +---- ++ +.Example output of a running build + +[source,terminal] +---- +ID Status Time Blueprint Version Type Size +cc3377ec-4643-4483-b0e7-6b0ad0ae6332 RUNNING Wed Jun 7 12:26:23 2023 minimal-microshift 0.0.1 edge-container +---- ++ +.Example output of a completed build + +[source,terminal] +---- +ID Status Time Blueprint Version Type Size +cc3377ec-4643-4483-b0e7-6b0ad0ae6332 FINISHED Wed Jun 7 12:32:37 2023 minimal-microshift 0.0.1 edge-container +---- ++ +[NOTE] +==== +You can use the `watch` command to monitor your build if you are familiar with how to start and stop it. +==== + +. Download the container image using the ID and get the image ready for use by running the following command: ++ +[source,terminal] +---- +$ sudo composer-cli compose image ${BUILDID} +---- + +. Change the ownership of the downloaded container image to the current user by running the following command: ++ +[source,terminal] +---- +$ sudo chown $(whoami). ${BUILDID}-container.tar +---- + +. Add read permissions for the current user to the image by running the following command: ++ +[source,terminal] +---- +$ sudo chmod a+r ${BUILDID}-container.tar +---- + +. Bootstrap a server on port 8085 for the `ostree` container image to be consumed by the ISO build by completing the following steps: + +.. Get the `IMAGEID` variable result by running the following command: ++ +[source,terminal] +---- +$ IMAGEID=$(cat < "./${BUILDID}-container.tar" | sudo podman load | grep -o -P '(?<=sha256[@:])[a-z0-9]*') +---- + +.. Use the `IMAGEID` variable result to execute the podman command step by running the following command: ++ +[source,terminal] +---- +$ sudo podman run -d --name=minimal-microshift-server -p 8085:8080 ${IMAGEID} +---- ++ +This command also returns the ID of the container saved in the `IMAGEID` variable for monitoring. + +. Generate the installer blueprint file by running the following command: ++ +[source,terminal] +---- +$ cat > microshift-installer.toml </x86_64/edge zerombr clearpart --all --initlabel