Skip to content

Commit

Permalink
Add platform Operator and RukPak docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adellape committed Jan 3, 2023
1 parent 995b6b3 commit 376c1fa
Show file tree
Hide file tree
Showing 22 changed files with 672 additions and 13 deletions.
3 changes: 3 additions & 0 deletions _topic_maps/_topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,9 @@ Topics:
- Name: Using OLM on restricted networks
File: olm-restricted-networks
Distros: openshift-origin,openshift-enterprise
- Name: Managing platform Operators
File: olm-managing-po
Distros: openshift-enterprise,openshift-origin
- Name: Developing Operators
Dir: operator_sdk
Distros: openshift-origin,openshift-enterprise
Expand Down
11 changes: 11 additions & 0 deletions architecture/control-plane.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ include::modules/arch-olm-operators.adoc[leveloffset=+2]
* For more details on running add-on Operators in {product-title}, see the _Operators_ guide sections on xref:../operators/understanding/olm/olm-understanding-olm.adoc#olm-understanding-olm[Operator Lifecycle Manager (OLM)] and xref:../operators/understanding/olm-understanding-operatorhub.adoc#olm-understanding-operatorhub[OperatorHub].
* For more details on the Operator SDK, see xref:../operators/operator_sdk/osdk-about.adoc#osdk-about[Developing Operators].
ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
include::modules/arch-platform-operators.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
* xref:../operators/admin/olm-managing-po.adoc#olm-managing-po[Managing platform Operators]
* xref:../operators/admin/olm-managing-po.adoc#olm-po-techpreview_olm-managing-po[Technology Preview restrictions for platform Operators]
* xref:../operators/understanding/olm-packaging-format.adoc#olm-rukpak-about_olm-packaging-format[RukPak component and packaging format]
* xref:../post_installation_configuration/cluster-capabilities.adoc#cluster-capabilities[Cluster capabilities]
endif::[]
include::modules/update-service-overview.adoc[leveloffset=+1]

include::modules/understanding-machine-config-operator.adoc[leveloffset=+1]
Expand Down
25 changes: 25 additions & 0 deletions modules/arch-platform-operators.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Module included in the following assemblies:
//
// * architecture/control-plane.adoc
// * operators/admin/olm-managing-po.adoc

:_content-type: CONCEPT

ifeval::["{context}" == "control-plane"]
[id="platform-operators_{context}"]
= Platform Operators (Technology Preview)

:FeatureName: The platform Operator type
include::snippets/technology-preview.adoc[]
endif::[]

ifeval::["{context}" == "olm-managing-po"]
[id="platform-operators_{context}"]
= About platform Operators
endif::[]

Operator Lifecycle Manager (OLM) introduces a new type of Operator called _platform Operators_. A platform Operator is an OLM-based Operator that can be installed during or after an {product-title} cluster's Day 0 operations and participates in the cluster's lifecycle. As a cluster administrator, you can use platform Operators to further customize your {product-title} installation to meet your requirements and use cases.

Using the existing cluster capabilities feature in {product-title}, cluster administrators can already disable a subset of Cluster Version Operator-based (CVO) components considered non-essential to the initial payload prior to cluster installation. Platform Operators iterate on this model by providing additional customization options. Through the platform Operator mechanism, which relies on resources from the RukPak component, OLM-based Operators can now be installed at cluster installation time and can block cluster rollout if the Operator fails to install successfully.

In {product-title} 4.12, this Technology Preview release focuses on the basic platform Operator mechanism and builds a foundation for expanding the concept in upcoming releases. You can use the cluster-wide `PlatformOperator` API to configure Operators before or after cluster creation on clusters that have enabled the `TechPreviewNoUpgrades` feature set.
65 changes: 65 additions & 0 deletions modules/olm-deleting-po.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Module included in the following assemblies:
//
// * operators/admin/olm-managing-po.adoc

:_content-type: PROCEDURE
[id="olm-deleting-po_{context}"]
= Deleting platform Operators

As a cluster administrator, you can delete existing platform Operators. Operator Lifecycle Manager (OLM) performs a cascading deletion. First, OLM removes the bundle deployment for the platform Operator, which then deletes any objects referenced in the `registry+v1` type bundle.

[NOTE]
====
The platform Operator manager and bundle deployment provisioner only manage objects that are referenced in the bundle, but not objects subsequently deployed by any bundle workloads themselves. For example, if a bundle workload creates a namespace and the Operator is not configured to clean it up before the Operator is removed, it is outside of the scope of OLM to remove the namespace during platform Operator deletion.
====

