Skip to content

Commit 891dd87

Browse files
authored
Merge pull request #70128 from ShaunaDiaz/OSDOCS-8991
OSDOCS-8991: OLM on MicroShift intro
2 parents 9a91e3e + 6bcd031 commit 891dd87

12 files changed

+655
-12
lines changed

_topic_maps/_topic_map_ms.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,8 @@ Topics:
446446
File: microshift-authentication
447447
- Name: Using Operators
448448
File: microshift-operators
449+
- Name: Using Operator Lifecycle Manager
450+
File: microshift-operators-olm
449451
---
450452
Name: Backup and restore
451453
Dir: microshift_backup_and_restore

microshift_install/microshift-embed-in-rpm-ostree.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ include::modules/microshift-adding-repos-to-image-builder.adoc[leveloffset=+1]
2929
* 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]
3030
* 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]
3131

32-
3332
include::modules/microshift-adding-service-to-blueprint.adoc[leveloffset=+1]
3433

3534
include::modules/microshift-adding-olm-to-blueprint.adoc[leveloffset=+1]
3635

3736
[role="_additional-resources"]
3837
.Additional resources
38+
* xref:../microshift_running_apps/microshift-operators-olm.adoc#microshift-operators-olm[Using Operator Lifecycle Manager with {microshift-short}]
3939
* xref:../microshift_updating/microshift-update-rpms-ostree.adoc[Applying updates on an OSTree system]
4040

4141
include::modules/microshift-ca-adding-bundle.adoc[leveloffset=+1]

microshift_install/microshift-install-rpm.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,12 @@ include::modules/microshift-install-rpms.adoc[leveloffset=+1]
3939

4040
include::modules/microshift-install-rpms-olm.adoc[leveloffset=+1]
4141

42-
//TODO: Additional resources section that includes OLM resources when docs are complete
43-
44-
//additional resources for install rpms module
42+
//additional resources for install rpms modules
4543
[role="_additional-resources"]
4644
.Additional resources
47-
* xref:../microshift_install/microshift-install-rpm.adoc#microshift-install-system-requirements_microshift-install-rpm[System requirements for installing MicroShift].
48-
* xref:../microshift_install/microshift-install-rpm.adoc#microshift-install-rpm-preparing_microshift-install-rpm[Preparing to install MicroShift from an RPM package].
45+
* xref:../microshift_install/microshift-install-rpm.adoc#microshift-install-system-requirements_microshift-install-rpm[System requirements for installing MicroShift]
46+
* xref:../microshift_install/microshift-install-rpm.adoc#microshift-install-rpm-preparing_microshift-install-rpm[Preparing to install MicroShift from an RPM package]
47+
* xref:../microshift_running_apps/microshift-operators-olm.adoc#microshift-operators-olm[Using Operator Lifecycle Manager with {microshift-short}]
4948

