From df5e880f0e2ae3cd0d14af8fb778197614df87ef Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 1 Jul 2021 13:12:24 -0500 Subject: [PATCH 1/4] based on https://github.com/iiab/iiab/issues/2154#issue-550541163 --- roles/nodered/templates/nodered-nginx.conf.j2 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/nodered/templates/nodered-nginx.conf.j2 b/roles/nodered/templates/nodered-nginx.conf.j2 index 7d4728b16..0c678a375 100644 --- a/roles/nodered/templates/nodered-nginx.conf.j2 +++ b/roles/nodered/templates/nodered-nginx.conf.j2 @@ -1,3 +1,11 @@ location /nodered/ { - proxy_pass http://127.0.0.1:{{ apache_port }}/nodered/; + proxy_pass http://127.0.0.1:1880/nodered/; +} + +location /nodered/debug/ws/ { + proxy_pass http://127.0.0.1:1880/nodered/debug/ws; +} + +location /nodered/comms/ { + proxy_pass http://127.0.0.1:1880/nodered/comms; } From 8adcd85310a105a78e86bad38c2f4d99a44967d3 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 1 Jul 2021 13:22:43 -0500 Subject: [PATCH 2/4] drop apache --- roles/nodered/tasks/install.yml | 32 ++++++++++++++++---------------- roles/nodered/tasks/main.yml | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/roles/nodered/tasks/install.yml b/roles/nodered/tasks/install.yml index 2b40ff5d6..75d341142 100644 --- a/roles/nodered/tasks/install.yml +++ b/roles/nodered/tasks/install.yml @@ -1,11 +1,11 @@ -- name: "Set 'apache_install: True' and 'apache_enabled: True'" - set_fact: - apache_install: True - apache_enabled: True +#- name: "Set 'apache_install: True' and 'apache_enabled: True'" +# set_fact: +# apache_install: True +# apache_enabled: True -- name: APACHE - run 'httpd' role - include_role: - name: httpd +#- name: APACHE - run 'httpd' role +# include_role: +# name: httpd # 2019-01-16: @jvonau's PR #1403 moved installation of Node.js (8.x for now) & @@ -112,18 +112,18 @@ dest: /etc/systemd/system/nodered.service # mode: '0666' -- name: Install /etc/{{ apache_conf_dir }}/nodered.conf from template - template: - backup: yes - src: nodered.conf.j2 - dest: "/etc/{{ apache_conf_dir }}/nodered.conf" +#- name: Install /etc/{{ apache_conf_dir }}/nodered.conf from template +# template: +# backup: yes +# src: nodered.conf.j2 +# dest: "/etc/{{ apache_conf_dir }}/nodered.conf" # mode: '0666' # SEE ALSO THE apache2_module SECTION IN roles/httpd/tasks/main.yml -- name: Enable proxy_wstunnel apache2 module - apache2_module: - state: present - name: proxy_wstunnel +#- name: Enable proxy_wstunnel apache2 module +# apache2_module: +# state: present +# name: proxy_wstunnel # RECORD Node-RED AS INSTALLED diff --git a/roles/nodered/tasks/main.yml b/roles/nodered/tasks/main.yml index 1edf2f34b..770b53eb4 100644 --- a/roles/nodered/tasks/main.yml +++ b/roles/nodered/tasks/main.yml @@ -42,7 +42,7 @@ #- name: Enable/Disable/Restart Apache if primary - name: SHIM FOR NOW SO ALWAYS DO THE...Enable/Disable/Restart Apache include_tasks: apache.yml - #when: not nginx_enabled + when: not nginx_enabled - name: Enable/Disable/Restart NGINX if primary include_tasks: nginx.yml From b2c070fd04398acd33d1b8f4355ce62f1e3cb995 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 1 Jul 2021 14:00:44 -0500 Subject: [PATCH 3/4] not quite gone yet --- roles/nodered/tasks/install.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/nodered/tasks/install.yml b/roles/nodered/tasks/install.yml index 75d341142..cdd71f7ee 100644 --- a/roles/nodered/tasks/install.yml +++ b/roles/nodered/tasks/install.yml @@ -112,11 +112,11 @@ dest: /etc/systemd/system/nodered.service # mode: '0666' -#- name: Install /etc/{{ apache_conf_dir }}/nodered.conf from template -# template: -# backup: yes -# src: nodered.conf.j2 -# dest: "/etc/{{ apache_conf_dir }}/nodered.conf" +- name: Install /etc/{{ apache_conf_dir }}/nodered.conf from template + template: + backup: yes + src: nodered.conf.j2 + dest: "/etc/{{ apache_conf_dir }}/nodered.conf" # mode: '0666' # SEE ALSO THE apache2_module SECTION IN roles/httpd/tasks/main.yml From 2580b21281034e7dc5e9e1110e81b4c7b2344686 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 1 Jul 2021 14:06:36 -0500 Subject: [PATCH 4/4] update nginx README --- roles/nginx/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/nginx/README.md b/roles/nginx/README.md index 61177ba63..732c9c5e6 100644 --- a/roles/nginx/README.md +++ b/roles/nginx/README.md @@ -5,7 +5,7 @@ Until "Native" NGINX is later implemented for that IIAB App/Service — allowing it to move up to *Section ii.* below. And potentially later moving it up to *Section i.* if its Apache support is dropped! - + (Background: IIAB Apps/Services are generally [Ansible roles](https://github.com/iiab/iiab/wiki/IIAB-Contributors-Guide#ansible) that live in [/opt/iiab/iiab/roles](https://github.com/iiab/iiab/tree/master/roles)) 2. Without PHP available via FastCGI, any function at all for PHP-based applications validates NGINX. @@ -33,11 +33,11 @@ * nextcloud * sugarizer * wordpress + * nodered 3. These support Apache but ***NOT*** "Native" NGINX. They use a "Shim" to [proxy_pass](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) from NGINX to Apache on port 8090. See [roles/3-base-server/tasks/main.yml#L11](../3-base-server/tasks/main.yml#L11) for a list of ~6 IIAB Apps/Services that auto-enable Apache. * elgg * moodle [*, PLEASE HELP IF YOU CAN: [#2785](https://github.com/iiab/iiab/issues/2785)] - * nodered 4. These each run their own web server or non-web / backend services, e.g. off of their own [unique port(s)](https://github.com/iiab/iiab/wiki/IIAB-Networking#list-of-ports--services) (IIAB home pages link directly to these destinations). In future we'd like mnemonic URL's for all of these: (e.g. http://box/calibre, http://box/archive, http://box/kalite) * bluetooth