Skip to content

Commit 215909f

Browse files
authored
Merge branch 'main' into cicd/metroapps_workflows
2 parents 1f5ca80 + ca63829 commit 215909f

File tree

27 files changed

+245
-476
lines changed

27 files changed

+245
-476
lines changed

manufacturing-ai-suite/industrial-edge-insights-time-series/Makefile

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ build_copyleft_sources:
5151
@echo "Building Docker containers including copyleft licensed sources..."
5252
$(DOCKER_COMPOSE) build --build-arg COPYLEFT_SOURCES=true;
5353

54-
# This section generates an SSL certificate for secure communication.
55-
.PHONY: generated_ssl_certs_nginx
56-
generated_ssl_certs_nginx:
57-
@echo "Generating SSL certificates for Nginx..."
58-
@if [ -d "./nginx/ssl" ]; then rm -rf ./nginx/ssl; fi
59-
@mkdir -p ./nginx/ssl
60-
@openssl req -x509 -nodes -days ${DAYS} -${SHA_ALGO} -newkey rsa:${KEY_LENGTH} -keyout ./nginx/ssl/key.pem -out ./nginx/ssl/cert.pem -subj "/CN=localhost"
61-
@chmod 644 ./nginx/ssl/key.pem ./nginx/ssl/cert.pem
6254
# Check if multiple particular variables in .env are assigned with values
6355
.PHONY: check_env_variables
6456
check_env_variables:
@@ -121,7 +113,7 @@ check_env_variables:
121113
done
122114

123115
.PHONY: up_mqtt_ingestion
124-
up_mqtt_ingestion: check_env_variables down generated_ssl_certs_nginx
116+
up_mqtt_ingestion: check_env_variables down
125117
@export TELEGRAF_INPUT_PLUGIN=$$(if [ $(INCLUDE) = 'validation' ]; then echo "mqtt_consumer:net:cpu:disk:docker:diskio:kernel:mem:processes:swap:system"; else echo "mqtt_consumer"; fi); \
126118
echo "Starting Docker containers..."; \
127119
if [ $(INCLUDE) = 'validation' ]; then \
@@ -132,7 +124,7 @@ up_mqtt_ingestion: check_env_variables down generated_ssl_certs_nginx
132124

133125
# Run Docker containers
134126
.PHONY: up_opcua_ingestion
135-
up_opcua_ingestion: check_env_variables down generated_ssl_certs_nginx
127+
up_opcua_ingestion: check_env_variables down
136128
@export TELEGRAF_INPUT_PLUGIN=$$(if [ $(INCLUDE) = 'validation' ]; then echo "opcua:net:cpu:disk:docker:diskio:kernel:mem:processes:swap:system"; else echo "opcua"; fi); \
137129
echo "Starting Docker containers..."; \
138130
if [ $(INCLUDE) = 'validation' ]; then \
@@ -206,6 +198,8 @@ gen_helm_charts:
206198
@cp -f grafana/entrypoint.sh helm/grafana_entrypoint.sh
207199
@cp -f apps/${SAMPLE_APP}/time-series-analytics-config/config.json helm/
208200
@cp -f telegraf/entrypoint.sh helm/telegraf_entrypoint.sh
201+
@cp -f nginx/nginx-cert-gen.sh helm/nginx-cert-gen.sh
202+
@cp -f nginx/nginx.conf helm/nginx.conf
209203
@sed -i "s/name: .*/name: ${SAMPLE_APP}-sample-app/" "helm/Chart.yaml"
210204
@sed -i "s/SAMPLE_APP: .*/SAMPLE_APP: ${SAMPLE_APP}/" "helm/values.yaml"
211205
@echo "Helm packages generated"

manufacturing-ai-suite/industrial-edge-insights-time-series/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ services:
349349
- "1883:1883" # MQTT TCP Proxy
350350
volumes:
351351
- ./nginx/nginx.conf:/opt/bitnami/nginx/conf/nginx.conf:ro
352-
- ./nginx/ssl:/opt/bitnami/nginx/conf/bitnami/certs:ro
352+
- ./nginx/nginx-cert-gen.sh:/docker-entrypoint-initdb.d/nginx-cert-gen.sh:ro
353353
networks:
354354
- timeseries_network
355355
depends_on:

