If you've followed a link to this repo, but are not really sure what it contains or how to use it, head over to http://hybrid-cloud-patterns.io/industrial-edge/ for additional context before continuing.
- An OpenShift cluster ( Go to https://console.redhat.com/openshift/create )
- (Optional) A second OpenShift cluster
- A github account (and a token for it with repos permissions, to read from and write to your forks)
- A quay account with the following repos set as public:
- http-ionic
- httpd-ionic
- iot-anomaly-detection
- iot-consumer
- iot-frontend
- iot-software-sensor
- The helm binary, see https://helm.sh/docs/intro/install/
The use of this blueprint depends on having at least one running Red Hat OpenShift cluster. It is desirable to have a cluster for deploying the data center assets and a seperate cluster(s) for the factory assets.
If you do not have a running Red Hat OpenShift cluster you can start one on a public or private cloud by using Red Hat's cloud service.
-
Fork the manuela-dev repo on GitHub. It is necessary to fork this repo because the GitOps framework will push tags to this repo that match the versions of software that it will deploy.
-
Fork this repo on GitHub. It is necessary to fork because your fork will be updated as part of the GitOps and DevOps processes.
-
Clone the forked copy of this repo.
git clone --recurse-submodules [email protected]:your-username/industrial-edge.git
-
Create a local copy of the Helm values file that can safely include credentials
DO NOT COMMIT THIS FILE
You do not want to push personal credentials to GitHub.
cp values-secret.yaml.template ~/values-secret.yaml
vi ~/values-secret.yaml
-
Customize the deployment for your cluster
vi values-global.yaml git add values-global.yaml git commit values-global.yaml git push
-
Preview the changes
make show
-
Login to your cluster using oc login or exporting the KUBECONFIG
oc login
or
export KUBECONFIG=~/my-ocp-env/datacenter
-
Apply the changes to your cluster
make install
-
Check the operators have been installed
UI -> Installed Operators
-
Obtain the ArgoCD urls and passwords
The URLs and login credentials for ArgoCD change depending on the pattern name and the site names they control. Follow the instructions below to find them, however you choose to deploy the pattern.
Display the fully qualified domain names, and matching login credentials, for all ArgoCD instances:
ARGO_CMD=`oc get secrets -A -o jsonpath='{range .items[*]}{"oc get -n "}{.metadata.namespace}{" routes; oc -n "}{.metadata.namespace}{" extract secrets/"}{.metadata.name}{" --to=-\\n"}{end}' | grep gitops-cluster` eval $ARGO_CMD
The result should look something like:
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD datacenter-gitops-server datacenter-gitops-server-industrial-edge-datacenter.apps.mycluster.mydomain.com datacenter-gitops-server https passthrough/Redirect None # admin.password 2F6kgITU3DsparWyC NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD factory-gitops-server factory-gitops-server-industrial-edge-factory.apps.mycluster.mydomain.com factory-gitops-server https passthrough/Redirect None # admin.password K4ctDIm3fH7ldhs8p NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD cluster cluster-openshift-gitops.apps.mycluster.mydomain.com cluster 8080 reencrypt/Allow None kam kam-openshift-gitops.apps.mycluster.mydomain.com kam 8443 passthrough/None None openshift-gitops-server openshift-gitops-server-openshift-gitops.apps.mycluster.mydomain.com openshift-gitops-server https passthrough/Redirect None # admin.password WNklRCD8EFg2zK034
-
Check all applications are synchronised
https://slides.com/beekhof/hybrid-cloud-patterns
Probably wont work
-
Turn off auto-sync
helm upgrade manuela . --values ~/values-secret.yaml --set global.options.syncPolicy=Manual
-
Remove the ArgoCD applications (except for manuela-datacenter)
a. Browse to ArgoCD a. Go to Applications a. Click delete a. Type the application name to confirm a. Chose "Foreground" as the propagation policy a. Repeat
-
Wait until the deletions succeed
manuela-datacenter
should be the only remaining application -
Complete the uninstall
helm delete manuela
-
Check all namespaces and operators have been removed
The following diagrams show the different components deployed on the datacenter and the factory.
To edit the diagrams in Draw.io you can load them here and save a local copy