Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 33 additions & 36 deletions ejb-txn-remote-call/README-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -727,51 +727,32 @@ wildfly-operator-5d4b7cc868-zfxcv 1/1 Running 1 22h
endif::[]

ifdef::ProductRelease[]
To install {productName}'s Operator, follow the https://docs.redhat.com/en/documentation/red_hat_jboss_enterprise_application_platform/8.0/html/using_jboss_eap_on_openshift_container_platform/assembly_deploying-your-jboss-eap-application-on-the-openshift-container-platform_default#proc_installing-eap-operator-using-the-cli_assembly_jboss-eap-operator-for-automating-application-deployment-on-openshift[official documentation] (which instructions are also reported here for convenience)

[NOTE]
[WARNING]
====
* You have access to an OpenShift Container Platform cluster using an account with cluster-admin permissions.
* You have installed the oc tool in your local system.
For simplicity, this quickstart installs the EAP operator globally in the `openshift-operators` namespace, making it available across all namespaces in the cluster. The `openshift-operators` namespace already contains a `global-operators` OperatorGroup, so you must NOT create an additional OperatorGroup or the operator will fail to start. In production environments, consider namespace-scoped installation (see note below) to limit scope and improve security.
====

. View the list of operators available to the cluster from the OperatorHub:
+
[source,sh,options="nowrap",subs="+quotes,attributes+"]
----
oc get packagemanifests -n openshift-marketplace | grep eap
----
. Create a `Subscription` object YAML file (for example, `eap-operator-sub.yaml`) to subscribe a namespace to your EAP operator. The following is an example `Subscription` object YAML file:
+
[source,sh,options="nowrap",subs="+quotes,attributes+"]
----
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: eap
namespace: openshift-operators
spec:
channel: stable
installPlanApproval: Automatic
name: eap
source: redhat-operators
sourceNamespace: openshift-marketplace
----
. Create the `Subscription` object from the YAML file:
+
. Log in into the Openshift console as `kubeadmin` user (or any cluster administrator).
. Install the EAP operator globally.

In your terminal, run the following command to subscribe the EAP operator.
[source,sh,options="nowrap",subs="+quotes,attributes+"]
----
oc apply -f eap-operator-sub.yaml
$ oc apply -f charts/eap-operator-sub.yaml --wait --timeout=10m0s
----
+
The EAP operator is successfully installed. At this point, the OLM is aware of the EAP operator.
A ClusterServiceVersion (CSV) for the operator appears in the target namespace, and APIs provided by the EAP operator is available for creation.
To verify that the {productName} Operator is running, execute the following command:
+

To verify the operator is ready to use, you can run the following command. You should see the following output.
The `PHASE` needs to be `Succeeded`
[source,sh,options="nowrap",subs="+quotes,attributes+"]
----
oc get csv -n openshift-operators
$ oc get ClusterServiceVersion -n openshift-operators
----

NOTE: For namespace-scoped installation: Edit `charts/eap-operator-group.yaml` to replace `<your-namespace>` with your project namespace, and edit `charts/eap-operator-sub.yaml` to replace `openshift-operators` with your project namespace. Then apply both files: `oc apply -f charts/eap-operator-group.yaml && oc apply -f charts/eap-operator-sub.yaml`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this note should be at line 744 before To verify the operator is ready to use, you can run the following command. You should see the following output.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it different in eap 8.1 branch?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it is the same. let keep it the same.


NOTE: For namespace-scoped installation: To verify the operator is ready to use remove the `-n openshift-operators` parameter.

endif::[]

[#_start_postgresql_database]
Expand Down Expand Up @@ -925,8 +906,24 @@ make undeploy
endif::[]

ifdef::ProductRelease[]

To uninstall the EAP operator (global installation):
[source,sh,options="nowrap"]
----
oc delete -f eap-operator-sub.yaml
oc delete -f charts/eap-operator-sub.yaml --wait --timeout=10m0s
oc delete csv --all -n openshift-operators
----

To uninstall the EAP operator (namespace-scoped installation):
[source,sh,options="nowrap"]
----
oc delete -f charts/eap-operator-sub.yaml -n NAMESPACE --wait --timeout=10m0s
oc delete -f charts/eap-operator-group.yaml
oc delete csv --all -n NAMESPACE
----

[NOTE]
====
Replace NAMESPACE above, with the actual name of the namespace used in the namespace-scoped installation.
====
endif::[]
19 changes: 19 additions & 0 deletions ejb-txn-remote-call/charts/eap-operator-group.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# OperatorGroup configuration for namespace-scoped EAP Operator installation
#
# This file configures the EAP Operator to watch only the current namespace
# instead of being installed globally across all namespaces.
#
# BEFORE APPLYING: Replace '<your-namespace>' with your actual namespace name.
# You can get your current namespace with: oc project -q
#
# Example:
# If your namespace is 'my-project', change both occurrences of '<your-namespace>' to 'my-project'

apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: eap-operator-group
namespace: <your-namespace>
spec:
targetNamespaces:
- <your-namespace>
20 changes: 20 additions & 0 deletions ejb-txn-remote-call/charts/eap-operator-sub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Subscription configuration for global EAP Operator installation
#
# This file subscribes to the EAP Operator from the Red Hat Operators catalog
# in the openshift-operators namespace, making it available globally across all namespaces.
#
# WARNING: This is for development/testing simplicity. In production environments,
# consider namespace-scoped installation by installing the Subscription in your
# specific project namespace along with an appropriate OperatorGroup.

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: eap
namespace: openshift-operators
spec:
channel: stable
installPlanApproval: Automatic
name: eap
source: redhat-operators
sourceNamespace: openshift-marketplace