From dc0d7458423012ce8e3b516a964133255881765e Mon Sep 17 00:00:00 2001 From: Sophie Schiller Date: Fri, 17 Nov 2023 16:56:07 +0100 Subject: [PATCH 1/5] htz-cloud.jugendhackt: add new node --- bundles/jugendhackt_tools/items.py | 2 + bundles/wide-dhcp6c/files/ip-up | 3 +- nodes/htz-cloud/jugendhackt.py | 79 ++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 nodes/htz-cloud/jugendhackt.py diff --git a/bundles/jugendhackt_tools/items.py b/bundles/jugendhackt_tools/items.py index c2d0c6e..cc3e466 100644 --- a/bundles/jugendhackt_tools/items.py +++ b/bundles/jugendhackt_tools/items.py @@ -16,6 +16,7 @@ actions['jugendhackt_tools_create_virtualenv'] = { 'needs': { # actually /opt/jugendhackt_tools, but we don't create that 'directory:/opt/jugendhackt_tools/src', + 'pkg_apt:python3-virtualenv', }, } @@ -27,6 +28,7 @@ actions['jugendhackt_tools_install'] = { ]), 'needs': { 'action:jugendhackt_tools_create_virtualenv', + 'pkg_apt:python3-pip', }, 'triggered': True, } diff --git a/bundles/wide-dhcp6c/files/ip-up b/bundles/wide-dhcp6c/files/ip-up index da0ac8d..4230ff6 100644 --- a/bundles/wide-dhcp6c/files/ip-up +++ b/bundles/wide-dhcp6c/files/ip-up @@ -11,8 +11,9 @@ fi if systemctl is-active wide-dhcpv6-client; then systemctl stop wide-dhcpv6-client - sleep 1 + sleep 60 systemctl start wide-dhcpv6-client else + sleep 60 systemctl start wide-dhcpv6-client fi diff --git a/nodes/htz-cloud/jugendhackt.py b/nodes/htz-cloud/jugendhackt.py new file mode 100644 index 0000000..2723286 --- /dev/null +++ b/nodes/htz-cloud/jugendhackt.py @@ -0,0 +1,79 @@ +# jugend hackt toolz + +nodes['htz-cloud.jugendhackt'] = { + 'bundles': { + 'jugendhackt_tools', + 'postgresql', + 'zfs', + }, + 'groups': { + 'debian-bookworm', + 'webserver', + }, + 'metadata': { + 'interfaces': { + 'eth0': { + 'ips': { + '65.108.53.1', + '2a01:4f9:c011:be01::/64', + }, + 'gateway4': '172.31.1.1', + 'gateway6': 'fe80::1', + }, + }, + 'jugendhackt_tools': { + 'allowed_hosts': ['jh.sophies-kitchen.eu'], + 'timezone': 'Europe/Berlin', + }, + 'nginx': { + 'vhosts': { + 'jugendhackt_tools': { + 'domain': 'jh.sophies-kitchen.eu', + 'locations': { + '/': { + 'target': 'http://127.0.0.1:22090/', + }, + '/static/': { + 'alias': '/opt/jugendhackt_tools/static/', + }, + }, + }, + }, + }, + 'postgresql': { + 'version': '16', + }, + 'sysctl': { + 'options': { + # XXX find out if this is really needed + 'net.ipv4.ip_forward': '1', + 'net.ipv6.conf.all.forwarding': '1', + }, + }, + 'vm': { + 'cpu': 2, + 'ram': 4, + }, + 'users': { + 'sophie': { + 'enable_linger': True, + 'ssh_pubkey': [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDILcYrMQNRVXAm5L+7No1ZumqfCyRc1QZmTY3O7Q8hsE4+fCAvwsWm2aSMfLL3NnIl8Nm1Rixzic5jdYKYNIY3SlX1wvTB+MhGb2eyVSd7c/Y98aCLSlDkQ2sebjpdA1FoJOeGD3qxqDwj0+KckXU2ZaSSQY7CxVsjH65UxCHqVAg+6uLdNbj7j850s1B9NXVXef+sBQ5jUngXxnqQWwNh2Mn8auwumkeEG4SYf96wyFkLvmBitOng/GyLWl9YPnXXHHDnatcVipy7y34qw4CQ4P84anecbA+Bqr9IcxBW6qYmYgRKEnAcmEfjQd+BI1gCLB1BBEmb/qp+mVLd4tOh sophie@carbon" + ], + }, + }, + 'zfs': { + 'pools': { + 'tank': { + 'when_creating': { + 'config': [{ + 'devices': { + '/dev/disk/by-id/scsi-0HC_Volume_100095339', + }, + }] + }, + }, + }, + }, + }, +} From 6d9e2e2663f2dbf15ea5d8171aa17f996d4cd127 Mon Sep 17 00:00:00 2001 From: Sophie Schiller Date: Fri, 17 Nov 2023 17:20:52 +0100 Subject: [PATCH 2/5] jhtoolz static --- nodes/htz-cloud/jugendhackt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/htz-cloud/jugendhackt.py b/nodes/htz-cloud/jugendhackt.py index 2723286..8716a8c 100644 --- a/nodes/htz-cloud/jugendhackt.py +++ b/nodes/htz-cloud/jugendhackt.py @@ -34,7 +34,7 @@ nodes['htz-cloud.jugendhackt'] = { 'target': 'http://127.0.0.1:22090/', }, '/static/': { - 'alias': '/opt/jugendhackt_tools/static/', + 'alias': '/opt/jugendhackt_tools/src/static/', }, }, }, From 0f07357ebe4dd3196e894ef9946cde8bc287bbd0 Mon Sep 17 00:00:00 2001 From: Sophie Schiller Date: Sat, 18 May 2024 13:07:42 +0200 Subject: [PATCH 3/5] revive jhtoolz --- bundles/jugendhackt_tools/items.py | 2 +- nodes/htz-cloud/jugendhackt.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bundles/jugendhackt_tools/items.py b/bundles/jugendhackt_tools/items.py index cc3e466..882be31 100644 --- a/bundles/jugendhackt_tools/items.py +++ b/bundles/jugendhackt_tools/items.py @@ -1,7 +1,7 @@ directories['/opt/jugendhackt_tools/src'] = {} git_deploy['/opt/jugendhackt_tools/src'] = { - 'repo': 'https://github.com/kunsi/jugendhackt_schedule.git', + 'repo': 'https://github.com/sophieschi/jugendhackt_schedule.git', 'rev': 'main', 'triggers': { 'action:jugendhackt_tools_install', diff --git a/nodes/htz-cloud/jugendhackt.py b/nodes/htz-cloud/jugendhackt.py index 8716a8c..29d2595 100644 --- a/nodes/htz-cloud/jugendhackt.py +++ b/nodes/htz-cloud/jugendhackt.py @@ -14,8 +14,8 @@ nodes['htz-cloud.jugendhackt'] = { 'interfaces': { 'eth0': { 'ips': { - '65.108.53.1', - '2a01:4f9:c011:be01::/64', + '65.21.106.160', + '2a01:4f9:c012:cfd9::/64', }, 'gateway4': '172.31.1.1', 'gateway6': 'fe80::1', @@ -68,7 +68,7 @@ nodes['htz-cloud.jugendhackt'] = { 'when_creating': { 'config': [{ 'devices': { - '/dev/disk/by-id/scsi-0HC_Volume_100095339', + '/dev/sdb', }, }] }, From 7aaa47ccb23adbc24a38bd78390a807e8e13a01f Mon Sep 17 00:00:00 2001 From: Sophie Schiller Date: Sat, 18 May 2024 13:27:38 +0200 Subject: [PATCH 4/5] jh toolz from original source --- bundles/jugendhackt_tools/items.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/jugendhackt_tools/items.py b/bundles/jugendhackt_tools/items.py index 882be31..956fbb9 100644 --- a/bundles/jugendhackt_tools/items.py +++ b/bundles/jugendhackt_tools/items.py @@ -1,7 +1,7 @@ directories['/opt/jugendhackt_tools/src'] = {} git_deploy['/opt/jugendhackt_tools/src'] = { - 'repo': 'https://github.com/sophieschi/jugendhackt_schedule.git', + 'repo': 'https://github.com/Kunsi/jugendhackt_schedule.git', 'rev': 'main', 'triggers': { 'action:jugendhackt_tools_install', From 0ed2a141cb922a6a691db9cee55ce38af0e6987e Mon Sep 17 00:00:00 2001 From: Sophie Schiller Date: Mon, 22 Jul 2024 22:17:00 +0200 Subject: [PATCH 5/5] new ips for jh toolz --- nodes/htz-cloud/jugendhackt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes/htz-cloud/jugendhackt.py b/nodes/htz-cloud/jugendhackt.py index 29d2595..55878d0 100644 --- a/nodes/htz-cloud/jugendhackt.py +++ b/nodes/htz-cloud/jugendhackt.py @@ -14,8 +14,8 @@ nodes['htz-cloud.jugendhackt'] = { 'interfaces': { 'eth0': { 'ips': { - '65.21.106.160', - '2a01:4f9:c012:cfd9::/64', + '37.27.5.12', + '2a01:4f9:c012:eb5b::/64', }, 'gateway4': '172.31.1.1', 'gateway6': 'fe80::1',