Skip to content
Merged
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
171 changes: 2 additions & 169 deletions modules/installation/proc-rhdh-deploy-eks-operator.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[id='proc-rhdh-deploy-eks-operator_{context}']
= Installing {product-short} on {eks-short} with the Operator

You can install the {product} Operator with or without the Operator Lifecycle Manager (OLM) framework.
The {product} Operator installation requires the Operator Lifecycle Manager (OLM) framework.

.Additonal resources
* For information about the OLM, see link:https://olm.operatorframework.io/docs/[Operator Lifecycle Manager(OLM)] documentation.
Expand All @@ -18,7 +18,7 @@ You can install the {product-short} Operator on {eks-short} using the https://ol
* You have set the context to the {eks-short} cluster in your current `kubeconfig`. For more information, see https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html[Creating or updating a kubeconfig file for an Amazon {eks-short} cluster].
* You have installed `kubectl`. For more information, see https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html[Installing or updating kubectl].
* You have subscribed to `registry.redhat.io`. For more information, see https://access.redhat.com/RegistryAuthentication[{company-name} Container Registry Authentication].
* You have installed the Operator Lifecycle Manager (OLM). For more information about installation and troubleshooting, see https://operatorhub.io/how-to-install-an-operator#How-do-I-get-Operator-Lifecycle-Manager?[How do I get Operator Lifecycle Manager?]
* You have installed the Operator Lifecycle Manager (OLM). For more information about installation and troubleshooting, see https://olm.operatorframework.io/docs/getting-started/[OLM QuickStart] or https://operatorhub.io/how-to-install-an-operator#How-do-I-get-Operator-Lifecycle-Manager?[How do I get Operator Lifecycle Manager?]

.Procedure

Expand Down Expand Up @@ -196,170 +196,3 @@ kubectl -n rhdh-operator edit configmap backstage-default-config
.. Save and exit.
+
Wait for a few minutes until the changes are automatically applied to the operator pods.

== Installing the {product-short} Operator without the OLM framework

.Prerequisites
* You have installed the following commands:
** `git`
** `make`
** `sed`

.Procedure

. Clone the Operator repository to your local machine using the following command:
+
--
[source,terminal]
----
git clone --depth=1 https://github.com/redhat-developer/rhdh-operator.git rhdh-operator && cd rhdh-operator
----
--

. Run the following command and generate the deployment manifest:
+
--
[source,terminal]
----
make deployment-manifest
----

The previous command generates a file named `rhdh-operator-<VERSION>.yaml`, which is updated manually.
--

. Run the following command to apply replacements in the generated deployment manifest:
+
--
[source,terminal]
----
sed -i "s/backstage-operator/rhdh-operator/g" rhdh-operator-*.yaml
sed -i "s/backstage-system/rhdh-operator/g" rhdh-operator-*.yaml
sed -i "s/backstage-controller-manager/rhdh-controller-manager/g" rhdh-operator-*.yaml
----
--

. Open the generated deployment manifest file in an editor and perform the following steps:
.. Locate the `db-statefulset.yaml` string and add the `fsGroup` to its `spec.template.spec.securityContext`, as shown in the following example:
+
--
[source,yaml]
----
db-statefulset.yaml: |
apiVersion: apps/v1
kind: StatefulSet
--- TRUNCATED ---
spec:
--- TRUNCATED ---
restartPolicy: Always
securityContext:
# You can assign any random value as fsGroup
fsGroup: 2000
serviceAccount: default
serviceAccountName: default
--- TRUNCATED ---
----
--

.. Locate the `deployment.yaml` string and add the `fsGroup` to its specification, as shown in the following example:
+
--
[source,yaml]
----
deployment.yaml: |
apiVersion: apps/v1
kind: Deployment
--- TRUNCATED ---
spec:
securityContext:
# You can assign any random value as fsGroup
fsGroup: 3000
automountServiceAccountToken: false
--- TRUNCATED ---
----
--

.. Locate the `service.yaml` string and change the `type` to `NodePort` as follows:
+
--
[source,yaml]
----
service.yaml: |
apiVersion: v1
kind: Service
spec:
# NodePort is required for the ALB to route to the Service
type: NodePort
--- TRUNCATED ---
----
--

.. Replace the default images with the images that are pulled from the {company-name} Ecosystem:
+
--
[source,terminal,subs="attributes+"]
----
sed -i "s#gcr.io/kubebuilder/kube-rbac-proxy:.*#registry.redhat.io/openshift4/ose-kube-rbac-proxy:v{ocp-version}#g" rhdh-operator-*.yaml

sed -i "s#(quay.io/janus-idp/operator:.*|quay.io/rhdh-community/operator:.*)#registry.redhat.io/rhdh/rhdh-rhel9-operator:{product-version}#g" rhdh-operator-*.yaml

sed -i "s#quay.io/janus-idp/backstage-showcase:.*#registry.redhat.io/rhdh/rhdh-hub-rhel9:{product-version}#g" rhdh-operator-*.yaml

sed -i "s#quay.io/fedora/postgresql-15:.*#registry.redhat.io/rhel9/postgresql-15:latest#g" rhdh-operator-*.yaml
----
--

. Add the image pull secret to the manifest in the Deployment resource as follows:
+
--
[source,yaml]
----
--- TRUNCATED ---

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: rhdh-operator
app.kubernetes.io/instance: controller-manager
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: deployment
app.kubernetes.io/part-of: rhdh-operator
control-plane: controller-manager
name: rhdh-controller-manager
namespace: rhdh-operator
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
spec:
imagePullSecrets:
- name: rhdh-pull-secret
--- TRUNCATED ---
----
--

. Apply the manifest to deploy the operator using the following command:
+
--
[source,terminal]
----
kubectl apply -f rhdh-operator-VERSION.yaml
----
--

. Run the following command to verify that the Operator is running:
+
--
[source,terminal]
----
kubectl -n rhdh-operator get pods -w
----
--