5049
include::modules/microshift-service-starting.adoc[leveloffset=+1]
5150

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="microshift-operators-olm"]
3+
= Using Operator Lifecycle Manager with {microshift-short}
4+
include::_attributes/attributes-microshift.adoc[]
5+
:context: microshift-operators-olm
6+
7+
toc::[]
8+
9+
The Operator Lifecycle Manager (OLM) package manager is used in {microshift-short} for installing and running optional link:https://access.redhat.com/documentation/en-us/openshift_container_platform/{ocp-version}/html/architecture/control-plane#olm-operators_control-plane[add-on Operators].
10+
11+
* Cluster Operators as applied in {ocp} are not used in {microshift-short}.
12+
* You must create your own catalogs for the add-on Operators you want to use with your applications. Catalogs are not provided by default.
13+
** Each catalog must have an accessible `CatalogSource` added to a cluster, so that the OLM catalog Operator can use the catalog for content.
14+
* You must use the CLI to conduct OLM activities with {microshift-short}. The console and OperatorHub GUIs are not available.
15+
** Use the link:https://access.redhat.com/documentation/en-us/openshift_container_platform/{ocp-version}/html/cli_tools/opm-cli#cli-opm-install[Operator Package Manager `opm` CLI] with network-connected clusters, or for building catalogs for custom Operators that use an internal registry.
16+
** To mirror your catalogs and Operators for disconnected or offline clusters, install link:https://docs.openshift.com/container-platform/{ocp-version}/installing/disconnected_install/installing-mirroring-disconnected.html#installation-oc-mirror-installing-plugin_installing-mirroring-disconnected[the oc-mirror OpenShift CLI plugin].
17+
18+
[IMPORTANT]
19+
====
20+
Before using an Operator, verify with the provider that the Operator is supported on {product-title}.
21+
====
22+
23+
[id="microshift-installing-olm-options_{context}"]
24+
== Determining your OLM installation type
25+
You can install the OLM package manager for use with {microshift-short} 4.15 or newer versions. There are different ways to install OLM for {microshift-short} clusters, depending on your use case.
26+
27+
* You can install the `microshift-olm` RPM at the same time you install the {microshift-short} RPM on {op-system-base-full}.
28+
* You can install the `microshift-olm` on an existing {microshift-short} {product-version}. Restart the {microshift-short} service after installing OLM for the changes to apply.
29+
See xref:../microshift_install/microshift-install-rpm.adoc#microshift-install-rpms-olm_microshift-install-rpm[Installing the Operator Lifecycle Manager (OLM) from an RPM package].
30+
* You can embed OLM in a {op-system-ostree-first} image. See xref:../microshift_install/microshift-embed-in-rpm-ostree.adoc#microshift-adding-olm-to-blueprint_microshift-embed-in-rpm-ostree[Adding the Operator Lifecycle Manager (OLM) service to a blueprint].
31+
32+
include::modules/microshift-olm-namespaces.adoc[leveloffset=+1]
33+
34+
include::modules/microshift-olm-build-op-catalogs.adoc[leveloffset=+1]
35+
36+
//additional resources for builing catalogs module
37+
[role="_additional-resources"]
38+
.Additional resources
39+
* link:https://access.redhat.com/documentation/en-us/openshift_container_platform/{ocp-version}/html/cli_tools/opm-cli[`opm` CLI reference]
40+
* link:https://docs.openshift.com/container-platform/{ocp-version}/operators/understanding/olm-rh-catalogs.html#olm-about-catalogs_olm-rh-catalogs[About Operator catalogs]
41+
* For instructions about creating file-based catalogs by using the `opm` CLI, see link:https://access.redhat.com/documentation/en-us/openshift_container_platform/{ocp-version}/html/operators/administrator-tasks#olm-managing-custom-catalogs[Managing custom catalogs]
42+
43+
include::modules/microshift-olm-deploy-ops-con.adoc[leveloffset=+1]
44+
45+
//additional resources for deploying operators concept module
46+
[role="_additional-resources"]
47+
.Additional resources
48+
* link:https://docs.openshift.com/container-platform/4.14/operators/understanding/olm/olm-understanding-operatorgroups.html#olm-operatorgroups-membership_olm-understanding-operatorgroups[Operator group membership]
49+
50+
include::modules/microshift-olm-deploy-ops-global-ns.adoc[leveloffset=+2]
51+
52+
include::modules/microshift-olm-deploy-ops-spec-ns.adoc[leveloffset=+2]
53+
54+
//additional resources for working with operators after deployment
55+
[role="_additional-resources"]
56+
.Additional resources
57+
* link:https://access.redhat.com/documentation/en-us/openshift_container_platform/{ocp-version}/html/operators/administrator-tasks#olm-upgrading-operators[Updating installed Operators]
58+
* link:https://access.redhat.com/documentation/en-us/openshift_container_platform/{ocp-version}/html/operators/administrator-tasks#olm-deleting-operator-from-a-cluster-using-cli_olm-deleting-operators-from-a-cluster[Deleting Operators from a cluster using the CLI]
59+
60+
include::modules/microshift-olm-deploy-op-disconnected.adoc[leveloffset=+2]
61+
62+
//additional resources for deploying operators in disconnected and offline environments
63+
[role="_additional-resources"]
64+
.Additional resources
65+
* link:https://access.redhat.com/documentation/en-us/openshift_container_platform/{ocp-version}/html/operators/administrator-tasks#olm-restricted-networks[Using Operator Lifecycle Manager on restricted networks] for more information.
66+
* link:https://docs.openshift.com/container-platform/{ocp-version}/installing/disconnected_install/installing-mirroring-disconnected.html#installing-mirroring-disconnected[Mirroring images for a disconnected installation using the oc-mirror plugin]
67+
* xref:../microshift_install/microshift-deploy-with-mirror-registry.adoc#microshift-configuring-hosts-for-mirror_microshift-deployment-mirror[Configuring hosts for mirror registry access]
68+
* xref:../microshift_networking/microshift-disconnected-network-config.adoc#microshift-disconnected-network-config[Configuring network settings for fully disconnected hosts]
69+
* xref:../microshift_install/microshift-deploy-with-mirror-registry.adoc#microshift-get-mirror-reg-container-image-list_microshift-deploy-with-mirror-registry[Getting the mirror registry container image list]
70+
* xref:../microshift_install/microshift-embed-in-rpm-ostree-offline-use.adoc#microshift-embed-in-rpm-ostree-offline-use[Embedding in a {op-system-ostree} image for offline use]
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:_mod-docs-content-type: ASSEMBLY
22
[id="operators-with-microshift"]
3-
= How Operators work with {microshift-short}
3+
= Using Operators with {microshift-short}
44
include::_attributes/attributes-microshift.adoc[]
55
:context: operators-microshift
66

@@ -10,9 +10,17 @@ You can use Operators with {microshift-short} to create applications that monito
1010

1111
Operators offer a more localized configuration experience and integrate with Kubernetes APIs and CLI tools such as `kubectl` and `oc`. Operators are designed specifically for your applications. Operators enable you to configure components instead of modifying a global configuration file.
1212

13-
{microshift-short} applications are generally expected to be deployed in static environments. However, Operators are available if helpful in your use case. To determine an Operator's compatibility with {microshift-short}, check the Operator's documentation.
13+
{microshift-short} applications are generally expected to be deployed in static environments. However, Operators are available if helpful in your use case. To determine the compatibility of an Operator with {microshift-short}, check the Operator documentation.
1414

15-
[id="how-to-install-operators_{context}"]
16-
== How to install Operators in {microshift-short}
15+
[id="microshift-operators-installation-paths_{context}"]
16+
== How to use Operators with {microshift-short} clusters
1717

18-
To minimize the footprint of {microshift-short}, Operators are installed directly with manifests instead of using the Operator Lifecycle Manager (OLM). You can use the `kustomize` configuration management tool with {microshift-short} to deploy an application. Use the same steps to install Operators with manifests. Read xref:../microshift_running_apps/microshift-applications.adoc#microshift-manifests-overview_applications-microshift[Using Kustomize manifests to deploy applications] for more information about manifests.
18+
There are two ways to use Operators for your {microshift-short} clusters:
19+
20+
[id="microshift-operators-paths-manifests_{context}"]
21+
=== Manifests for Operators
22+
* Operators can be installed and managed directly by using manifests. You can use the `kustomize` configuration management tool with {microshift-short} to deploy an application. Use the same steps to install Operators with manifests. See xref:../microshift_running_apps/microshift-applications.adoc#microshift-manifests-overview_applications-microshift[Using Kustomize manifests to deploy applications] and xref:../microshift_running_apps/microshift-applications.adoc#microshift-applying-manifests-example_applications-microshift[Using manifests example] for details.
23+
24+
[id="microshift-operators-paths-olm_{context}"]
25+
=== Operator Lifecycle Manager for Operators
26+
* You can also install add-on Operators to a {microshift-short} cluster using Operator Lifecycle Manager (OLM). OLM can be used to manage both custom Operators and Operators that are widely available. Building catalogs is required to use OLM with {microshift-short}. For details, see xref:../microshift_running_apps/microshift-operators-olm.adoc#microshift-operators-olm[Using Operator Lifecycle Manager with {microshift-short}].

modules/microshift-get-mirror-reg-container-image-list.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="microshift-get-mirror-reg-container-image-list_{context}"]
7-
= Getting the {microshift-short} mirror registry container image list
7+
= Getting the mirror registry container image list
88

99
To use a mirror registry, you must know which container image references are used by a specific version of {microshift-short}. These references are provided in the `release-<arch>.json` files that are part of the `microshift-release-info` RPM package.
1010

11+
[NOTE]
12+
====
13+
To mirror the Operator Lifecycle Manager (OLM) in disconnected environments, add the references provided in the `release-olm-$ARCH.json` that is included in the `microshift-olm` RPM and follow the same procedure. Use `oc-mirror` for mirroring Operator catalogs and Operators.
14+
====
15+
1116
.Prerequisites
1217

