diff --git a/content/contribute/creating-a-pattern.adoc b/content/contribute/creating-a-pattern.adoc index 5d18b1117..03c7e9a40 100644 --- a/content/contribute/creating-a-pattern.adoc +++ b/content/contribute/creating-a-pattern.adoc @@ -51,9 +51,9 @@ There are 4 values files that make up any Validated Pattern. The values files a == Operators into framework -We begin our journey by identifying what application services are needed to run the workload. The Cloud Native Operator framework provides a way of managing the lifecycle of application services that are needed by the application workload. The validated pattern framework gives you a way to describe these Operators in a values file that is specific to your pattern and the site type. +We begin our journey by identifying what application services are needed to run the workload. The Cloud Native Operator framework provides a way of managing the lifecycle of application services that are needed by the application workload. The validated pattern framework gives you a way to describe these Operators in a values file that is specific to your pattern and the site type. -So for example if we wish deploy Advanced Cluster Management, AMQ (messaging) and AMQ Streams (Kafka) in our datacenter, we would make the following subscription entries in our `values-datacenter.yaml` file: +So for example if we want deploy Advanced Cluster Management, AMQ (messaging) and AMQ Streams (Kafka) in our datacenter, we would make the following subscription entries in our `values-datacenter.yaml` file: [source,yaml] ---- diff --git a/content/learn/vp_add_ops_to_pattern.adoc b/content/learn/vp_add_ops_to_pattern.adoc new file mode 100644 index 000000000..d1f513216 --- /dev/null +++ b/content/learn/vp_add_ops_to_pattern.adoc @@ -0,0 +1,67 @@ +--- +menu: + learn: + parent: Validated patterns frameworks +title: Adding Operators to the framework +weight: 23 +aliases: /ocp-framework/adding-operator-to-framework/ +--- + +:toc: +:imagesdir: /images +:_content-type: PROCEDURE +include::modules/comm-attributes.adoc[] + +Subscriptions are defined in the values files and they are OpenShift Operator subscriptions from the Operator Hub. Subscriptions contribute to the creation of a software bill of materials (SBOM), detailing all intended installations within the ClusterGroup. For example in `values-hub.yaml`, the subscriptions defined in the subscriptions section specify Operators that are installed in the hub cluster when you deploy the validated pattern. + +This procedure describes how subscriptions to Operators are added to the validated pattern framework. + +.Procedure + +=== 1. Identify required application services +* Decide the application services necessary to support the workload. +* These services are managed through Operators, which handle their lifecycle within OpenShift. + +=== 2. Define Operators in the values file +* Use the validated pattern framework to specify required Operators in a values file (`values-.yaml`). +* This file should reflect the specific pattern and site type where the Operators will be deployed. + +=== 3. Add subscription entries +* Define the required Operators by adding subscription entries in the `values-.yaml` file. +* Each entry should specify: + ** The Operator name + ** The namespace where it should be deployed + ** The subscription channel + ** The ClusterServiceVersion (CSV) + +.Example: Deploying Advanced Cluster Management, AMQ, and AMQ Streams + +For example, if you want to deploy Advanced Cluster Management, AMQ (messaging) and AMQ Streams (Kafka) in your factory cluster, you would follow the guidance here: + +The assumption is there is a `values-factory.yaml` file that is used to deploy the factory cluster. The file should include the following entries: ++ +[source,yaml] +---- +namespaces: + - open-cluster-management + - my-application + - backend-storage + +subscriptions: + - name: advanced-cluster-management + namespace: open-cluster-management + channel: release-2.3 + csv: advanced-cluster-management.v2.3.2 + + - name: amq-streams + namespace: my-application + channel: amq-streams-1.7.x + csv: amqstreams.v1.7.1 + + - name: amq-broker + namespace: my-application + channel: 7.8.x + csv: amq-broker-operator.v7.8.1-opr-3 +---- + +The validated pattern framework provisions the required Operators and deploys them to the specified namespaces, ensuring they are available for workload deployment. diff --git a/content/learn/vp_add_specific_ops_to_pattern.adoc b/content/learn/vp_add_specific_ops_to_pattern.adoc new file mode 100644 index 000000000..d3b915a85 --- /dev/null +++ b/content/learn/vp_add_specific_ops_to_pattern.adoc @@ -0,0 +1,68 @@ +--- +menu: + learn: + parent: Validated patterns frameworks +title: Adding a specific operator to hub values file +weight: 24 +aliases: /ocp-framework/adding-specific-operator-to-hub/ +--- + +:toc: +:imagesdir: /images +:_content-type: PROCEDURE +include::modules/comm-attributes.adoc[] + +== Procedure: Changing Subscription to Use a specific Operator Version + +This procedure outlines the steps to change an Operator subscription to use a specific version by updating the `csv` field and configuring the installation approval process. + +[NOTE] +==== +This is required if an issue prevents the Operator from being successfully installed. +==== + +.Procedure + +. Change the `values-hub.yaml` file to include the following fields under `subscriptions`: + +* `csv` - Specifies the exact Operator version to install. +* `installPlanApproval` - Set to `Manual` to prevent automatic installation. ++ +Update `values-hub.yaml` as follows: ++ +[source,yaml] +---- +clusterGroup: +... + subscriptions: + acm: + name: advanced-cluster-management + namespace: open-cluster-management + channel: release-2.11 + csv: advanced-cluster-management.v2.11.1 + installPlanApproval: Manual +---- ++ +This change ensures that the specified version is not installed until manually approved. + +. With the `installPlanApproval` set to `Manual`, follow these steps to manually approve the installation: + +. Navigate to *Operators* -> *Installed Operators* in the OpenShift Web Console. +. Locate the *InstallPlans* section. +. Find the pending install plan for the Operator. +. Click *Review manual InstallPlan*. +. Click *Approve* to proceed with the installation. + +. Optional: Automate approval and deploy the specified Operator version without manual intervention: + +.. Edit the `values-global.yaml` file. +.. Add the `autoApproveManualInstallPlans` variable and set it to `true` as shown below: ++ +[source,yaml] +---- +global: + options: + autoApproveManualInstallPlans: true +---- + +This configuration generates a cronJob that runs every 5 minutes, automatically approving install plans that match the specified `csv` version.