new opanhab raspi
This commit is contained in:
parent
99c12b6106
commit
9ef958d935
10 changed files with 85 additions and 73 deletions
|
@ -44,9 +44,15 @@ files = {
|
||||||
},
|
},
|
||||||
'/etc/nginx/sites-available': {
|
'/etc/nginx/sites-available': {
|
||||||
'delete': True,
|
'delete': True,
|
||||||
|
'needs': {
|
||||||
|
'pkg_apt:nginx',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'/etc/nginx/sites-enabled': {
|
'/etc/nginx/sites-enabled': {
|
||||||
'delete': True,
|
'delete': True,
|
||||||
|
'needs': {
|
||||||
|
'pkg_apt:nginx',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,18 @@ directories = {
|
||||||
'owner': 'openhab',
|
'owner': 'openhab',
|
||||||
'group': 'openhab',
|
'group': 'openhab',
|
||||||
'needs': [
|
'needs': [
|
||||||
'zfs_dataset:tank/openhab',
|
'zfs_dataset:tank/openhab/data',
|
||||||
|
'pkg_apt:openhab',
|
||||||
|
],
|
||||||
|
'triggers': [
|
||||||
|
'svc_systemd:openhab:restart',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
'/etc/openhab': {
|
||||||
|
'owner': 'openhab',
|
||||||
|
'group': 'openhab',
|
||||||
|
'needs': [
|
||||||
|
'zfs_dataset:tank/openhab/config',
|
||||||
'pkg_apt:openhab',
|
'pkg_apt:openhab',
|
||||||
],
|
],
|
||||||
'triggers': [
|
'triggers': [
|
||||||
|
@ -18,6 +29,8 @@ svc_systemd = {
|
||||||
'needs': [
|
'needs': [
|
||||||
'pkg_apt:openhab',
|
'pkg_apt:openhab',
|
||||||
'directory:/var/lib/openhab',
|
'directory:/var/lib/openhab',
|
||||||
|
'zfs_dataset:tank/openhab/config',
|
||||||
|
'zfs_dataset:tank/openhab/data',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@ defaults = {
|
||||||
'packages': {
|
'packages': {
|
||||||
'openhab': {
|
'openhab': {
|
||||||
'needs': [
|
'needs': [
|
||||||
'zfs_dataset:tank/openhab',
|
'zfs_dataset:tank/openhab/config',
|
||||||
|
'zfs_dataset:tank/openhab/data',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -14,6 +15,12 @@ defaults = {
|
||||||
'zfs': {
|
'zfs': {
|
||||||
'datasets': {
|
'datasets': {
|
||||||
'tank/openhab': {
|
'tank/openhab': {
|
||||||
|
'mountpoint': 'none',
|
||||||
|
},
|
||||||
|
'tank/openhab/config': {
|
||||||
|
'mountpoint': '/etc/openhab',
|
||||||
|
},
|
||||||
|
'tank/openhab/data': {
|
||||||
'mountpoint': '/var/lib/openhab',
|
'mountpoint': '/var/lib/openhab',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,6 +8,12 @@ files = {
|
||||||
'/etc/cron.daily/zfs-auto-snapshot': {'delete': True},
|
'/etc/cron.daily/zfs-auto-snapshot': {'delete': True},
|
||||||
'/etc/cron.weekly/zfs-auto-snapshot': {'delete': True},
|
'/etc/cron.weekly/zfs-auto-snapshot': {'delete': True},
|
||||||
'/etc/cron.monthly/zfs-auto-snapshot': {'delete': True},
|
'/etc/cron.monthly/zfs-auto-snapshot': {'delete': True},
|
||||||
|
'/etc/modprobe.d/zfs.conf': {
|
||||||
|
'content': '\n'.join(
|
||||||
|
f'option zfs {k}={v}'
|
||||||
|
for k, v in node.metadata.get('zfs/kernel_params').items()
|
||||||
|
) + '\n',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
actions = {
|
actions = {
|
||||||
|
|
|
@ -77,6 +77,7 @@ defaults = {
|
||||||
'zfs': {
|
'zfs': {
|
||||||
'datasets': {},
|
'datasets': {},
|
||||||
'pools': {},
|
'pools': {},
|
||||||
|
'kernel_params': {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,5 +15,10 @@
|
||||||
'grafana_rows': {
|
'grafana_rows': {
|
||||||
'health',
|
'health',
|
||||||
},
|
},
|
||||||
|
'zfs': {
|
||||||
|
'kernel_params': {
|
||||||
|
'zfs_txg_timeout': 300,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,5 +7,10 @@
|
||||||
'ipv4': '10.0.2.8/24',
|
'ipv4': '10.0.2.8/24',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'dns': {
|
||||||
|
'homematic.ckn.li': {
|
||||||
|
'A': {'10.0.2.8'},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,55 @@
|
||||||
{
|
{
|
||||||
'hostname': '10.0.0.14',
|
'hostname': '10.0.0.17',
|
||||||
'groups': [
|
'groups': [
|
||||||
'raspberry-pi',
|
'raspberry-pi',
|
||||||
'debian-10',
|
'debian-11',
|
||||||
|
'monitored',
|
||||||
|
'webserver',
|
||||||
],
|
],
|
||||||
'bundles': [
|
'bundles': [
|
||||||
|
'zfs',
|
||||||
|
'openhab',
|
||||||
|
'java',
|
||||||
],
|
],
|
||||||
'metadata': {
|
'metadata': {
|
||||||
'id': '397d6f7f-f5bb-49ab-bdad-f1404e49d0d5',
|
'FIXME_dont_touch_sshd': True,
|
||||||
|
'telegraf': {
|
||||||
|
'config': {
|
||||||
|
'agent': {
|
||||||
|
'flush_interval': '30s',
|
||||||
|
'interval': '30s',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'id': '0afcde75-95c8-4fbd-b4c2-8a0fcc92884a',
|
||||||
'network': {
|
'network': {
|
||||||
'internal': {
|
'internal': {
|
||||||
'interface': 'eth0',
|
'interface': 'eth0',
|
||||||
'ipv4': '10.0.0.14/24',
|
'ipv4': '10.0.0.17/24',
|
||||||
'gateway4': '10.0.0.1',
|
'gateway4': '10.0.0.1',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'nginx': {
|
||||||
|
'vhosts': {
|
||||||
|
'openhab.ckn.li': {
|
||||||
|
'content': 'nginx/proxy_pass.conf',
|
||||||
|
'context': {
|
||||||
|
'target': 'http://localhost:8080',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'java': {
|
||||||
|
'version': 11,
|
||||||
|
},
|
||||||
|
'zfs': {
|
||||||
|
'pools': {
|
||||||
|
'tank': {
|
||||||
|
'devices': [
|
||||||
|
'/dev/sda',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
{
|
|
||||||
'hostname': '10.0.0.17',
|
|
||||||
'groups': [
|
|
||||||
'raspberry-pi',
|
|
||||||
'debian-11',
|
|
||||||
'monitored',
|
|
||||||
'webserver',
|
|
||||||
],
|
|
||||||
'bundles': [
|
|
||||||
'zfs',
|
|
||||||
'openhab',
|
|
||||||
'java',
|
|
||||||
'mirror',
|
|
||||||
],
|
|
||||||
'metadata': {
|
|
||||||
'FIXME_dont_touch_sshd': True,
|
|
||||||
'telegraf': {
|
|
||||||
'config': {
|
|
||||||
'agent': {
|
|
||||||
'flush_interval': '30s',
|
|
||||||
'interval': '30s',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'id': '0afcde75-95c8-4fbd-b4c2-8a0fcc92884a',
|
|
||||||
'network': {
|
|
||||||
'internal': {
|
|
||||||
'interface': 'eth0',
|
|
||||||
'ipv4': '10.0.0.17/24',
|
|
||||||
'gateway4': '10.0.0.1',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'nginx': {
|
|
||||||
'vhosts': {
|
|
||||||
'openhab.ckn.li': {
|
|
||||||
'content': 'nginx/proxy_pass.conf',
|
|
||||||
'context': {
|
|
||||||
'target': 'http://localhost:8080',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'java': {
|
|
||||||
'version': 11,
|
|
||||||
},
|
|
||||||
'zfs': {
|
|
||||||
'pools': {
|
|
||||||
'tank': {
|
|
||||||
'devices': [
|
|
||||||
'/dev/disk/by-id/mmc-SE32G_0x1766be0d-part3',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -130,17 +130,6 @@
|
||||||
'version': '1.5-rc',
|
'version': '1.5-rc',
|
||||||
'installer': True,
|
'installer': True,
|
||||||
},
|
},
|
||||||
'users': {
|
|
||||||
'root': {
|
|
||||||
'authorized_users': {
|
|
||||||
'root@home.server',
|
|
||||||
'root@home.openhab3',
|
|
||||||
},
|
|
||||||
'authorized_keys': {
|
|
||||||
'ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHMKTJLw6Cb+MLt+9JFOkuo2QBpuA8EoTKOFpb3IFQHEq19YLMzOhcErWmzaRfiCnILhnwTQz0njS+n9Qu4aghk= root@mail.sublimity.de'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'vm': {
|
'vm': {
|
||||||
'cores': 2,
|
'cores': 2,
|
||||||
'ram': 8096,
|
'ram': 8096,
|
||||||
|
|
Loading…
Reference in a new issue