Skip to content

Commit

Permalink
RHEL9 install script and configs updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
riclolsen committed May 18, 2024
1 parent 2876599 commit a4564e1
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 36 deletions.
2 changes: 1 addition & 1 deletion demo-docker/mongo_seed/files/demo_connections.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{"_id":{"$oid":"5f108e3e3d8adfd3eccb206e"},"protocolDriver":"IEC60870-5-104_SERVER","protocolDriverInstanceNumber":1.0,"protocolConnectionNumber":1001.0,"name":"IEC104DIST","description":"Demo distribution of IEC 104","enabled":true,"commandsEnabled":true,"ipAddressLocalBind":"0.0.0.0:2404","ipAddresses":[],"localLinkAddress":1.0,"remoteLinkAddress":2.0,"giInterval":null,"testCommandInterval":0.0,"timeSyncInterval":0.0,"sizeOfCOT":2.0,"sizeOfCA":2.0,"sizeOfIOA":3.0,"k":12.0,"w":8.0,"t0":10.0,"t1":15.0,"t2":10.0,"t3":20.0,"serverModeMultiActive":true,"maxClientConnections":20.0,"maxQueueSize":5000.0}
{"_id":{"$oid":"5f1090143d8adfd3eccb206f"},"protocolDriver":"IEC60870-5-104","protocolDriverInstanceNumber":1.0,"protocolConnectionNumber":61.0,"name":"IEC104DEMO","description":"Demo via IEC60870-5-104","enabled":true,"commandsEnabled":true,"ipAddressLocalBind":"","ipAddresses":["207.180.242.96:2404"],"localLinkAddress":2.0,"remoteLinkAddress":1.0,"giInterval":250.0,"testCommandInterval":60.0,"timeSyncInterval":650.0,"sizeOfCOT":2.0,"sizeOfCA":2.0,"sizeOfIOA":3.0,"k":12.0,"w":8.0,"t0":10.0,"t1":15.0,"t2":10.0,"t3":20.0}
{"_id":{"$oid":"5f1090143d8adfd3eccb206f"},"protocolDriver":"IEC60870-5-104","protocolDriverInstanceNumber":1.0,"protocolConnectionNumber":61.0,"name":"IEC104DEMO","description":"Demo via IEC60870-5-104","enabled":true,"commandsEnabled":true,"ipAddressLocalBind":"","ipAddresses":["150.230.171.172:2404"],"localLinkAddress":2.0,"remoteLinkAddress":1.0,"giInterval":250.0,"testCommandInterval":60.0,"timeSyncInterval":650.0,"sizeOfCOT":2.0,"sizeOfCA":2.0,"sizeOfIOA":3.0,"k":12.0,"w":8.0,"t0":10.0,"t1":15.0,"t2":10.0,"t3":20.0}
{"_id":{"$oid":"5ff3512268d80d68205b403f"},"protocolDriver":"OPC-UA","protocolDriverInstanceNumber":1,"protocolConnectionNumber":1003,"name":"OPCClient1","description":"OPC Client 1","enabled":true,"commandsEnabled":true,"stats":{"nodeName":"mainNode","timeTag":{"$date":"2021-02-23T10:54:54.433Z"}},"endpointURLs":["opc.tcp://opcua.demo-this.com:51210/UA/SampleServer"],"configFileName":"c:\\json-scada\\conf\\Opc.Ua.DefaultClient.Config.xml","autoCreateTags":true,"useSecurity":false}
{"_id":{"$oid":"6053887ea2e672638cc751d4"},"protocolDriver":"TELEGRAF-LISTENER","protocolDriverInstanceNumber": 1,"protocolConnectionNumber": 2001,"name": "TELEGRAFDEMO","description": "TELEGRAF Demo","enabled": true,"stats": null,"ipAddresses": ["127.0.0.1"],"ipAddressLocalBind": "0.0.0.0:51920"}
{"_id":{"$oid":"606c93aa46fda805647cce53"},"protocolDriver":"MQTT-SPARKPLUG-B","protocolDriverInstanceNumber":1,"protocolConnectionNumber":1200,"name":"MQTT-BROKER","description":"MQTT Demo","enabled":true,"commandsEnabled":true,"autoCreateTags":true,"endpointURLs":["mqtt://test.mosquitto.org:1883"],"topics":["spBv1.0/Edge Nodes/#","spBv1.0/MIMIC/#"],"groupId":"","edgeNodeId":"","deviceId":"","scadaHostId":"","username":"","password":"","useSecurity":false,"chainValidation":true,"rootCertFilePath":"","localCertFilePath":"","privateKeyFilePath":"","pfxFilePath":"","passphrase":"","allowTLSv10":false,"allowTLSv11":false,"allowTLSv12":true,"allowTLSv13":true,"cipherList":"","publishTopicRoot":"","topicsAsFiles":[],"topicsScripted":[],"clientId":""}
Expand Down
6 changes: 6 additions & 0 deletions demo-docker/mongo_seed/files/demo_connections_linux.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{"_id":{"$oid":"5f108e3e3d8adfd3eccb206e"},"protocolDriver":"IEC60870-5-104_SERVER","protocolDriverInstanceNumber":1.0,"protocolConnectionNumber":1001.0,"name":"IEC104DIST","description":"Demo distribution of IEC 104","enabled":true,"commandsEnabled":true,"ipAddressLocalBind":"0.0.0.0:2404","ipAddresses":[],"localLinkAddress":1.0,"remoteLinkAddress":2.0,"giInterval":null,"testCommandInterval":0.0,"timeSyncInterval":0.0,"sizeOfCOT":2.0,"sizeOfCA":2.0,"sizeOfIOA":3.0,"k":12.0,"w":8.0,"t0":10.0,"t1":15.0,"t2":10.0,"t3":20.0,"serverModeMultiActive":true,"maxClientConnections":20.0,"maxQueueSize":5000.0}
{"_id":{"$oid":"5f1090143d8adfd3eccb206f"},"protocolDriver":"IEC60870-5-104","protocolDriverInstanceNumber":1.0,"protocolConnectionNumber":61.0,"name":"IEC104DEMO","description":"Demo via IEC60870-5-104","enabled":true,"commandsEnabled":true,"ipAddressLocalBind":"","ipAddresses":["150.230.171.172:2404"],"localLinkAddress":2.0,"remoteLinkAddress":1.0,"giInterval":250.0,"testCommandInterval":60.0,"timeSyncInterval":650.0,"sizeOfCOT":2.0,"sizeOfCA":2.0,"sizeOfIOA":3.0,"k":12.0,"w":8.0,"t0":10.0,"t1":15.0,"t2":10.0,"t3":20.0}
{"_id":{"$oid":"5ff3512268d80d68205b403f"},"protocolDriver":"OPC-UA","protocolDriverInstanceNumber":1,"protocolConnectionNumber":1003,"name":"OPCClient1","description":"OPC Client 1","enabled":true,"commandsEnabled":true,"stats":{"nodeName":"mainNode","timeTag":{"$date":"2021-02-23T10:54:54.433Z"}},"endpointURLs":["opc.tcp://opcua.demo-this.com:51210/UA/SampleServer"],"configFileName":"/home/jsonscada/json-scada/conf/Opc.Ua.DefaultClient.Config.xml","autoCreateTags":true,"useSecurity":false}
{"_id":{"$oid":"606c93aa46fda805647cce53"},"protocolDriver":"MQTT-SPARKPLUG-B","protocolDriverInstanceNumber":1,"protocolConnectionNumber":1200,"name":"MQTT-BROKER","description":"MQTT Demo","enabled":true,"commandsEnabled":true,"autoCreateTags":true,"endpointURLs":["mqtt://test.mosquitto.org:1883"],"topics":["spBv1.0/Edge Nodes/#","spBv1.0/MIMIC/#"],"groupId":"","edgeNodeId":"","deviceId":"","scadaHostId":"","username":"","password":"","useSecurity":false,"chainValidation":true,"rootCertFilePath":"","localCertFilePath":"","privateKeyFilePath":"","pfxFilePath":"","passphrase":"","allowTLSv10":false,"allowTLSv11":false,"allowTLSv12":true,"allowTLSv13":true,"cipherList":"","publishTopicRoot":"","topicsAsFiles":[],"topicsScripted":[],"clientId":""}
{"_id":{"$oid":"60da25c2040e43523c8f4f57"},"protocolDriver":"OPC-UA_SERVER","protocolDriverInstanceNumber":1,"protocolConnectionNumber":123,"name":"OPC-UA DIST","description":"Test distribution of OPC-UA","enabled":true,"commandsEnabled":true,"ipAddressLocalBind":"0.0.0.0:4840","ipAddresses":[],"groupId":"UA/Test","topics":["KOR1","KAW2"]}
{"_id":{"$oid":"6053887ea2e672638cc751d4"},"protocolDriver":"TELEGRAF-LISTENER","protocolDriverInstanceNumber": 1,"protocolConnectionNumber": 2001,"name": "TELEGRAFDEMO","description": "TELEGRAF Demo","enabled": true,"stats": null,"ipAddresses": ["127.0.0.1"],"ipAddressLocalBind": "0.0.0.0:51920"}
2 changes: 1 addition & 1 deletion platform-rhel9/grafana.ini
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ disable_signout_menu = true

