Skip to content

Commit 70adbe2

Browse files
fzdarskyShaunaDiaz
authored andcommitted
Add embedding MicroShift
Signed-off-by: Frank A. Zdarsky <[email protected]>
1 parent 5a41103 commit 70adbe2

24 files changed

+404
-64
lines changed

_topic_maps/_topic_map_ms.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ Distros: microshift
5353
Topics:
5454
- Name: Installing from RPM
5555
File: microshift-install-rpm
56-
#- Name: Installing in a RHEL for Edge Image
57-
# File: microshift-install-rhel-for-edge
56+
- Name: Embedding in a RHEL for Edge image
57+
File: microshift-embed-in-rpm-ostree
5858
---
5959
Name: API reference
6060
Dir: microshift_rest_api
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
:_content-type: ASSEMBLY
2+
[id="microshift-embed-in-rpm-ostree"]
3+
= Embedding {product-title} in a {op-system-ostree} image
4+
include::_attributes/attributes-microshift.adoc[]
5+
:context: microshift-embed-in-rpm-ostree
6+
7+
toc::[]
8+
9+
You can embed {product-title} into a {op-system-ostree-first} {op-system-version} image. Use the content within this section to build a {op-system-ostree-first} {op-system-version} image containing {product-title}.
10+
11+
[IMPORTANT]
12+
====
13+
Red Hat does not support an update path from Developer Preview and Technology Preview versions to later versions of {product-title}. A new installation will be necessary.
14+
====
15+
16+
[id="preparing-for-image-building_{context}"]
17+
== Preparing for image building
18+
19+
Familiarize yourself with the documentation about https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/composing_installing_and_managing_rhel_for_edge_images[Composing, installing, and managing RHEL for Edge images].
20+
21+
[IMPORTANT]
22+
====
23+
{product-title} deployments have only been tested with {op-system-ostree-first} {op-system-version}. Other versions of {op-system} are not recommended.
24+
====
25+
26+
To build an {op-system-ostree-first} {op-system-version} image for a given CPU architecture, you need a {op-system} {op-system-version} build host of the same CPU architecture that meets the https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/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].
27+
28+
Follow the instructions in https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/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] to install Image Builder and the `composer-cli` tool.
29+
30+
//include::modules/microshift-preparing-for-image-building.adoc[leveloffset=+1]
31+
32+
include::modules/microshift-adding-repos-to-image-builder.adoc[leveloffset=+1]
33+
34+
[role="_additional-resources"]
35+
.Additional resources
36+
37+
* https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/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].
38+
* https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/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].
39+
40+
include::modules/microshift-adding-service-to-blueprint.adoc[leveloffset=+2]
41+
42+
[role="_additional-resources"]
43+
.Additional resources
44+
45+
* For further customizations such as adding users, firewall rules, or kernel arguments to a blueprint, see 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#image-customizations_composing-a-rhel-for-edge-image-using-image-builder-command-line[supported image customizations].
46+
47+
include::modules/microshift-adding-containers-to-blueprint.adoc[leveloffset=+2]
48+
include::modules/microshift-provisioning-ostree.adoc[leveloffset=+1]
49+
50+
[role="_additional-resources"]
51+
.Additional resources
52+
53+
. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/composing_installing_and_managing_rhel_for_edge_images/index[{op-system-ostree} documentation].
54+
. xref:../microshift_install/microshift-install-rpm.adoc#system-requirements-installing-microshift[System requirements for installing {product-title}].
55+
. Red Hat Hybrid Cloud Console link:https://console.redhat.com/openshift/install/pull-secret[pull secret].
56+
. xref:../microshift_networking/microshift_networking.doc#microshift-firewall-req-settings[Required firewall settings].
57+
. link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_an_advanced_rhel_8_installation/creating-kickstart-files_installing-rhel-as-an-experienced-user[Creating a kickstart file]
58+
. link:https://access.redhat.com/solutions/60959[How to embed a Kickstart file into an ISO image]
59+
60+
include::modules/microshift-accessing.adoc[leveloffset=+1]
61+
include::modules/microshift-accessing-cluster-locally.adoc[leveloffset=+2]
62+
include::modules/microshift-accessing-cluster-remotely-admin.adoc[leveloffset=+2]
63+
include::modules/microshift-accessing-cluster-remotely-non-admin.adoc[leveloffset=+2]

