From 9d15ba5cfd8e57c400bdc79bce0c1c0882e87caa Mon Sep 17 00:00:00 2001 From: shivanisathe25 Date: Wed, 23 Oct 2024 19:05:23 +0530 Subject: [PATCH] Replaced shipwright to openshift --- installing/installing-openshift-builds.adoc | 6 +- ...ating-a-shipwright-build-resource-cli.adoc | 41 --------- ...g-a-shipwright-build-resource-console.adoc | 24 ----- modules/ob-installing-builds-using-CLI.adoc | 40 --------- modules/ob-installing-builds-using-cli.adoc | 89 +++++++++++++++++++ .../ob-installing-builds-with-operator.adoc | 27 ++++-- 6 files changed, 112 insertions(+), 115 deletions(-) delete mode 100644 modules/ob-creating-a-shipwright-build-resource-cli.adoc delete mode 100644 modules/ob-creating-a-shipwright-build-resource-console.adoc delete mode 100644 modules/ob-installing-builds-using-CLI.adoc create mode 100644 modules/ob-installing-builds-using-cli.adoc diff --git a/installing/installing-openshift-builds.adoc b/installing/installing-openshift-builds.adoc index 9f26caae2bb5..171048d18b45 100644 --- a/installing/installing-openshift-builds.adoc +++ b/installing/installing-openshift-builds.adoc @@ -24,11 +24,7 @@ As a dependency component, the {pipelines-operator} is automatically installed a include::modules/ob-installing-builds-with-operator.adoc[leveloffset=+1] -include::modules/ob-creating-a-shipwright-build-resource-console.adoc[leveloffset=+2] - -include::modules/ob-installing-builds-using-CLI.adoc[leveloffset=+1] - -include::modules/ob-creating-a-shipwright-build-resource-cli.adoc[leveloffset=+2] +include::modules/ob-installing-builds-using-cli.adoc[leveloffset=+1] [role="_additional-resources"] diff --git a/modules/ob-creating-a-shipwright-build-resource-cli.adoc b/modules/ob-creating-a-shipwright-build-resource-cli.adoc deleted file mode 100644 index 0ac629ef2f2f..000000000000 --- a/modules/ob-creating-a-shipwright-build-resource-cli.adoc +++ /dev/null @@ -1,41 +0,0 @@ -// This module is included in the following assembly: -// -// * installing/installing-openshift-builds.adoc - -:_mod-docs-content-type: PROCEDURE -[id="ob-creating-a-shipwright-build-resource-cli.adoc_{context}"] -= Creating a ShipwrightBuild resource by using CLI - -After installing the {builds-operator}, you must create a `ShipwrightBuild` resource to enable the functioning of the build controller. - - -.Procedure - -. Create a `instance.yaml` file to create a `ShipwrightBuild` resource in the `shipwright-builds` namespace, as shown in the following example: -+ -[source,yaml] ----- -apiVersion: operator.shipwright.io/v1alpha1 -kind: ShipwrightBuild -metadata: - name: openshift-builds -spec: - targetNamespace: openshift-builds ----- - -. Apply the YAML file by runninng the following command: -+ -[source,terminal] ----- -$ oc apply -f instance.yaml ----- - - -.Verification - -* Run the following command to verify that the `ShipwrightBuild` resource is now configured: -+ -[source,terminal] ----- -$ oc get pods -n shipwright-builds ----- diff --git a/modules/ob-creating-a-shipwright-build-resource-console.adoc b/modules/ob-creating-a-shipwright-build-resource-console.adoc deleted file mode 100644 index 5cca5ff59851..000000000000 --- a/modules/ob-creating-a-shipwright-build-resource-console.adoc +++ /dev/null @@ -1,24 +0,0 @@ -// This module is included in the following assembly: -// -// * installing/installing-openshift-builds.adoc - -:_mod-docs-content-type: PROCEDURE -[id="creating-a-shipwright-build-resource-console_{context}"] -= Creating a ShipwrightBuild resource by using the web console - -After installing the {builds-operator}, you must create a `ShipwrightBuild` resource to enable the functioning of the build controller. - - -.Procedure - -. In the *Administrator* perspective of the web console, navigate to the *Operators -> Installed Operators* page. -. Click the {builds-operator} link present in the list. The *Operator details* page opens. -. Select the *Shipwright Build* tab and click *Create ShipwrightBuild*. -. Select either the *Form view* or *YAML view* to configure a new `ShipwrightBuild` resource in the following manner: -** On selecting the *Form view* or *YAML view*, you get to see the default values configured for the `name` and `targetNamespace` fields. If you do not want to edit those fields, click *Create* to configure the `ShipwrightBuild` resource with default values. -+ -You can view the created resource in the *Shipwright Build* tab. - -.Verification - -* Build controller and build webhook pods must have been created in the mentioned target namespace. diff --git a/modules/ob-installing-builds-using-CLI.adoc b/modules/ob-installing-builds-using-CLI.adoc deleted file mode 100644 index 86126c3d4e3b..000000000000 --- a/modules/ob-installing-builds-using-CLI.adoc +++ /dev/null @@ -1,40 +0,0 @@ -// This module is included in the following assembly: -// -// * installing/installing-openshift-builds.adoc - -:_mod-docs-content-type: PROCEDURE -[id="installing-builds-using-CLI_{context}"] -= Installing {builds-shortname} by using the CLI - -You can also install {builds-shortname} by using the CLI. - -.Procedure - -. Create a `sub.yaml` subscription object file to subscribe a namespace to the {builds-operator}, as shown in the following example: -+ -[source,yaml] ----- -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: openshift-builds-operator - namespace: openshift-operators -spec: - channel: <1> - name: openshift-builds-operator <2> - source: redhat-operators <3> - sourceNamespace: openshift-marketplace <4> ----- -<1> The channel name from where you want to subscribe the Operator. -<2> Name of the Operator to subscribe to. -<3> Name of the CatalogSource that provides the Operator. -<4> Namespace of the CatalogSource. Use `openshift-marketplace` for the default OperatorHub CatalogSources. - -. Apply the subscription object by runninng the following command: -+ -[source,terminal] ----- -$ oc apply -f sub.yml ----- -+ -The {builds-operator} is now installed in the default target namespace `openshift-operators`. diff --git a/modules/ob-installing-builds-using-cli.adoc b/modules/ob-installing-builds-using-cli.adoc new file mode 100644 index 000000000000..2e9eccc7bd43 --- /dev/null +++ b/modules/ob-installing-builds-using-cli.adoc @@ -0,0 +1,89 @@ +// This module is included in the following assembly: +// +// * installing/installing-openshift-builds.adoc + +:_mod-docs-content-type: PROCEDURE +[id="installing-builds-using-CLI_{context}"] += Installing {builds-shortname} by using the CLI + +You can also install {builds-shortname} by using the command-line interface (CLI). + +.Procedure + +. Create a `sub.yaml` subscription object file to subscribe a namespace to the {builds-operator}, as shown in the following example: ++ +[source,yaml] +---- +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: openshift-builds-operator + namespace: openshift-builds +spec: + channel: <1> + name: openshift-builds-operator <2> + source: redhat-operators <3> + sourceNamespace: openshift-marketplace <4> +---- +<1> The channel name from where you want to subscribe the Operator. +<2> Name of the Operator to subscribe to. +<3> Name of the CatalogSource that provides the Operator. +<4> Namespace of the CatalogSource. Use `openshift-marketplace` for the default OperatorHub CatalogSources. + +. Apply the subscription object by runninng the following command: ++ +[source,terminal] +---- +$ oc apply -f sub.yml +---- ++ +The {builds-operator} is now installed in the default target namespace `openshift-builds`. + +.Verification + +After installing the Builds for Red Hat OpenShift Operator, you must verify that the following resources are created to ensure proper functioning of the Operator: + +. Run the following command to ensure that the `OpenshiftBuild` resource is created: ++ +[source,terminal] +---- +$ oc get openshiftbuilds +---- ++ + +. Run the following command to ensure that the `ShipwrightBuilds` resource is created: ++ +[source,terminal] +---- +$ oc get shipwrightbuilds +---- ++ + +. Run the following command to ensure that the following pods are created in the `openshift-builds` namespace: + +* `openshift-builds` operator pod +* Build controller and build webhook pods +* SharedResource daemonset and SharedResource webhook pods ++ +[source,terminal] +---- +$ oc get pods -n openshift-builds +---- ++ + +The list of pods is displayed as shown in the following example: ++ +[source,terminal] +---- +$ oc get pods -n openshift-builds +NAME READY STATUS RESTARTS AGE +openshift-builds-operator-6f5c48c6b5-cvp2w 2/2 Running 0 13d +openshift-pipelines-operator-64d8c4969c-952cc 2/2 Running 0 3d13h +shared-resource-csi-driver-node-gbkqs 2/2 Running 0 13d +shared-resource-csi-driver-node-kcqxc 2/2 Running 0 13d +shared-resource-csi-driver-node-sbsvg 2/2 Running 0 13d +shared-resource-csi-driver-webhook-9d9bd48f4-d5ln6 1/1 Running 0 13d +shipwright-build-controller-5454475b85-mmm6w 1/1 Running 0 13d +shipwright-build-webhook-7fbd49c6bb-2n77s 1/1 Running 0 13d +tekton-operator-webhook-756f5dfdc7-c99mc 1/1 Running 0 3d13h +---- \ No newline at end of file diff --git a/modules/ob-installing-builds-with-operator.adoc b/modules/ob-installing-builds-with-operator.adoc index bb29794cfed8..2de0c5a8ec6b 100644 --- a/modules/ob-installing-builds-with-operator.adoc +++ b/modules/ob-installing-builds-with-operator.adoc @@ -6,7 +6,7 @@ [id="installing-builds-with-operator_{context}"] = Installing {builds-shortname} by using the web console -You can install the {builds-operator} from the OperatorHub by using the {ocp-product-title} web console. Installing this Operator enables you to install and use build components. +You can install the {builds-operator} from the OperatorHub by using the {builds-title} web console. Installing this Operator enables you to install and use build components. .Procedure . In the *Administrator* perspective of the web console, navigate to the *Operators* -> *OperatorHub* page. @@ -19,19 +19,36 @@ You can install the {builds-operator} from the OperatorHub by using the {ocp-pro . On the *Install Operator* page: -.. Check that the *Installation Mode* is set to *All namespaces on the cluster (default)*. This mode installs the Operator in the default `openshift-operators` namespace to watch and be made available to all namespaces in the cluster. +.. Check that the *Installation Mode* is set to *All namespaces on the cluster (default)*. This mode installs the Operator in the default `openshift-builds` namespace to watch and be made available to all namespaces in the cluster. -.. Check that the *Installed Namespace* is set to `openshift-operators` by default. +.. Check that the *Installed Namespace* is set to `openshift-builds` by default. .. Select *Automatic* for the *Approval Strategy*. This ensures that the future upgrades to the Operator are handled automatically by the Operator Lifecycle Manager (OLM). If you select the *Manual* approval strategy, OLM creates an update request. As a cluster administrator, you must then manually approve the OLM update request to update the Operator to the new version. .. Select an *Update Channel*: ** The *Update Channel* is set to *latest* by default. The latest channel enables installation of the most recent stable version of the {builds-operator}. -** To install a specific version of the {builds-operator}, cluster administrators can use the corresponding `openshift-builds-` channel. For example, to install the {builds-operator} version `0.11.0`, you can use the `openshift-builds-0.11.0` channel. +** To install a specific version of the {builds-operator}, cluster administrators can use the corresponding `builds-` channel. For example, to install the {builds-operator} version `1.1`, you can use the `builds-1.1` channel. . Click *Install*. .Verification -* On the *Installed Operators* page, verify that the {builds-operator} is listed and its *Status* is set to *Succeeded* to confirm successful installation. +After installing the Builds for Red Hat OpenShift Operator, you must verify that the required resources are created to ensure proper functioning of the controllers. + +.Procedure +. In the *Administrator* perspective of the web console, select the project as openshift-builds. + +. Navigate to the *Operators* -> *Installed Operators* page. + +. Click the *All instances* tab. + +. On the *All instances* tab, verify that the `OpenShiftBuild` & `ShipwrightBuild` instances are listed. Alternatively, you can also click the Open Shift Build and Shipwright Build tabs. + +. Now, navigate to the *Workloads* -> *Pods* page. + +. On the *Pods* page, verify that the following pods are listed: + +* The `openshift-builds` operator pod +* Build controller and build webhook pods +* `SharedResource` daemonset and `SharedResource` webhook pods \ No newline at end of file