1318
* You have installed jq.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//Module included in the following assemblies:
2+
//
3+
//* microshift_running_apps/microshift-operators-olm.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="microshift-options-building-operator-catalogs_{context}"]
7+
= About building Operator catalogs
8+
9+
To use Operator Lifecycle Manager (OLM) with {microshift-short}, you must build custom Operator catalogs that you can then manage with OLM. The standard catalogs that are included with {OCP} are not included with {microshift-short}.
10+
11+
[id="microshift-file-based-olm-catalogs_{context}"]
12+
== File-based Operator catalogs
13+
You can create catalogs for your custom Operators or filter catalogs of widely available Operators. You can combine both methods to create the catalogs needed for your specific use case. To run {microshift-short} with your own Operators and OLM, make a catalog by using the file-based catalog structure.
14+
15+
* For details, see link:https://docs.openshift.com/container-platform/4.14/operators/admin/olm-managing-custom-catalogs.html#olm-creating-fb-catalog-image_olm-managing-custom-catalogs[Managing custom catalogs] and link:https://access.redhat.com/documentation/en-us/openshift_container_platform/{ocp-version}/html/operators/understanding-operators#olm-fb-catalogs-example_olm-packaging-format[Example catalog].
16+
17+
* See also link:https://access.redhat.com/documentation/en-us/openshift_container_platform/{ocp-version}/html/cli_tools/opm-cli[`opm` CLI reference].
18+
19+
[IMPORTANT]
20+
====
21+
* When link:https://access.redhat.com/documentation/en-us/openshift_container_platform/{ocp-version}/html/operators/administrator-tasks#olm-creating-catalog-from-index_olm-restricted-networks[adding a catalog source to a cluster], set the `securityContextConfig` value to `restricted` in the `catalogSource.yaml` file. Ensure that your catalog can run with `restricted` permissions.
22+
====
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//Module included in the following assemblies:
2+
//
3+
//* microshift_running_apps/microshift-operators-olm.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="microshift-adding-OLM-Operators-to-offline-cluster_{context}"]
7+
= About adding OLM-based Operators to an offline cluster
8+
9+
For {microshift-short} clusters that are installed on disconnected or offline clusters, Operator Lifecycle Manager (OLM) by default cannot access sources hosted on remote registries because those remote sources require full internet connectivity.
10+
11+
The following steps are required to use OLM-based Operators in offline situations:
12+
13+
* Include OLM in your container image list for your mirror registry.
14+
* Configure the system to use the mirror by updating your CRI-O configuration directly. `ImageContentSourcePolicy` is not supported in {microshift-short}.
15+
* Add a `CatalogSource` object to the cluster so that the OLM catalog Operator can use the local catalog on the mirror registry.
16+
* Ensure that {microshift-short} is installed to run in an offline capacity.
17+
* Ensure that the network settings are configured to run in a disconnected mode.
18+
19+
After enabling OLM in an offline cluster, you can continue to use your unrestricted workstation to keep your local catalog sources updated as newer versions of Operators are released.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//Module included in the following assemblies:
2+
//
3+
//* microshift_running_apps/microshift-operators-olm.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="microshift-deploy-operators_{context}"]
7+
= How to deploy Operators
8+
9+
After you create and deploy your custom catalog, you must create a Subscription custom resource (CR) that can access the catalog and install the Operators you choose. Where Operators run depends on the namespace in which you create the Subscription CR.
10+
11+
[IMPORTANT]
12+
====
13+
Operators in OLM have a watch scope. For example, some Operators only support watching their own namespace, while others support watching every namespace in the cluster. All Operators installed in a given namespace must have the same watch scope.
14+
====
15+
16+
[id="microshift-operators-connection-details_{context}"]
17+
== Connectivity and Operator deployment
18+
Operators can be deployed anywhere a catalog is running.
19+
20+
* For clusters that are connected to the internet, mirroring images is not required. Images can be pulled over the network.
21+
* For restricted networks in which {microshift-short} has access to an internal network only, images must be mirrored to an internal registry.
22+
* For use cases in which {microshift-short} clusters are completely offline, all images must be embedded into an `osbuild` blueprint.
23+
//TODO point to correct ref docs

0 commit comments

Comments
 (0)