Demonstrating Industrial Edge example applications
Prerequisites
Ensure you have administrator access to the data center cluster using one of the following methods:
- The
kubeadmin
login credentials - The
kubeconfig
file (ensure the path is exported)
The steps followed so far should have successfully deployed the data center cluster, and optionally, a factory (edge) cluster.
With the infrastructure in place, it’s now time to see GitOps and DevOps in action through demonstrations that will modify both configuration data and deployed applications.
Configuration changes with GitOps
There might be times where you need to change the configuration of some of the edge devices in one or more of your factories. In our example, we have various sensors at the factory. Modification can be made to these sensors using
ConfigMaps
.
Application changes using DevOps
The line-dashboard
application has temperature sensors. In this demonstration you are going to make a simple change to that application, rebuild and redeploy
it.
Edit the file
components/iot-frontend/src/app/app.component.html
in themanuela-dev
repository there is a fileChange the
<ion-title>IoT Dashboard</ion-title>
to for example,<ion-title>IoT Dashboard - DEVOPS was here!</ion-title>
. Do this in the gitea web interface directly clicking on the editing icon for the file:Commit this change to your git repository so that the change will be picked up by OpenShift GitOps (ArgoCD).
Start the pipeline called
build-and-test-iot-frontend
that will do the following:- Rebuild the image from the manuela-dev code
- Push the change on the hub datacenter in the manuela-tst-all namespace
- Create a PR in gitea
4.1 Start the pipeline by running the following command in
industrial-edge
repository:make build-and-test-iot-frontend
The pipeline will look a bit like the following:
After the pipeline completed the manuela-test
application in Argo will eventually refresh and push the changes to the cluster and the line dash board route in the manuela-tst-all
namespace will have picked up the changes. You might need to clear your browser cache to see the change:
The pipeline will also have created a PR in gitea, such as the following one:
Verify that the change is correct on the datacenter in the manuela-tst-all
line dashboard and if deemed correct, you can merge the PR in gitea which will roll out the change to the production factory!
Application AI model changes with DevOps
On the OpenShift console click the nine-box and select
Red Hat OpenShift AI
. The AI console will open, appearing as follows:Click the
Data Science Projects
on the left sidebar and choose theml-development
project. The project will open, containing a couple of workbenches and a model.:Click the
JupyterLab
workbench to open the notebook where this pattern’s data analysis is performed. Themanuela-dev
code will be preloaded in the notebook.click the left file browser on
manuela-dev/ml-models/anomaly-detection/1-preprocessing.ipynb
:
After opening the notebook successfully, walk through the demonstration by pressing play and iterating through the commands in the playbooks. Jupyter playbooks are interactive and you might make changes and also save those changes.
Running through all the six notebooks will automatically regenerate the anomaly model, prepare the data for the training and push the changes to the internal gitea so the inference service can pick up the new model.