diff --git a/salt/common/nginx/nginx.conf.so-eval b/salt/common/nginx/nginx.conf.so-eval index 701f558e7..7cc810a93 100644 --- a/salt/common/nginx/nginx.conf.so-eval +++ b/salt/common/nginx/nginx.conf.so-eval @@ -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; diff --git a/salt/common/nginx/nginx.conf.so-master b/salt/common/nginx/nginx.conf.so-master index 2c836962c..4da4b99d6 100644 --- a/salt/common/nginx/nginx.conf.so-master +++ b/salt/common/nginx/nginx.conf.so-master @@ -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; diff --git a/salt/nodered/init.sls b/salt/nodered/init.sls new file mode 100644 index 000000000..96aee2630 --- /dev/null +++ b/salt/nodered/init.sls @@ -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 . + +# 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 +