#################################### Auth Proxy ##########################
[auth.proxy]
enabled = false
enabled = true
;header_name = X-WEBAUTH-USER
;header_property = username
;auto_sign_up = true
Expand Down
3 changes: 2 additions & 1 deletion platform-rhel9/json-scada-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ sudo systemctl enable postgresql-16

sudo cp json_scada_*.conf /etc/nginx/conf.d/
sudo cp nginx.conf /etc/nginx/
sudo setsebool -P httpd_can_network_connect 1
sudo systemctl enable nginx

sudo dnf -y install mongodb-org
Expand All @@ -92,7 +93,7 @@ sudo dnf -y install supervisor
sudo cp *.ini /etc/supervisord.d/
sudo systemctl enable supervisord

sudo dnf -y install grafana
sudo dnf -y install grafana-9.5.18
sudo cp grafana.ini /etc/grafana
sudo systemctl enable grafana-server

Expand Down
32 changes: 16 additions & 16 deletions platform-rhel9/json_scada_http.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

server {
listen 80;
listen [::]:80;
server_name localhost;
server_tokens off;

Expand All @@ -31,39 +32,38 @@

deny all;

#location / {
# root "/home/jsonscada/json-scada/src/htdocs/";
# index index.html;
#}

location / {
root "/home/jsonscada/json-scada/src/htdocs/";
index index.html;
}

location /index.html {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8080/;
proxy_pass http://jsonscadarealtimewebserver/;
}

location /login/ {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8080/login/;
proxy_pass http://jsonscadarealtimewebserver/login/;
}

location /admin/ {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8080/admin/;
proxy_pass http://jsonscadarealtimewebserver/admin/;
}

# OPC-like Realtime/Hist API
location /Invoke/ {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8080/Invoke/;
proxy_pass http://jsonscadarealtimewebserver/Invoke/;
}

# # reverse proxy, redirect ajax requests to OSHMI webserver.exe
Expand All @@ -76,7 +76,7 @@

# reverse proxy, redirect grafana requests (pass it to nodejs server_realtime_auth that redirects to grafana)
location /grafana/ {
proxy_pass http://127.0.0.1:8080/grafana/;
proxy_pass http://jsonscadarealtimewebserver/grafana/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand All @@ -95,12 +95,12 @@
return 403;
}

# cache of SVG displays
location ~ ^/svg/.+(\.svg|\.js)$ {
add_header Cache-Control "no-cache, must-revalidate";
etag on;
root "c:/json-scada/src/htdocs/";
}
## cache of SVG displays
#location ~ ^/svg/.+(\.svg|\.js)$ {
# add_header Cache-Control "no-cache, must-revalidate";
# etag on;
# root "c:/json-scada/src/htdocs/";
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
Expand Down
35 changes: 18 additions & 17 deletions platform-rhel9/json_scada_https.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# server_name $hostname;
# server_tokens off;

# listen 443 ssl http2;
# listen 443 ssl http2;
# listen [::]:443 ssl http2;
# ssl_certificate /home/jsonscada/json-scada/conf/nginx.crt;
# ssl_certificate_key /home/jsonscada/json-scada/conf/nginx.key;

Expand Down Expand Up @@ -36,43 +37,43 @@
#
# deny all;

# location / {
# root "/home/jsonscada/json-scada/src/htdocs/";
# index index.html;
# }
# #location / {
# # root "/home/jsonscada/json-scada/src/htdocs/";
# # index index.html;
# #}

# location /index.html {
# location / {
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header Host $http_host;
# proxy_pass http://127.0.0.1:8080/;
# proxy_pass http://jsonscadarealtimewebserver/;
# }

# location /login/ {
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header Host $http_host;
# proxy_pass http://127.0.0.1:8080/login/;
# proxy_pass http://jsonscadarealtimewebserver/login/;
# }

# location /admin/ {
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header Host $http_host;
# proxy_pass http://127.0.0.1:8080/admin/;
# proxy_pass http://jsonscadarealtimewebserver/admin/;
# }

# # OPC-like Realtime/Hist API
# location /Invoke/ {
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header Host $http_host;
# proxy_pass http://127.0.0.1:8080/Invoke/;
# proxy_pass http://jsonscadarealtimewebserver/Invoke/;
# }

# # reverse proxy, redirect grafana requests (pass it to nodejs server_realtime_auth that redirects to grafana)
# location /grafana/ {
# proxy_pass http://127.0.0.1:8080/grafana/;
# proxy_pass http://jsonscadarealtimewebserver/grafana/;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand All @@ -93,12 +94,12 @@
# return 403;
# }

# # cache of SVG displays
# location ~ ^/svg/.+(\.svg|\.js)$ {
# add_header Cache-Control "no-cache, must-revalidate";
# etag on;
# root "/home/jsonscada/json-scada/src/htdocs/";
# }
# ## cache of SVG displays
# #location ~ ^/svg/.+(\.svg|\.js)$ {
# # add_header Cache-Control "no-cache, must-revalidate";
# # etag on;
# # root "/home/jsonscada/json-scada/src/htdocs/";
# #}

# # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
# #
Expand Down

0 comments on commit a4564e1

Please sign in to comment.