-
Install and run Red Hat AMQ Broker [https://developers.redhat.com/products/amq/hello-world]
- This should be done outside of OpenShift simulating the "Field Environment".
- _On a Mac do brew install apache-activemq brew services start activemq -the web console is at localhost:8161
-
Install the AMQ Streams Operator from OperatorHub
-
Create and configure an AMQ Streams cluster
oc apply -f ./kube/kafka-cluster.yaml -n iot-demo oc apply -f ./kube/kafka-topics.yaml -n iot-demo
-
Install the Prometheus Operator from OperatorHub
-
Install the Prometheus Pushgateway
oc new-app prom/pushgateway -l 'app=iot-demo' -l 'prometheus/type=pushgateway' -n iot-demo
-
Create and configure the Prometheus resources
oc apply -f ./kube/prometheus.yaml -n iot-demo oc apply -f ./kube/prometheus-pushgateway-service-monitor.yaml -n iot-demo
-
Install and configure a Grafana instance
oc apply -f ./kube/grafana.yaml -n iot-demo
-
Import the Grafana datasource and dashoard found in the
./grafana/
directory. You can either use the Web UI, or the REST API.-
The Web UI can be found at:
echo "http://$(oc get route grafana --template='{{.spec.host}}')/"
-
-
Install the Camel K Operator from OperatorHub
-
Configure the Camel K Integration Platform
oc apply -f ./kube/integration-platform.yaml -n iot-demo
-
Install the Camel K bridge applications
- Don't forget to modify the
ConfigMap
andSecret
files with your environment settings.
oc create configmap artemis-source-configmap --from-file=application.properties=./bridges/artemis-source-configmap.properties oc create secret generic artemis-source-secret --from-file=application.properties=./bridges/artemis-source-secret.properties kamel run \ --namespace iot-demo \ --config configmap:artemis-source-configmap \ --config secret:artemis-source-secret \ ./bridges/ArtemisSource.java oc create configmap push-gateway-sink-configmap --from-file=application.properties=./bridges/push-gateway-sink-configmap.properties kamel run \ --namespace iot-demo \ --config configmap:push-gateway-sink-configmap \ ./bridges/PushGatewaySink.java
- Don't forget to modify the
-
You can run the Python script to simulate device telemetry being sent to the AMQ Broker
python simulators/iot/pumpjack/sim.py --location-id field-01 --rig-id pumpjack-01 --broker-username admin --broker-password admin --telemetry-topic 'iot.telemetry' --telemetry-frequency 1 --buffer-timeout 10000 --verbose 'tcp://localhost:1883'
- You can run
python simulators/iot/pumpjack/sim.py --help
for more details/options
- You can run