.Procedure

. Get a list of installed platform Operators and find the name for the Operator you want to delete:
+
[source,terminal]
----
$ oc get platformoperator
----

. Delete the `PlatformOperator` resource for the chosen Operator, for example, for the Quay Operator:
+
[source,terminal]
----
$ oc delete platformoperator quay-operator
----
+
.Example output
[source,terminal]
----
platformoperator.platform.openshift.io "quay-operator" deleted
----

.Verification

. Verify the namespace for the platform Operator is eventually deleted, for example, for the Quay Operator:
+
[source,terminal]
----
$ oc get ns quay-operator-system
----
+
.Example output
[source,terminal]
----
Error from server (NotFound): namespaces "quay-operator-system" not found
----

. Verify the `platform-operators-aggregated` cluster Operator continues to report an `Available=True` status:
+
[source,terminal]
----
$ oc get co platform-operators-aggregated
----
+
.Example output
[source,terminal]
----
NAME VERSION AVAILABLE PROGRESSING DEGRADED SINCE MESSAGE
platform-operators-aggregated 4.12.0-0 True False False 70s
----
2 changes: 1 addition & 1 deletion modules/olm-installing-from-operatorhub-using-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ endif::[]
[id="olm-installing-operator-from-operatorhub-using-cli_{context}"]
= Installing from OperatorHub using the CLI

Instead of using the {product-title} web console, you can install an Operator from OperatorHub using the CLI. Use the `oc` command to create or update a `Subscription` object.
Instead of using the {product-title} web console, you can install an Operator from OperatorHub by using the CLI. Use the `oc` command to create or update a `Subscription` object.

.Prerequisites

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ endif::[]
[id="olm-installing-from-operatorhub-using-web-console_{context}"]
= Installing from OperatorHub using the web console

You can install and subscribe to an Operator from OperatorHub using the {product-title} web console.
You can install and subscribe to an Operator from OperatorHub by using the {product-title} web console.

.Prerequisites

Expand Down
4 changes: 2 additions & 2 deletions modules/olm-installing-operators-from-operatorhub.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ endif::[]
OperatorHub is a user interface for discovering Operators; it works in conjunction with Operator Lifecycle Manager (OLM), which installs and manages Operators on a cluster.

ifndef::olm-user[]
As a cluster administrator, you can install an Operator from OperatorHub using the {product-title}
As a cluster administrator, you can install an Operator from OperatorHub by using the {product-title}
ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
web console or CLI. Subscribing an Operator to one or more namespaces makes the Operator available to developers on your cluster.
endif::[]
endif::[]

ifdef::olm-user[]
As a user with the proper permissions, you can install an Operator from OperatorHub using the {product-title} web console or CLI.
As a user with the proper permissions, you can install an Operator from OperatorHub by using the {product-title} web console or CLI.
endif::[]

During installation, you must determine the following initial settings for the Operator:
Expand Down
87 changes: 87 additions & 0 deletions modules/olm-installing-po-after.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// Module included in the following assemblies:
//
// * operators/admin/olm-managing-po.adoc

:_content-type: PROCEDURE
[id="olm-installing-po-after_{context}"]
= Installing platform Operators after cluster creation

As a cluster administrator, you can install platform Operators after cluster creation on clusters that have enabled the `TechPreviewNoUpgrades` feature set by using the cluster-wide `PlatformOperator` API.

.Procedure

. Choose a platform Operator from the supported set of OLM-based Operators. For the list of this set and details on current limitations, see "Technology Preview restrictions for platform Operators".

. Create a `PlatformOperator` object YAML file for your chosen platform Operator, for example a `cert-manager.yaml` file for the {cert-manager-operator}:
+
.Example `cert-manager.yaml` file
[source,yaml]
----
apiVersion: platform.openshift.io/v1alpha1
kind: PlatformOperator
metadata:
name: cert-manager
spec:
package:
name: openshift-cert-manager-operator
----

. Create the `PlatformOperator` object by running the following command:
+
[source,terminal]
----
$ oc apply -f cert-manager.yaml
----

.Verification

. Check the status of the `cert-manager` platform Operator by running the following command:
+
[source,terminal]
----
$ oc get platformoperator cert-manager -o yaml
----
+
.Example output
[source,yaml]
----
...
status:
activeBundleDeployment:
name: cert-manager
conditions:
- lastTransitionTime: "2022-10-24T17:24:40Z"
message: Successfully applied the cert-manager BundleDeployment resource
reason: InstallSuccessful
status: "True" <1>
type: Installed
----
<1> Wait until the `Installed` status condition reports `True`.

