Compare commits
14 Commits
1
.github/workflows/deploy.yaml
vendored
1
.github/workflows/deploy.yaml
vendored
@@ -16,4 +16,5 @@ jobs:
|
||||
workflows:
|
||||
uses: hassio-addons/workflows/.github/workflows/addon-deploy.yaml@main
|
||||
secrets:
|
||||
CAS_API_KEY: ${{ secrets.CAS_API_KEY }}
|
||||
DISPATCH_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Home Assistant Community Add-on: ZeroTier One
|
||||
|
||||
ZeroTier delivers the capabilities of VPNs, SDN, and SD-WAN with a single
|
||||
system. Manage all your connected resources across both local and wide area
|
||||
networks as if the whole world is a single data center.
|
||||
[ZeroTier][zerotier] delivers the capabilities of VPNs, SDN, and SD-WAN with
|
||||
a single system. Manage all your connected resources across both local
|
||||
and wide area networks as if the whole world is a single data center.
|
||||
|
||||
People use ZeroTier to seamlessly connect laptops, desktops, phones,
|
||||
embedded devices, cloud resources, and apps any way they want anywhere they go.
|
||||
@@ -14,8 +14,12 @@ can now add your Home Assistant instance using this add-on.
|
||||
The installation of this add-on is pretty straightforward and not different in
|
||||
comparison to installing any other Home Assistant add-on.
|
||||
|
||||
1. Search for the "ZeroTier One" add-on in the Supervisor add-on store
|
||||
and install it.
|
||||
1. Click the Home Assistant My button below to open the add-on on your Home
|
||||
Assistant instance.
|
||||
|
||||
[![Open this add-on in your Home Assistant instance.][addon-badge]][addon]
|
||||
|
||||
1. Click the "Install" button to install the add-on.
|
||||
1. Create a free account at [zerotier.com][zerotier] and get a network ID.
|
||||
1. Set the "network_id" add-on option with your network ID.
|
||||
1. Start the "ZeroTier One" add-on
|
||||
@@ -134,6 +138,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
[addon-badge]: https://my.home-assistant.io/badges/supervisor_addon.svg
|
||||
[addon]: https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_zerotier&repository_url=https%3A%2F%2Fgithub.com%2Fhassio-addons%2Frepository
|
||||
[api]: https://www.zerotier.com/manual.shtml#4_1
|
||||
[contributors]: https://github.com/hassio-addons/addon-zerotier/graphs/contributors
|
||||
[discord-ha]: https://discord.gg/c5DvZ4e
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:11.0.1
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:12.0.0
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
@@ -10,22 +10,27 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN \
|
||||
apk add --no-cache --virtual .build-dependencies \
|
||||
build-base=0.5-r2 \
|
||||
linux-headers=5.10.41-r0 \
|
||||
git=2.34.1-r0 \
|
||||
cargo=1.60.0-r2 \
|
||||
git=2.36.1-r0 \
|
||||
linux-headers=5.16.7-r1 \
|
||||
openssl-dev=1.1.1o-r0 \
|
||||
pkgconf=1.8.0-r0 \
|
||||
\
|
||||
&& apk add --no-cache \
|
||||
libgcc=10.3.1_git20211027-r0 \
|
||||
libstdc++=10.3.1_git20211027-r0 \
|
||||
libgcc=11.2.1_git20220219-r2 \
|
||||
libstdc++=11.2.1_git20220219-r2 \
|
||||
\
|
||||
&& git clone --branch "1.8.4" --depth=1 \
|
||||
&& git clone --branch "1.10.0" --depth=1 \
|
||||
"https://github.com/zerotier/ZeroTierOne.git" /tmp/zerotier \
|
||||
\
|
||||
&& cd /tmp/zerotier \
|
||||
&& make \
|
||||
&& CARGO_NET_GIT_FETCH_WITH_CLI=true make \
|
||||
&& make install \
|
||||
\
|
||||
&& apk del --no-cache --purge .build-dependencies \
|
||||
&& rm -f -r /tmp/*
|
||||
&& rm -f -r \
|
||||
/root/.cargo \
|
||||
/tmp/*
|
||||
|
||||
# Copy root filesystem
|
||||
COPY rootfs /
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
---
|
||||
build_from:
|
||||
aarch64: ghcr.io/hassio-addons/base/aarch64:11.0.1
|
||||
amd64: ghcr.io/hassio-addons/base/amd64:11.0.1
|
||||
armhf: ghcr.io/hassio-addons/base/armhf:11.0.1
|
||||
armv7: ghcr.io/hassio-addons/base/armv7:11.0.1
|
||||
i386: ghcr.io/hassio-addons/base/i386:11.0.1
|
||||
aarch64: ghcr.io/hassio-addons/base/aarch64:12.0.0
|
||||
amd64: ghcr.io/hassio-addons/base/amd64:12.0.0
|
||||
armhf: ghcr.io/hassio-addons/base/armhf:12.0.0
|
||||
armv7: ghcr.io/hassio-addons/base/armv7:12.0.0
|
||||
i386: ghcr.io/hassio-addons/base/i386:12.0.0
|
||||
codenotary:
|
||||
base_image: codenotary@frenck.dev
|
||||
signer: codenotary@frenck.dev
|
||||
|
||||
@@ -4,6 +4,7 @@ version: dev
|
||||
slug: zerotier
|
||||
description: Radically simplify your network with a virtual networking layer that works the same everywhere
|
||||
url: https://github.com/hassio-addons/addon-zerotier
|
||||
codenotary: codenotary@frenck.dev
|
||||
startup: services
|
||||
init: false
|
||||
arch:
|
||||
|
||||
4
zerotier/rootfs/etc/cont-init.d/zerotier.sh
Normal file → Executable file
4
zerotier/rootfs/etc/cont-init.d/zerotier.sh
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
#!/command/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: ZeroTier One
|
||||
# Generates an identiy in case it does not exists yet
|
||||
@@ -42,7 +42,7 @@ bashio::log.info "ZeroTier node address: ${node}"
|
||||
# Sets the auth token for the local JSON API
|
||||
if bashio::config.has_value 'api_auth_token'; then
|
||||
token=$(bashio::config 'api_auth_token')
|
||||
echo "${token}" > /data/authtoken.secret
|
||||
echo "${token}" > /var/lib/zerotier-one/authtoken.secret
|
||||
fi
|
||||
|
||||
# Ensure network folder exists
|
||||
|
||||
10
zerotier/rootfs/etc/services.d/zerotier/finish
Normal file → Executable file
10
zerotier/rootfs/etc/services.d/zerotier/finish
Normal file → Executable file
@@ -1,9 +1,11 @@
|
||||
#!/usr/bin/execlineb -S0
|
||||
#!/command/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: ZeroTier One
|
||||
# Take down the S6 supervision tree when ZeroTier fails
|
||||
# ==============================================================================
|
||||
if -n { s6-test $# -ne 0 }
|
||||
if -n { s6-test ${1} -eq 256 }
|
||||
if [[ "${1}" -ne 0 ]] && [[ "${1}" -ne 256 ]]; then
|
||||
bashio::log.warning "ZeroTier crashed, halting add-on"
|
||||
/run/s6/basedir/bin/halt
|
||||
fi
|
||||
|
||||
s6-svscanctl -t /var/run/s6/services
|
||||
bashio::log.info "ZeroTier stopped, restarting..."
|
||||
|
||||
2
zerotier/rootfs/etc/services.d/zerotier/run
Normal file → Executable file
2
zerotier/rootfs/etc/services.d/zerotier/run
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
#!/command/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: ZeroTier One
|
||||
# Runs ZeroTier One
|
||||
|
||||
Reference in New Issue
Block a user