Introduction
Create each target cluster to use with the applications.
Example below with the creation of 2 clusters ocpdojo01 and ocpdojo02 to use with Mobility.
Cluster creation: ocpdojo01
On ocpdojo01
-
Create a service account in the dojo (for example) namespace
oc create sa ocpdojo01
-
Give it the clusterrole admin
oc create clusterrolebinding ocpdojo01-clusteradmin-binding --clusterrole=cluster-admin --serviceaccount=dojo:ocpdojo01
-
Create a token for this service account
oc create token ocpdojo01 --duration 2600000s |base64 -w0
On ocpdojohub
This is the cluster where dojo operator is installed, here in the dojo namespace for example.
Create a secret with the previous token
oc apply -f - << EOF
kind: Secret
apiVersion: v1
metadata:
name: ocpdojo01-token
namespace: dojo
data:
token: <token>
type: Opaque
EOF
-
Add the cluster instance in the operator
Cluster creation: ocpdojo02
On ocpdojo02
-
Create a service account in the dojo (for example) namespace
oc create sa ocpdojo02
-
Give it the clusterrole admin
oc create clusterrolebinding ocpdojo02-clusteradmin-binding --clusterrole=cluster-admin --serviceaccount=dojo:ocpdojo02
-
Create a token for this service account
oc create token ocpdojo02 --duration 2600000s |base64 -w0
On ocpdojohub
This is the cluster where dojo operator is installed, here in the dojo namespace for example.
Create a secret with the previous token
oc apply -f - << EOF
kind: Secret
apiVersion: v1
metadata:
name: ocpdojo02-token
namespace: dojo
data:
token: <token>
type: Opaque
EOF
-
Add the cluster instance in the operator
Check in the front end application
=> Click on the button “Check Connectivity“ for each cluster as the status is not refreshed automatically