Enable netdata on valkyrie and yggdrasil

This commit is contained in:
Wojciech Kozlowski 2023-10-08 00:18:32 +02:00
parent 9441cf3a01
commit 666f788a13
9 changed files with 94 additions and 3 deletions

View File

@ -1,11 +1,20 @@
---
# --------------------------------------------------------------------------------------------------
# system:var
# system:base
# --------------------------------------------------------------------------------------------------
system_etc_home_directory: "{{ system_etc_root_directory }}/services"
system_var_data_directory: "{{ system_var_root_directory }}/data"
system_var_containers_directory: "{{ system_var_root_directory }}/containers"
# --------------------------------------------------------------------------------------------------
# system:extra
# --------------------------------------------------------------------------------------------------
system_extra_netdata_inet_address: "{{ vpn_bridge_inet_address }}"
system_extra_netdata_inet6_address: "{{ vpn_bridge_inet6_address }}"
system_extra_netdata_registry_enabled: false
system_extra_netdata_registry_url: "{{ vault_system_extra_netdata_registry_url }}"
system_extra_netdata_stream_api_key: "{{ vault_system_extra_netdata_stream_api_key }}"
# --------------------------------------------------------------------------------------------------
# vpn:wireguard
# --------------------------------------------------------------------------------------------------

View File

@ -8,7 +8,10 @@ system_mail_smtp_pass: "{{ vault_system_mail_smtp_pass }}"
# system:base
# --------------------------------------------------------------------------------------------------
system_base_udp_ports:
- 546 # dhcpv6
- "{{ vpn_wireguard_port }}"
system_base_additional_tcp_ports:
- 19999 # netdata
# --------------------------------------------------------------------------------------------------
# system:var

View File

@ -1,4 +1,9 @@
---
# --------------------------------------------------------------------------------------------------
# system:extra
# --------------------------------------------------------------------------------------------------
system_extra_netdata_registry_enabled: true
# --------------------------------------------------------------------------------------------------
# system:zfs
# --------------------------------------------------------------------------------------------------
@ -31,6 +36,7 @@ system_base_udp_ports:
system_base_additional_tcp_ports:
- 139 # samba
- 445 # samba
- 19999 # netdata
system_base_unattended_upgrades_blacklist:
- "linux-"
- "zfs(utils)?-"
@ -138,7 +144,7 @@ services_host_services:
lrproxy:
inet_address: "{{ vpn_bridge_inet_prefix }}.2"
inet6_address: "{{ vpn_bridge_inet6_prefix }}::2"
tcp: [80, 443]
tcp: [80, 443, 19999]
restic: true
database:
inet_address: "{{ vpn_bridge_inet_prefix }}.3"

View File

@ -0,0 +1,22 @@
server {
listen [::]:19999;
listen 19999;
server_name netdata.valkyrie.thenineworlds.net;
allow {{ local_inet_network }};
allow {{ local_inet6_network }};
deny all;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://netdata.valkyrie.thenineworlds.net:19999;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@ -0,0 +1,22 @@
server {
listen [::]:19999;
listen 19999;
server_name netdata.yggdrasil.thenineworlds.net;
allow {{ local_inet_network }};
allow {{ local_inet6_network }};
deny all;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://netdata.yggdrasil.thenineworlds.net:19999;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@ -4,6 +4,11 @@ ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 {{ services_service_name }}
{% for netdata_host in ( services_deploy_netdata_hosts | dict2items ) %}
{{ netdata_host.value.inet6_address }} {{ netdata_host.key }}
{{ netdata_host.value.inet_address }} {{ netdata_host.key }}
{% endfor %}
{% for service in ( services_all_services | dict2items ) %}
{{ service.value.inet6_address }} pod-{{ service.key }}

View File

@ -92,8 +92,17 @@
- "files/services/deploy/lrproxy/nginx-conf.d/database.thenineworlds.net.conf"
- "files/services/deploy/lrproxy/nginx-conf.d/git.thenineworlds.net.conf"
- "files/services/deploy/lrproxy/nginx-conf.d/music.thenineworlds.net.conf"
- "files/services/deploy/lrproxy/nginx-conf.d/netdata.valkyrie.thenineworlds.net.conf"
- "files/services/deploy/lrproxy/nginx-conf.d/netdata.yggdrasil.thenineworlds.net.conf"
- "files/services/deploy/lrproxy/nginx-conf.d/notes.thenineworlds.net.conf"
services_service_deploy_versions: "{{ services_deploy_versions.lrproxy }}"
services_deploy_netdata_hosts:
"netdata.valkyrie.thenineworlds.net":
inet_address: "{{ hostvars.valkyrie.system_extra_netdata_inet_address }}"
inet6_address: "{{ hostvars.valkyrie.system_extra_netdata_inet6_address }}"
"netdata.yggdrasil.thenineworlds.net":
inet_address: "{{ hostvars.yggdrasil.system_extra_netdata_inet_address }}"
inet6_address: "{{ hostvars.yggdrasil.system_extra_netdata_inet6_address }}"
when: "'lrproxy' in services_host_services"
tags: "always"

View File

@ -112,6 +112,21 @@
system_extra_libvirt_user_name: "{{ system_base_ssh_user }}"
system_extra_libvirt_install_zfs_driver: "{{ 'zfs' in group_names }}"
- name: "system : valkyrie, yggdrasil"
hosts:
- "valkyrie"
- "yggdrasil"
roles:
- role: "system/extra/netdata"
tags:
- "system:extra"
- "system:extra:netdata"
vars:
system_extra_netdata_registry_inet_address: "\
{{ hostvars.yggdrasil.system_extra_netdata_inet_address }}"
system_extra_netdata_registry_inet6_address: "\
{{ hostvars.yggdrasil.system_extra_netdata_inet6_address }}"
- name: "system : asgard:&zfs"
hosts: "asgard:&zfs"
roles:

2
roles

@ -1 +1 @@
Subproject commit 9b57350d92f221571d6a075f3e7e403c33e436ad
Subproject commit 0f805168b6c3b6293378e75e061a8b6dbbf1f875