Deploying the Industrial Edge Pattern
Table of contents
Prerequisites
- An OpenShift cluster ( Go to https://console.redhat.com/openshift/create ). See also sizing your cluster.
- (Optional) A second OpenShift cluster for edge/factory
- 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.
How to deploy
- 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. Use branch
stable-2.0
.git clone --recurse-submodules git@github.com: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
Validating the Environment
-
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` CMD=`echo $ARGO_CMD | sed 's|- oc|-;oc|g'` eval $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
The most important ArgoCD instance to examine at this point is
data-center-gitops-server
. This is where all the applications for the datacenter, including the test environment, can be tracked. -
Check all applications are synchronised
Next up
Once the data center has been setup correctly and confirmed to be working, you can:
- Add a dedicated cluster to deploy the factory pieces using ACM
-
Once the data center and the factory have been deployed you will want to check out and test the Industrial Edge 2.0 demo code. You can find that here
a. Making configuration changes with GitOps a. Making application changes using DevOps a. Making AI/ML model changes with DevOps
More reading
For more general patterns documentation please refer to the hybrid cloud patterns docs here.
Uninstalling
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