From 60e58e6b6a5b34e1d7429593c79b6938096673aa Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sat, 27 Aug 2022 16:44:18 +0200 Subject: [PATCH 1/7] Add apache role --- radon.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/radon.yml b/radon.yml index 6e3f250..0ea81ed 100644 --- a/radon.yml +++ b/radon.yml @@ -22,6 +22,7 @@ - role: docker_setup vars: docker_data_root: "/srv/docker" + - role: apache tasks: - name: Ensure the mosquitto directories exist From a651aa047f12bb94cee280848c9682eb3e01d892 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sat, 27 Aug 2022 16:44:27 +0200 Subject: [PATCH 2/7] Add dehydrated role --- radon.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/radon.yml b/radon.yml index 0ea81ed..f51c422 100644 --- a/radon.yml +++ b/radon.yml @@ -23,6 +23,12 @@ vars: docker_data_root: "/srv/docker" - role: apache + - role: ansible-role-dehydrated + vars: + dehydrated_contact_email: "{{ server_admin }}" + dehydrated_domains: + - name: nodered.n39.eu + tasks: - name: Ensure the mosquitto directories exist From 5be0c410b1bfcb20525e23ec90d45dab469aab32 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sat, 27 Aug 2022 16:52:52 +0200 Subject: [PATCH 3/7] Add ingress for nodered.n39.eu --- radon.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/radon.yml b/radon.yml index f51c422..ed424f7 100644 --- a/radon.yml +++ b/radon.yml @@ -82,14 +82,20 @@ TZ: Europe/Berlin NODE_RED_ENABLE_PROJECTS: "true" ports: -# - 127.0.0.1:9002:1880 - - 9002:1880 + - 127.0.0.1:9002:1880 volumes: - "{{ nodered_data }}/data:/data" detach: yes keep_volumes: yes restart_policy: unless-stopped + - name: Setup proxy site nodered.n39.eu + include_role: + name: setup-http-site-proxy + vars: + site_name: "nodered.n39.eu" + proxy_port: 9002 + - name: Check if rabbitmq data dir exists ansible.builtin.stat: From 0efede818a8366f6e56b6c8b6419486c29aa5d24 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sat, 27 Aug 2022 20:36:20 +0200 Subject: [PATCH 4/7] Add ingress for rabbitmq.n39.eu --- radon.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/radon.yml b/radon.yml index ed424f7..acec080 100644 --- a/radon.yml +++ b/radon.yml @@ -28,6 +28,7 @@ dehydrated_contact_email: "{{ server_admin }}" dehydrated_domains: - name: nodered.n39.eu + - name: rabbitmq.n39.eu tasks: @@ -116,13 +117,21 @@ - 5552:5552 - 5672:5672 - 25672:25672 - - 15672:15672 + - 127.0.0.1:15672:15672 env: RABBITMQ_SECURE_PASSWORD: "yes" volumes: - "{{ rabbitmq_data }}/bitnami:/bitnami:rw" - "{{ rabbitmq_data }}/etc_rabbitmq:/etc/rabbitmq:rw" + - name: Setup proxy site rabbitmq.n39.eu + include_role: + name: setup-http-site-proxy + vars: + site_name: "rabbitmq.n39.eu" + proxy_port: 15672 + + - name: Ensure Power Meter Pulse Gateway for 19i room is running docker_container: From 664dc648c59af1de9030b53e5593c8788e0b9656 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sat, 27 Aug 2022 20:38:08 +0200 Subject: [PATCH 5/7] Add ingress for pwr-meter-pulse-gw-19i.svc.n39.eu --- radon.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/radon.yml b/radon.yml index acec080..a3fef5a 100644 --- a/radon.yml +++ b/radon.yml @@ -29,6 +29,7 @@ dehydrated_domains: - name: nodered.n39.eu - name: rabbitmq.n39.eu + - name: pwr-meter-pulse-gw-19i.svc.n39.eu tasks: @@ -132,12 +133,12 @@ proxy_port: 15672 - - name: Ensure Power Meter Pulse Gateway for 19i room is running docker_container: name: pwr-meter-pulse-gw-19i image: "{{ pwr_meter_pulse_gw_image }}" ports: +# Wait for https://redmine.n39.eu/issues/755 # - 127.0.0.1:9003:8080 - 9003:8080 env: @@ -148,7 +149,12 @@ PULSE_BINDING: "pwr-meter-pulse-19i" API_TOKEN: "{{ pwr_meter_api_token }}" - # TODO HTTPS ingress, when #727 is resolved + - name: Setup proxy site pwr-meter-pulse-gw-19i.svc.n39.eu + include_role: + name: setup-http-site-proxy + vars: + site_name: "pwr-meter-pulse-gw-19i.svc.n39.eu" + proxy_port: 9003 handlers: From 8549d50d030b046ed8750f138f524340b2962002 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sat, 27 Aug 2022 20:41:15 +0200 Subject: [PATCH 6/7] Add call to penguineer.dehydrated_cron role --- radon.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/radon.yml b/radon.yml index a3fef5a..b47f430 100644 --- a/radon.yml +++ b/radon.yml @@ -30,6 +30,7 @@ - name: nodered.n39.eu - name: rabbitmq.n39.eu - name: pwr-meter-pulse-gw-19i.svc.n39.eu + - role: penguineer.dehydrated_cron tasks: From 020e5a4dd8e197b76dfdd6d18486d370c342b968 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Tue, 6 Sep 2022 14:56:25 +0200 Subject: [PATCH 7/7] Add call to apache-letsencrypt role --- radon.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/radon.yml b/radon.yml index b47f430..b019a60 100644 --- a/radon.yml +++ b/radon.yml @@ -23,6 +23,7 @@ vars: docker_data_root: "/srv/docker" - role: apache + - role: apache-letsencrypt # Uses configuration from dehydrated setup - role: ansible-role-dehydrated vars: dehydrated_contact_email: "{{ server_admin }}"