From 9a2b07bafc5868620dd144900f9697e711bc3136 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sat, 27 Aug 2022 13:30:17 +0200 Subject: [PATCH 1/2] Add power meter credentials to Radon inventory --- inventory.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/inventory.yml b/inventory.yml index c1bc095..f610b5e 100644 --- a/inventory.yml +++ b/inventory.yml @@ -98,6 +98,22 @@ all: 6261613435373465336463376431366164373538376465343031 radon.n39.eu: server_admin: "admin+radon@netz39.de" + pwr_meter_amqp_user: "pwr-meter" + pwr_meter_amqp_pass: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 62343631383061663837393636663230303734313662353262333537346635343533383736636365 + 3430646130313661653462383961386430343234323338360a643261343238326165333839333931 + 38303738353139653935333632393838336331633739373433636438613162333235346335383933 + 3462313739363833340a343534383664353565613566613032623565393264313032313861363131 + 39646437353963393430336233653934383034373830313935356666336439333438 + pwr_meter_api_token: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 36393038376632373362383162623866346630656664313330623432633335366461313732643439 + 3062353665373030343264613832653463383064323139350a613439666436383365666535316634 + 32303064323664326538366331303733656565323332323331333962386165316566643764663262 + 6132316461393562370a323564316335343231643266373139323161316663313237326261306531 + 65656162653866383632383265343133626637316566333366386164396465353231636636616335 + 3461663034653936306666313437323734393361306432623639 krypton.n39.eu: server_admin: "admin+krypton@netz39.de" ldap_admin_password: !vault | From fde7af78cd16b95e9de1a6d7acb28f2cae4cb7f9 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sat, 27 Aug 2022 13:30:30 +0200 Subject: [PATCH 2/2] Add power meter pulse gateway for 19i room to Radon setup --- radon.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/radon.yml b/radon.yml index c559993..9c12021 100644 --- a/radon.yml +++ b/radon.yml @@ -16,6 +16,8 @@ rabbitmq_image: "bitnami/rabbitmq:3.10.7" rabbitmq_data: "{{ data_dir }}/rabbitmq" + pwr_meter_pulse_gw_image: "netz39/power-meter-pulse-gateway:0.2.0" + roles: - role: docker_setup vars: @@ -109,6 +111,24 @@ - "{{ rabbitmq_data }}/etc_rabbitmq:/etc/rabbitmq:rw" + - 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: +# - 127.0.0.1:9003:8080 + - 9003:8080 + env: + AMQP_HOST: "rabbitmq.n39.eu" + AMQP_USER: "{{ pwr_meter_amqp_user }}" + AMQP_PASS: "{{ pwr_meter_amqp_pass }}" + AMQP_VHOST: "/iot" + PULSE_BINDING: "pwr-meter-pulse-19i" + API_TOKEN: "{{ pwr_meter_api_token }}" + + # TODO HTTPS ingress, when #727 is resolved + + handlers: - name: restart mosquitto docker_container: