ns-ionos: move powerdnsadmin webinterface to new hostname

This commit is contained in:
Franzi 2023-05-16 18:07:34 +02:00
parent a4bb7f89ec
commit f8416215d5
Signed by: kunsi
GPG key ID: 12E3D2136B818350
6 changed files with 34 additions and 9 deletions

View file

@ -46,6 +46,7 @@ Rule of thumb: keep ports below 10000 free for stuff that reserves ports.
| 22070 | paperless-ng | gunicorn | | 22070 | paperless-ng | gunicorn |
| 22080 | netbox | gunicorn | | 22080 | netbox | gunicorn |
| 22090 | jugendhackt_tools | gunicorn | | 22090 | jugendhackt_tools | gunicorn |
| 22100 | powerdnsadmin | gunicorn |
| 22999 | nginx | stub_status | | 22999 | nginx | stub_status |
| 22100 | ntfy | http | | 22100 | ntfy | http |

View file

@ -9,7 +9,7 @@ Group=powerdnsadmin
Environment=FLASK_CONF=/opt/powerdnsadmin/config.py Environment=FLASK_CONF=/opt/powerdnsadmin/config.py
WorkingDirectory=/opt/powerdnsadmin/src WorkingDirectory=/opt/powerdnsadmin/src
ExecStartPre=-/bin/chown powerdnsadmin:powerdnsadmin /opt/powerdnsadmin/src/powerdnsadmin/static ExecStartPre=-/bin/chown powerdnsadmin:powerdnsadmin /opt/powerdnsadmin/src/powerdnsadmin/static
ExecStart=/opt/powerdnsadmin/venv/bin/gunicorn 'powerdnsadmin:create_app()' ExecStart=/opt/powerdnsadmin/venv/bin/gunicorn 'powerdnsadmin:create_app()' --name powerdnsadmin --workers 4 --max-requests 1200 --max-requests-jitter 50 --log-level=info --bind=127.0.0.1:22100
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -21,10 +21,14 @@ git_deploy = {
files = { files = {
'/opt/powerdnsadmin/config.py': { '/opt/powerdnsadmin/config.py': {
'content_type': 'mako', 'content_type': 'mako',
'triggers': {
'svc_systemd:powerdnsadmin:restart',
},
}, },
'/etc/systemd/system/powerdnsadmin.service': { '/etc/systemd/system/powerdnsadmin.service': {
'triggers': { 'triggers': {
'action:systemd-reload', 'action:systemd-reload',
'svc_systemd:powerdnsadmin:restart',
}, },
}, },
} }

View file

@ -50,3 +50,27 @@ def icinga_check_for_new_release(metadata):
}, },
}, },
} }
@metadata_reactor.provides(
'nginx/vhosts/powerdnsadmin',
)
def nginx(metadata):
if not node.has_bundle('nginx'):
raise DoNotRunAgain
return {
'nginx': {
'vhosts': {
'powerdnsadmin': {
'locations': {
'/': {
'target': 'http://127.0.0.1:22100',
},
},
'website_check_path': '/login',
'website_check_string': 'PowerDNS',
},
},
},
}

View file

@ -133,7 +133,7 @@ nodes['home.router'] = {
'interface': 'enp1s0.7', 'interface': 'enp1s0.7',
'dyndns': { 'dyndns': {
'domain': 'franzi-home.kunbox.net', 'domain': 'franzi-home.kunbox.net',
'url': 'https://ns-primary.kunbox.net/nic/update?hostname=franzi-home.kunbox.net&myip={ip}', 'url': 'https://ns-ionos.kunbox.net/nic/update?hostname=franzi-home.kunbox.net&myip={ip}',
'username': vault.decrypt('encrypt$gAAAAABfr8DLAJhmUIhdxLq83I8MnRRvkRgDZcO8Brvw1KpvplC3K8ZGj0jIIWD3Us33vIP6t0ybd_mgD8slpRUk78Kqd3BMoQ=='), 'username': vault.decrypt('encrypt$gAAAAABfr8DLAJhmUIhdxLq83I8MnRRvkRgDZcO8Brvw1KpvplC3K8ZGj0jIIWD3Us33vIP6t0ybd_mgD8slpRUk78Kqd3BMoQ=='),
'password': vault.decrypt('encrypt$gAAAAABfr8Cq5M1hweeJTQAl0dLhFntdlw-QnkIYUQpY-_ycODVWOpyeAwjwOgWLSdsdXIUvqcoiXPZPV-BE12p5C42NGnj9r7sKYpoGz8xfuGIk6haMa2g='), 'password': vault.decrypt('encrypt$gAAAAABfr8Cq5M1hweeJTQAl0dLhFntdlw-QnkIYUQpY-_ycODVWOpyeAwjwOgWLSdsdXIUvqcoiXPZPV-BE12p5C42NGnj9r7sKYpoGz8xfuGIk6haMa2g='),
}, },

View file

@ -18,14 +18,10 @@ gateway4 = "10.255.255.1"
gateway6 = "fe80::250:56ff:fea8:628f" gateway6 = "fe80::250:56ff:fea8:628f"
[metadata.icinga_options] [metadata.icinga_options]
pretty_name = "ns-primary.kunbox.net" pretty_name = "ns-ionos.kunbox.net"
[metadata.nginx.vhosts."ns-primary.kunbox.net"] [metadata.nginx.vhosts.powerdnsadmin]
website_check_path = "/login" domain = "ns-ionos.kunbox.net"
website_check_string = "PowerDNS"
[metadata.nginx.vhosts."ns-primary.kunbox.net".locations."/"]
target = "http://127.0.0.1:8000/"
[metadata.postgresql] [metadata.postgresql]
version = "15" version = "15"