manufacturing-ai-suite/industrial-edge-insights-time-series/docs/user-guide/get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ make status
211211

212212
- Use link `https://<host_ip>:3000/` to launch Grafana from browser (preferably, chrome browser)
213213

214-
> **Note**: Use link `http://<host_ip>:30001` to launch Grafana from browser (preferably, chrome browser) for the helm deployment
214+
> **Note**: Use link `https://<host_ip>:30001` to launch Grafana from browser (preferably, chrome browser) for the helm deployment
215215

216216
- Login to the Grafana with values set for `VISUALIZER_GRAFANA_USER` and `VISUALIZER_GRAFANA_PASSWORD`
217217
in `.env` file and select **Wind Turbine Dashboard**.

manufacturing-ai-suite/industrial-edge-insights-time-series/docs/user-guide/how-to-configure-alerts.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ data0
7676
.crit(lambda: "anomaly_status" > 0)
7777
.message('Anomaly detected: Wind Speed: {{ index .Fields "wind_speed" }}, Grid Active Power: {{ index .Fields "grid_active_power" }}, Anomaly Status: {{ index .Fields "anomaly_status" }}')
7878
.noRecoveries()
79-
.post('https://localhost:3000/ts-api/opcua_alerts')
79+
.post('http://localhost:5000/opcua_alerts')
8080
.timeout(30s)
8181
```
8282
> **Note**:
@@ -188,23 +188,24 @@ Configure the tick script by following [these instructions](#1-configure-opc-ua-
188188
Copy the TICK script using the following command:
189189
190190
```sh
191-
cd edge-ai-suites/manufacturing-ai-suite/wind-turbine-anomaly-detection # path relative to git clone folder
191+
cd edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-time-series/apps/wind-turbine-anomaly-detection # path relative to git clone folder
192192
cd time-series-analytics-config
193-
mkdir -p windturbine_anomaly_detector
194-
cp -r models tick_scripts udfs windturbine_anomaly_detector/.
193+
export SAMPLE_APP="wind-turbine-anomaly-detection"
194+
mkdir -p $SAMPLE_APP
195+
cp -r models tick_scripts udfs $SAMPLE_APP/.
195196
196197
POD_NAME=$(kubectl get pods -n ts-sample-app -o jsonpath='{.items[*].metadata.name}' | tr ' ' '\n' | grep deployment-time-series-analytics-microservice | head -n 1)
197198
198-
kubectl cp windturbine_anomaly_detector $POD_NAME:/tmp/ -n ts-sample-app
199+
kubectl cp $SAMPLE_APP $POD_NAME:/tmp/ -n ts-sample-app
199200
```
200201
201202
3. Configuring OPC-UA Alert in config.json
202203
203204
Make the following REST API call to the Time Series Analytics microservice. Note that the `mqtt` alerts key is replaced with the `opcua` key and its specific details:
204205
205206
```sh
206-
curl -X 'POST' \
207-
'http://<HOST_IP>:30002/config' \
207+
curl -k -X 'POST' \
208+
'https://<HOST_IP>:30001/ts-api/config' \
208209
-H 'accept: application/json' \
209210
-H 'Content-Type: application/json' \
210211
-d '{

manufacturing-ai-suite/industrial-edge-insights-time-series/docs/user-guide/how-to-configure-custom-udf.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ and config.json has been volume mounted for the Time Series Analytics Microservi
7373

7474
3. Make the following REST API call to the Time Series Analytics microservice for the updated custom UDF:
7575
```sh
76-
curl -X 'POST' \
77-
'http://<HOST_IP>:30002/config' \
76+
curl -k -X 'POST' \
77+
'https://<HOST_IP>:30001/ts-api/config' \
7878
-H 'accept: application/json' \
7979
-H 'Content-Type: application/json' \
8080
-d '{
@@ -153,11 +153,11 @@ to the Model Registry microservice.
153153

154154

155155
1. Run the following command, to update the configuration in `Time Series Analytics` microservice.
156-
Please note, the default of `<PORT>` value is `3000/ts-api` for docker compose deployment and `30002` for helm based deployment.
156+
Please note, the default of `<PORT>` value is `3000` for docker compose deployment and `30001` for helm based deployment.
157157

158158
```bash
159-
curl -X 'POST' \
160-
'https://<HOST_IP>:<PORT>/config' \
159+
curl -k -X 'POST' \
160+
'https://<HOST_IP>:<PORT>/ts-api/config' \
161161
-H 'accept: application/json' \
162162
-H 'Content-Type: application/json' \
163163
-d '{

manufacturing-ai-suite/industrial-edge-insights-time-series/docs/user-guide/how-to-deploy-with-helm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ To copy your own or existing model into Time Series Analytics Microservice in or
106106
cd edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-time-series/apps/wind-turbine-anomaly-detection # path relative to git clone folder
107107
cd time-series-analytics-config
108108
mkdir -p $SAMPLE_APP
109-
cp -r models tick_scripts udfs $SAMPLE_APP.
109+
cp -r models tick_scripts udfs $SAMPLE_APP/.
110110
111111
POD_NAME=$(kubectl get pods -n ts-sample-app -o jsonpath='{.items[*].metadata.name}' | tr ' ' '\n' | grep deployment-time-series-analytics-microservice | head -n 1)
112112
@@ -119,8 +119,8 @@ To copy your own or existing model into Time Series Analytics Microservice in or
119119

120120
Run the following command to activate the UDF deployment package:
121121
```sh
122-
curl -X 'GET' \
123-
'http://<HOST_IP>:30002/config?restart=true' \
122+
curl -k -X 'GET' \
123+
'https://<HOST_IP>:30001/ts-api/config?restart=true' \
124124
-H 'accept: application/json'
125125
```
126126

manufacturing-ai-suite/industrial-edge-insights-time-series/docs/user-guide/how-to-update-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The Time Series Analytics Microservice provides an interactive Swagger UI at `https://<host_ip>:3000/ts-api/docs`.
44

5-
**Note:** Use the link `http://localhost:30002/docs` to access the Swagger UI if doing a Helm-based deployment on a Kubernetes cluster.
5+
**Note:** Use the link `https://localhost:30001/ts-api/docs` to access the Swagger UI if doing a Helm-based deployment on a Kubernetes cluster.
66

77
## Accessing the Swagger UI
88

manufacturing-ai-suite/industrial-edge-insights-time-series/helm/templates/NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ Verify the pod logs by executing
2121

2222
`kubectl logs -f <NAME OF THE POD>`
2323

24-
Access Grafana at `http://nodeip:{{ $.Values.config.grafana.ext.port }}`
24+
Access Grafana at `https://nodeip:{{ $.Values.config.nginx.ext.https_port }}`
2525

manufacturing-ai-suite/industrial-edge-insights-time-series/helm/templates/broker.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ spec:
1515
app: ia-mqtt-broker
1616
ports:
1717
- name: broker-port
18-
port: {{ .Values.config.mqttbroker.int.port }}
19-
targetPort: {{ .Values.config.mqttbroker.int.port }}
20-
nodePort: {{ .Values.config.mqttbroker.ext.port }}
18+
port: {{ .Values.config.mqttbroker.mqttbroker_port }}
2119
---
2220
apiVersion: apps/v1
2321
kind: Deployment

manufacturing-ai-suite/industrial-edge-insights-time-series/helm/templates/grafana.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,28 @@ metadata:
1212
spec:
1313
type: NodePort
1414
selector:
15-
app: grafana
15+
app: ia-grafana
1616
ports:
1717
- name: grafana-port
18-
port: {{ $.Values.config.grafana.int.port }}
19-
targetPort: {{ $.Values.config.grafana.int.port }}
20-
nodePort: {{ $.Values.config.grafana.ext.port }}
18+
port: {{ $.Values.config.grafana.grafana_port }}
2119

2220
---
2321
apiVersion: apps/v1
2422
kind: Deployment
2523
metadata:
2624
labels:
27-
app: grafana
25+
app: ia-grafana
2826
name: deployment-grafana
2927
namespace: {{ $.Values.namespace }}
3028

3129
spec:
3230
selector:
3331
matchLabels:
34-
app: grafana
32+
app: ia-grafana
3533
template:
3634
metadata:
3735
labels:
38-
app: grafana
36+
app: ia-grafana
3937
spec:
4038
{{- if and $.Values.DOCKER_USERNAME $.Values.DOCKER_PASSWORD }}
4139
imagePullSecrets:

0 commit comments

Comments
 (0)