. Verify that the `platform-operators-aggregated` cluster Operator is reporting an `Available=True` status:
+
[source,terminal]
----
$ oc get clusteroperator platform-operators-aggregate -o yaml
----
+
.Example output
[source,yaml]
----
...
status:
conditions:
- lastTransitionTime: "2022-10-24T17:43:26Z"
message: All platform operators are in a successful state
reason: AsExpected
status: "False"
type: Progressing
- lastTransitionTime: "2022-10-24T17:43:26Z"
status: "False"
type: Degraded
- lastTransitionTime: "2022-10-24T17:43:26Z"
message: All platform operators are in a successful state
reason: AsExpected
status: "True"
type: Available
----
117 changes: 117 additions & 0 deletions modules/olm-installing-po-during.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// Module included in the following assemblies:
//
// * operators/admin/olm-managing-po.adoc

:_content-type: PROCEDURE
[id="olm-installing-po-during_{context}"]
= Installing platform Operators during cluster creation

As a cluster administrator, you can install platform Operators by providing `FeatureGate` and `PlatformOperator` manifests during cluster creation.

.Procedure

. Choose a platform Operator from the supported set of OLM-based Operators. For the list of this set and details on current limitations, see "Technology Preview restrictions for platform Operators".

. Select a cluster installation method and follow the instructions through creating an `install-config.yaml` file. For more details on preparing for a cluster installation, see "Selecting a cluster installation method and preparing it for users".

. After you have created the `install-config.yaml` file and completed any modifications to it, change to the directory that contains the installation program and create the manifests:
+
[source,terminal]
----
$ ./openshift-install create manifests --dir <installation_directory> <1>
----
<1> For `<installation_directory>`, specify the name of the directory that contains the `install-config.yaml` file for your cluster.

. Create a `FeatureGate` object YAML file in the `<installation_directory>/manifests/` directory that enables the `TechPreviewNoUpgrade` feature set, for example a `feature-gate.yaml` file:
+
.Example `feature-gate.yaml` file
[source,yaml]
----
apiVersion: config.openshift.io/v1
kind: FeatureGate
metadata:
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
release.openshift.io/create-only: "true"
name: cluster
spec:
featureSet: TechPreviewNoUpgrade <1>
----
<1> Enable the `TechPreviewNoUpgrade` feature set.

. Create a `PlatformOperator` object YAML file for your chosen platform Operator in the `<installation_directory>/manifests/` directory, for example a `cert-manager.yaml` file for the {cert-manager-operator}:
+
.Example `cert-manager.yaml` file
[source,yaml]
----
apiVersion: platform.openshift.io/v1alpha1
kind: PlatformOperator
metadata:
name: cert-manager
spec:
package:
name: openshift-cert-manager-operator
----

. When you are ready to complete the cluster install, refer to your chosen installation method and continue through running the `openshift-install create cluster` command.
+
During cluster creation, your provided manifests are used to enable the `TechPreviewNoUpgrade` feature set and install your chosen platform Operator.
+
[IMPORTANT]
====
Failure of the platform Operator to successfully install will block the cluster installation process.
====

.Verification

. Check the status of the `cert-manager` platform Operator by running the following command:
+
[source,terminal]
----
$ oc get platformoperator cert-manager -o yaml
----
+
.Example output
[source,yaml]
----
...
status:
activeBundleDeployment:
name: cert-manager
conditions:
- lastTransitionTime: "2022-10-24T17:24:40Z"
message: Successfully applied the cert-manager BundleDeployment resource
reason: InstallSuccessful
status: "True" <1>
type: Installed
----
<1> Wait until the `Installed` status condition reports `True`.

. Verify that the `platform-operators-aggregated` cluster Operator is reporting an `Available=True` status:
+
[source,terminal]
----
$ oc get clusteroperator platform-operators-aggregate -o yaml
----
+
.Example output
[source,yaml]
----
...
status:
conditions:
- lastTransitionTime: "2022-10-24T17:43:26Z"
message: All platform operators are in a successful state
reason: AsExpected
status: "False"
type: Progressing
- lastTransitionTime: "2022-10-24T17:43:26Z"
status: "False"
type: Degraded
- lastTransitionTime: "2022-10-24T17:43:26Z"
message: All platform operators are in a successful state
reason: AsExpected
status: "True"
type: Available
----
Loading

0 comments on commit 376c1fa

Please sign in to comment.