Merge pull request #360 from Security-Onion-Solutions/feature/nodered

Experimental: Node-RED
This commit is contained in:
weslambert
2020-02-18 00:12:01 -05:00
committed by GitHub
3 changed files with 80 additions and 1 deletions

View File

@@ -112,6 +112,19 @@ http {
}
location /nodered/ {
proxy_pass http://{{ masterip }}:1880/;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Proxy "";
}
location /playbook/ {
proxy_pass http://{{ masterip }}:3200/playbook/;
proxy_read_timeout 90;

View File

@@ -112,7 +112,20 @@ http {
}
location /playbook/ {
location /nodered/ {
proxy_pass http://{{ masterip }}:1880/;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Proxy "";
}
location /playbook/ {
proxy_pass http://{{ masterip }}:3200/playbook/;
proxy_read_timeout 90;
proxy_connect_timeout 90;

53
salt/nodered/init.sls Normal file
View File

@@ -0,0 +1,53 @@
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Create the nodered group
noderedgroup:
group.present:
- name: nodered
- gid: 947
# Add the nodered user
nodered:
user.present:
- uid: 947
- gid: 947
- home: /opt/so/conf/nodered
#noderedconfdir:
# file.directory:
# - name: /opt/so/conf/nodered
# - user: 947
# - group: 939
# - mode: 775
# - makedirs: True
noderedlog:
file.directory:
- name: /opt/so/log/nodered
- user: 947
- group: 939
- mode: 755
- makedirs: True
so-nodered:
docker_container.running:
- image: soshybridhunter/so-nodered:HH1.1.5
- interactive: True
- binds:
- /opt/so/conf/nodered/:/data:rw
- port_bindings:
- 0.0.0.0:1880:1880