wip
This commit is contained in:
parent
8f1f646b3b
commit
30b5529df8
5 changed files with 18 additions and 184 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
https://github.com/home-assistant/supervised-installer?tab=readme-ov-file
|
||||||
|
https://github.com/home-assistant/os-agent/tree/main?tab=readme-ov-file#using-home-assistant-supervised-on-debian
|
||||||
|
https://docs.docker.com/engine/install/debian/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
https://www.home-assistant.io/installation/linux#install-home-assistant-supervised
|
https://www.home-assistant.io/installation/linux#install-home-assistant-supervised
|
||||||
https://github.com/home-assistant/supervised-installer
|
https://github.com/home-assistant/supervised-installer
|
||||||
https://github.com/home-assistant/architecture/blob/master/adr/0014-home-assistant-supervised.md
|
https://github.com/home-assistant/architecture/blob/master/adr/0014-home-assistant-supervised.md
|
||||||
|
|
|
@ -14,34 +14,16 @@ actions = {
|
||||||
'DEBIAN_FRONTEND=noninteractive dpkg -i /tmp/os-agent.deb',
|
'DEBIAN_FRONTEND=noninteractive dpkg -i /tmp/os-agent.deb',
|
||||||
]),
|
]),
|
||||||
'unless': f'test "$(apt -qq list os-agent | cut -d" " -f2)" = "{quote(version)}"',
|
'unless': f'test "$(apt -qq list os-agent | cut -d" " -f2)" = "{quote(version)}"',
|
||||||
|
'needs': {
|
||||||
|
'pkg_apt:',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'install_homeassistant_supervised': {
|
||||||
|
'command': 'wget -O /tmp/homeassistant-supervised.deb https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb && apt install /tmp/homeassistant-supervised.deb',
|
||||||
|
'unless': 'apt -qq list homeassistant-supervised | grep -q "installed"',
|
||||||
|
'needs': {
|
||||||
|
'action:install_os_agent',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
# svc_systemd = {
|
|
||||||
# 'docker.service': {
|
|
||||||
# 'needs': [
|
|
||||||
# 'pkg_apt:docker-ce',
|
|
||||||
# 'pkg_apt:docker-ce-cli',
|
|
||||||
# 'pkg_apt:containerd.io',
|
|
||||||
# 'pkg_apt:docker-buildx-plugin',
|
|
||||||
# 'pkg_apt:docker-compose-plugin',
|
|
||||||
# ],
|
|
||||||
# },
|
|
||||||
# }
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: keep up to date:
|
|
||||||
# https://github.com/home-assistant/os-agent/releases/latest
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# direct link to latest version download: https://github.com/home-assistant/os-agent/releases/download/latest/os-agent_latest_linux_aarch64.deb
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: keep NetworkManager
|
|
||||||
|
|
||||||
|
|
||||||
# https://github.com/home-assistant/supervised-installer?tab=readme-ov-file
|
|
||||||
# https://github.com/home-assistant/os-agent/tree/main?tab=readme-ov-file#using-home-assistant-supervised-on-debian
|
|
||||||
# https://docs.docker.com/engine/install/debian/
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
# users = {
|
|
||||||
# 'homeassistant': {
|
|
||||||
# 'home': '/opt/homeassistant',
|
|
||||||
# 'groups': [
|
|
||||||
# 'dialout',
|
|
||||||
# #'gpio',
|
|
||||||
# #'i2c',
|
|
||||||
# ],
|
|
||||||
# },
|
|
||||||
# }
|
|
||||||
|
|
||||||
# directories = {
|
|
||||||
# '/opt/homeassistant': {
|
|
||||||
# 'owner': 'homeassistant',
|
|
||||||
# 'group': 'homeassistant',
|
|
||||||
# },
|
|
||||||
# '/opt/homeassistant/data': {
|
|
||||||
# 'owner': 'homeassistant',
|
|
||||||
# 'group': 'homeassistant',
|
|
||||||
# },
|
|
||||||
# '/opt/homeassistant/venv': {
|
|
||||||
# 'owner': 'homeassistant',
|
|
||||||
# 'group': 'homeassistant',
|
|
||||||
# },
|
|
||||||
# }
|
|
||||||
|
|
||||||
# svc_systemd = {
|
|
||||||
# 'homeassistant.service': {},
|
|
||||||
# }
|
|
||||||
|
|
||||||
# venv manually managed for now
|
|
||||||
'''
|
|
||||||
python3 -m venv /opt/homeassistant/venv
|
|
||||||
source /opt/homeassistant/venv/bin/activate
|
|
||||||
python3 -m pip install wheel
|
|
||||||
pip3 install homeassistant
|
|
||||||
'''
|
|
|
@ -1,73 +0,0 @@
|
||||||
defaults = {
|
|
||||||
'apt': {
|
|
||||||
'packages': {
|
|
||||||
'python3': {},
|
|
||||||
'python3-dev': {},
|
|
||||||
'python3-pip': {},
|
|
||||||
'python3-venv': {},
|
|
||||||
'libffi-dev': {},
|
|
||||||
'libssl-dev': {},
|
|
||||||
'libjpeg-dev': {},
|
|
||||||
'zlib1g-dev': {},
|
|
||||||
'autoconf': {},
|
|
||||||
'build-essential': {},
|
|
||||||
'libopenjp2-7': {},
|
|
||||||
'libturbojpeg0-dev': {},
|
|
||||||
'tzdata': {},
|
|
||||||
'bluez': {},
|
|
||||||
'libtiff6': {},
|
|
||||||
'ffmpeg': {},
|
|
||||||
'liblapack3': {},
|
|
||||||
'liblapack-dev': {},
|
|
||||||
'libatlas-base-dev': {},
|
|
||||||
'libpcap-dev': {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
# 'systemd': {
|
|
||||||
# 'units': {
|
|
||||||
# f'homeassistant.service': {
|
|
||||||
# 'Unit': {
|
|
||||||
# 'Description': "Home Assstant",
|
|
||||||
# 'After': 'network.target',
|
|
||||||
# },
|
|
||||||
# 'Service': {
|
|
||||||
# 'User': 'homeassistant',
|
|
||||||
# 'Group': 'homeassistant',
|
|
||||||
# 'WorkingDirectory': "/opt/homeassistant",
|
|
||||||
# 'ExecStart': "/opt/homeassistant/venv/bin/python3 /opt/homeassistant/venv/bin/hass -c /opt/homeassistant/data --debug",
|
|
||||||
# },
|
|
||||||
# 'Install': {
|
|
||||||
# 'WantedBy': {
|
|
||||||
# 'multi-user.target'
|
|
||||||
# },
|
|
||||||
# },
|
|
||||||
# }
|
|
||||||
# },
|
|
||||||
# },
|
|
||||||
# 'zfs': {
|
|
||||||
# 'datasets': {
|
|
||||||
# 'tank/homeassistant': {
|
|
||||||
# 'mountpoint': '/opt/homeassistant/data',
|
|
||||||
# 'needed_by': {
|
|
||||||
# 'user:homeassistant',
|
|
||||||
# 'directory:/opt/homeassistant',
|
|
||||||
# },
|
|
||||||
# },
|
|
||||||
# },
|
|
||||||
# },
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@metadata_reactor.provides(
|
|
||||||
'nginx/vhosts',
|
|
||||||
)
|
|
||||||
def nginx(metadata):
|
|
||||||
return {
|
|
||||||
'nginx': {
|
|
||||||
'vhosts': {
|
|
||||||
metadata.get('homeassistant/domain'): {
|
|
||||||
'content': 'homeassistant/vhost.conf',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
{
|
|
||||||
'supergroups': [
|
|
||||||
'all',
|
|
||||||
],
|
|
||||||
'bundles': [
|
|
||||||
'apt',
|
|
||||||
'homeassistant-supervised',
|
|
||||||
],
|
|
||||||
'metadata': {
|
|
||||||
'apt': {
|
|
||||||
'sources': {
|
|
||||||
'debian': {
|
|
||||||
'urls': {
|
|
||||||
'https://deb.debian.org/debian',
|
|
||||||
},
|
|
||||||
'suites': {
|
|
||||||
'{codename}',
|
|
||||||
'{codename}-updates',
|
|
||||||
},
|
|
||||||
'components': {
|
|
||||||
'main',
|
|
||||||
'contrib',
|
|
||||||
'non-free',
|
|
||||||
'non-free-firmware',
|
|
||||||
},
|
|
||||||
'key': 'debian-{version}',
|
|
||||||
},
|
|
||||||
'debian-security': {
|
|
||||||
'urls': {
|
|
||||||
'http://security.debian.org/debian-security',
|
|
||||||
},
|
|
||||||
'suites': {
|
|
||||||
'{codename}-security',
|
|
||||||
},
|
|
||||||
'components': {
|
|
||||||
'main',
|
|
||||||
'contrib',
|
|
||||||
'non-free',
|
|
||||||
'non-free-firmware',
|
|
||||||
},
|
|
||||||
'key': 'debian-{version}-security',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
Loading…
Reference in a new issue