microshift_install/microshift-install-rhel-for-edge.adoc

Lines changed: 0 additions & 23 deletions
This file was deleted.

microshift_install/microshift-install-rpm.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can install {product-title} from an RPM package on a machine with {op-system
99

1010
[IMPORTANT]
1111
====
12-
Red Hat will not provide or support an update or upgrade path from Developer Preview and Technology Preview versions to later versions of {product-title}. A new installation will be necessary.
12+
Red Hat does not support an update path from Developer Preview and Technology Preview versions to later versions of {product-title}. A new installation will be necessary.
1313
====
1414

1515
include::modules/microshift-install-system-requirements.adoc[leveloffset=+1]
@@ -46,4 +46,5 @@ include::modules/microshift-accessing.adoc[leveloffset=+1]
4646

4747
include::modules/microshift-accessing-cluster-locally.adoc[leveloffset=+2]
4848

49-
include::modules/microshift-accessing-cluster-remotely.adoc[leveloffset=+2]
49+
include::modules/microshift-accessing-cluster-remotely-admin.adoc[leveloffset=+2]
50+
include::modules/microshift-accessing-cluster-remotely-non-admin.adoc[leveloffset=+2]

modules/embedding-microshift-rpm-ostree-image.adoc

Lines changed: 0 additions & 16 deletions
This file was deleted.

modules/microshift-accessing-cluster-locally.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@ $ sudo cat /var/lib/microshift/resources/kubeadmin/kubeconfig > ~/.kube/config
3434
----
3535
$ oc get all -A
3636
----
37-
//Q: when and where was the kubeconfig file generated?
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Module included in the following assemblies:
2+
//
3+
// microshift/microshift-install-rpm.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="accessing-microshift-cluster-remotely-as-admin_{context}"]
7+
= Accessing the {product-title} cluster remotely as admin
8+
9+
Use the following procedure to access the {product-title} cluster as an admin. Your account must have cluster admin privileges. This procedure must be completed before a workstation user can access the cluster remotely.
10+
11+
* `user@microshift`, is the user on the {product-title} host machine and is responsible for setting up that machine so that it can be accessed by a remote user on a separate workstation.
12+
13+
.Prerequisites
14+
15+
* You have installed the the `oc` binary.
16+
17+
.Procedure
18+
19+
. As `user@microshift` on the {product-title} host, open the firewall port for the Kubernetes API server (`6443/tcp`) by running the following command:
20+
+
21+
[source,terminal]
22+
----
23+
[user@microshift]$ sudo firewall-cmd --permanent --zone=public --add-port=6443/tcp && sudo firewall-cmd --reload
24+
----
25+
26+
.Verify {product-title} is running
27+
28+
. As `user@microshift`, verify that {product-title} is running by running the following command:
29+
+
30+
[source,terminal]
31+
----
32+
[user@microshift]$ oc get all -A
33+
----

modules/microshift-accessing-cluster-remotely.adoc renamed to modules/microshift-accessing-cluster-remotely-non-admin.adoc

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,23 @@
22
//
33
// microshift/microshift-install-rpm.adoc
44

5-
:_content-type: CONCEPT
6-
[id="accessing-microshift-cluster-remotely_{context}"]
7-
= Accessing the {product-title} cluster remotely
5+
:_content-type: PROCEDURE
6+
[id="accessing-microshift-cluster-remotely-non-admin_{context}"]
7+
= Accessing the {product-title} cluster remotely from a workstation
88

9-
Use the following procedure to access the {product-title} cluster from a remote workstation. The procedure assumes that there are two users:
9+
Use the following procedure to access the {product-title} cluster from a remote workstation.
1010

11-
* The first user, `user@microshift`, is the user on the {product-title} host machine and is responsible for setting up the `op-system` machine so that it can be accessed by a remote user on a separate workstation.
12-
13-
* The second user, `user@workstation`, accesses the {op-system} machine remotely from their workstation. The `<user>` value in the procedure is the name of the user that `user@workstation` uses to log in to the {product-title} host.
11+
* `user@workstation`, accesses the host machine remotely. The `<user>` value in the procedure is the name of the user that `user@workstation` logs in with to the {product-title} host.
1412
1513
.Prerequisites
1614

1715
* You have installed the the `oc` binary.
1816
19-
.Procedure
17+
* The `@user@microshift` has opened the firewall.
2018
21-
. As `user@microshift` on the {product-title} host, open the firewall port for the Kubernetes API server (`6443/tcp`) by running the following command:
22-
+
23-
[source,terminal]
24-
----
25-
[user@microshift]$ sudo firewall-cmd --permanent --zone=public --add-port=6443/tcp && sudo firewall-cmd --reload
26-
----
19+
.Procedure
2720

28-
. Optional: As `user@workstation`, to create a `~/.kube/` folder if your {op-system} machine does not have one, run the following command:
21+
. As `user@workstation`, to create a `~/.kube/` folder if your {op-system} machine does not have one, run the following command:
2922
+
3023
[source,terminal]
3124
----

modules/microshift-accessing.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// microshift/microshift-install-rpm.adoc
44

55
:_content-type: CONCEPT
6-
[id="accssing-microshift-cluster_{context}"]
6+
[id="accessing-microshift-cluster_{context}"]
77
= Accessing the {product-title} cluster
88

9-
Use the procedures in this section to access the {product-title} cluster locally, either from the same machine running the {product-title} service or remotely from a different machine running the {product-title} service.
9+
Use the procedures in this section to access the {product-title} cluster locally, either from the same machine running the {product-title} service or remotely from a workstation. You can use this access to observe and administrate workloads.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Module included in the following assemblies:
2+
//
3+
// microshift/microshift-embed-into-rpm-ostree.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="adding-{product-title}-container-images_{context}"]
7+
= Adding the {product-title} container images
8+
9+
You can embed {product-title}'s container images into the {op-system-ostree} images so that they are immediately available to the CRI-O container engine after booting. Embedded container images are not pulled over the network from a container registry. In Image Builder, a container image is embedded by adding a reference to it to the Image Builder blueprint.
10+
11+
The following syntax must be used to add a configuration section to the blueprint file. You can then add your the container image to embed in the {op-system-ostree} image.
12+
13+
.Example syntax for adding a container image to a blueprint
14+
15+
[source,toml]
16+
----
17+
[[containers]]
18+
source = "<image_pullspec_with_tag_or_digest>"
19+
----
20+
21+
.Prerequisites
22+
23+
* You have installed jq.
24+
25+
.Procedure
26+
27+
You must have the exact list of container image references used by the {product-title} version to embed {product-title}'s container images. Use the `microshift-release-info` RPM package matching the version of the `microshift` RPM in your blueprint. Use the following procedure.
28+
29+
. Download the `microshift-release-info` RPM package matching your {product-title} version by running the following commands:
30+
+
31+
[source,terminal]
32+
----
33+
$ VERSION=$(rpm -q --queryformat='%{VERSION}-%{RELEASE}.%{ARCH}' microshift)
34+
----
35+
+
36+
[source,terminal]
37+
----
38+
$ yum download microshift-release-info-${VERSION}
39+
----
40+
41+
. Extract the release info by running the following command:
42+
+
43+
[source,terminal]
44+
----
45+
$ rpm2cpio microshift-release-info-${VERSION}.rpm | cpio -idmv
46+
./usr/share/microshift/release/release-aarch64.json
47+
./usr/share/microshift/release/release-x86_64.json
48+
----
49+
50+
. Generate the lines to append to your blueprint using the release info for your CPU architecture by running the following command:
51+
+
52+
[source,terminal]
53+
----
54+
$ jq -r '.images | .[] | ("[[containers]]\nsource = \"" + . + "\"\n")' ./usr/share/microshift/release/release-$(uname -i).json
55+
----
56+
+
57+
.Brief output sample
58+
+
59+
[source, toml]
60+
----
61+
[[containers]]
62+
source = "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:9945c3f5475a37e145160d2fe6bb21948f1024a856827bc9e7d5bc882f44a750"
63+
64+
[[containers]]
65+
source = "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:82cfef91557f9a70cff5a90accba45841a37524e9b93f98a97b20f6b2b69e5db"
66+
----

0 commit comments

Comments
 (0)