From ddb263614170b87dd811e5022591963902607563 Mon Sep 17 00:00:00 2001 From: Phill Kelley <34226495+Paraphraser@users.noreply.github.com> Date: Mon, 18 Jul 2022 16:03:36 +1000 Subject: [PATCH] rename "bridge" to "router" 1. Rename files with "bridge" in the name to "router". 2. Edit file contents referring to "bridge" so they refer to "router". 3. Update README to reflect this change, plus point to the relevant link in the ZeroTier documentation. Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com> --- .github/workflows/multiarch.yml | 4 ++-- .github/workflows/{bridge.yml => router.yml} | 24 +++++++++---------- Dockerfile.bridge => Dockerfile.router | 8 +++---- README.md | 8 +++---- k8s/deployment.yaml | 2 +- ...rypoint-bridge.sh => entrypoint-router.sh} | 0 6 files changed, 23 insertions(+), 23 deletions(-) rename .github/workflows/{bridge.yml => router.yml} (87%) rename Dockerfile.bridge => Dockerfile.router (65%) rename scripts/{entrypoint-bridge.sh => entrypoint-router.sh} (100%) diff --git a/.github/workflows/multiarch.yml b/.github/workflows/multiarch.yml index 59bd0b9..af8515c 100644 --- a/.github/workflows/multiarch.yml +++ b/.github/workflows/multiarch.yml @@ -103,8 +103,8 @@ jobs: buildah manifest push --all --creds zyclonite:${{ secrets.GITHUB_TOKEN }} ${{ env.IMAGE_NAME }}:latest docker://ghcr.io/zyclonite/${{ env.IMAGE_NAME }}:latest buildah manifest push --all --creds zyclonite:${{ secrets.GITHUB_TOKEN }} ${{ env.IMAGE_NAME }}:latest docker://ghcr.io/zyclonite/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }} - bridge: - uses: ./.github/workflows/bridge.yml + router: + uses: ./.github/workflows/router.yml needs: push with: tag: ${{ github.event.release.tag_name }} diff --git a/.github/workflows/bridge.yml b/.github/workflows/router.yml similarity index 87% rename from .github/workflows/bridge.yml rename to .github/workflows/router.yml index 4f34a8c..2292607 100644 --- a/.github/workflows/bridge.yml +++ b/.github/workflows/router.yml @@ -1,4 +1,4 @@ -name: Bridge Mode build +name: Router Mode build on: workflow_call: inputs: @@ -43,11 +43,11 @@ jobs: - name: Build unstable image if: ${{ inputs.event == 'push' }} - run: buildah bud --platform ${{ matrix.platform.name }} --build-arg FROM_IMAGE=${{ format('ghcr.io/zyclonite/{0}', env.IMAGE_NAME) }} --build-arg FROM_VERSION=main -f ./Dockerfile.bridge -t ${{ env.IMAGE_NAME }}:${{ matrix.platform.tag }} . + run: buildah bud --platform ${{ matrix.platform.name }} --build-arg FROM_IMAGE=${{ format('ghcr.io/zyclonite/{0}', env.IMAGE_NAME) }} --build-arg FROM_VERSION=main -f ./Dockerfile.router -t ${{ env.IMAGE_NAME }}:${{ matrix.platform.tag }} . - name: Build stable image if: ${{ inputs.event == 'release' }} - run: buildah bud --platform ${{ matrix.platform.name }} --build-arg FROM_IMAGE=${{ format('ghcr.io/zyclonite/{0}', env.IMAGE_NAME) }} --build-arg FROM_VERSION=${{ inputs.tag }} -f ./Dockerfile.bridge -t ${{ env.IMAGE_NAME }}:${{ matrix.platform.tag }} . + run: buildah bud --platform ${{ matrix.platform.name }} --build-arg FROM_IMAGE=${{ format('ghcr.io/zyclonite/{0}', env.IMAGE_NAME) }} --build-arg FROM_VERSION=${{ inputs.tag }} -f ./Dockerfile.router -t ${{ env.IMAGE_NAME }}:${{ matrix.platform.tag }} . - name: Check images created run: buildah images | grep '${{ env.IMAGE_NAME }}' @@ -98,16 +98,16 @@ jobs: - name: Push unstable images if: ${{ inputs.event == 'push' }} run: | - buildah manifest push --all --format v2s2 --creds zyclonite:${{ secrets.REGISTRY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://docker.io/zyclonite/${{ env.IMAGE_NAME }}:bridge-main - buildah manifest push --all --creds zyclonite:${{ secrets.QUAY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://quay.io/zyclonite/${{ env.IMAGE_NAME }}:bridge-main - buildah manifest push --all --creds zyclonite:${{ secrets.GITHUB_TOKEN }} ${{ env.IMAGE_NAME }}:latest docker://ghcr.io/zyclonite/${{ env.IMAGE_NAME }}:bridge-main + buildah manifest push --all --format v2s2 --creds zyclonite:${{ secrets.REGISTRY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://docker.io/zyclonite/${{ env.IMAGE_NAME }}:router-main + buildah manifest push --all --creds zyclonite:${{ secrets.QUAY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://quay.io/zyclonite/${{ env.IMAGE_NAME }}:router-main + buildah manifest push --all --creds zyclonite:${{ secrets.GITHUB_TOKEN }} ${{ env.IMAGE_NAME }}:latest docker://ghcr.io/zyclonite/${{ env.IMAGE_NAME }}:router-main - name: Push stable images if: ${{ inputs.event == 'release' }} run: | - buildah manifest push --all --format v2s2 --creds zyclonite:${{ secrets.REGISTRY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://docker.io/zyclonite/${{ env.IMAGE_NAME }}:bridge - buildah manifest push --all --format v2s2 --creds zyclonite:${{ secrets.REGISTRY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://docker.io/zyclonite/${{ env.IMAGE_NAME }}:bridge-${{ github.event.release.tag_name }} - buildah manifest push --all --creds zyclonite:${{ secrets.QUAY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://quay.io/zyclonite/${{ env.IMAGE_NAME }}:bridge - buildah manifest push --all --creds zyclonite:${{ secrets.QUAY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://quay.io/zyclonite/${{ env.IMAGE_NAME }}:bridge-${{ github.event.release.tag_name }} - buildah manifest push --all --creds zyclonite:${{ secrets.GITHUB_TOKEN }} ${{ env.IMAGE_NAME }}:latest docker://ghcr.io/zyclonite/${{ env.IMAGE_NAME }}:bridge - buildah manifest push --all --creds zyclonite:${{ secrets.GITHUB_TOKEN }} ${{ env.IMAGE_NAME }}:latest docker://ghcr.io/zyclonite/${{ env.IMAGE_NAME }}:bridge-${{ github.event.release.tag_name }} + buildah manifest push --all --format v2s2 --creds zyclonite:${{ secrets.REGISTRY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://docker.io/zyclonite/${{ env.IMAGE_NAME }}:router + buildah manifest push --all --format v2s2 --creds zyclonite:${{ secrets.REGISTRY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://docker.io/zyclonite/${{ env.IMAGE_NAME }}:router-${{ github.event.release.tag_name }} + buildah manifest push --all --creds zyclonite:${{ secrets.QUAY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://quay.io/zyclonite/${{ env.IMAGE_NAME }}:router + buildah manifest push --all --creds zyclonite:${{ secrets.QUAY_PASSWORD }} ${{ env.IMAGE_NAME }}:latest docker://quay.io/zyclonite/${{ env.IMAGE_NAME }}:router-${{ github.event.release.tag_name }} + buildah manifest push --all --creds zyclonite:${{ secrets.GITHUB_TOKEN }} ${{ env.IMAGE_NAME }}:latest docker://ghcr.io/zyclonite/${{ env.IMAGE_NAME }}:router + buildah manifest push --all --creds zyclonite:${{ secrets.GITHUB_TOKEN }} ${{ env.IMAGE_NAME }}:latest docker://ghcr.io/zyclonite/${{ env.IMAGE_NAME }}:router-${{ github.event.release.tag_name }} diff --git a/Dockerfile.bridge b/Dockerfile.router similarity index 65% rename from Dockerfile.bridge rename to Dockerfile.router index b7126b6..ddc9eb8 100644 --- a/Dockerfile.bridge +++ b/Dockerfile.router @@ -4,20 +4,20 @@ ARG FROM_VERSION=latest FROM ${FROM_IMAGE}:${FROM_VERSION} LABEL org.opencontainers.image.title="zerotier" \ - org.opencontainers.image.version="bridge-${ZT_VERSION}" \ - org.opencontainers.image.description="ZeroTier One as Docker Image" \ + org.opencontainers.image.version="router-${ZT_VERSION}" \ + org.opencontainers.image.description="ZeroTier One router as Docker Image" \ org.opencontainers.image.licenses="MIT" \ org.opencontainers.image.source="https://github.com/zyclonite/zerotier-docker" ENV LOG_PATH=/var/log/supervisor -COPY scripts/entrypoint-bridge.sh /usr/sbin/ +COPY scripts/entrypoint-router.sh /usr/sbin/ RUN apk add --no-cache --purge --clean-protected iptables \ && rm -rf /var/cache/apk/* EXPOSE 9993/udp -ENTRYPOINT ["entrypoint-bridge.sh"] +ENTRYPOINT ["entrypoint-router.sh"] CMD ["-U"] diff --git a/README.md b/README.md index 1d92209..8e7e24e 100644 --- a/README.md +++ b/README.md @@ -32,14 +32,14 @@ or create an empty file with the network as name /var/lib/zerotier-one/networks.d/8056c2e21c000001.conf -#### Bridge mode -It is the implementation of the local network bridge [paper](https://zerotier.atlassian.net/wiki/spaces/SD/pages/193134593/Bridge+your+ZeroTier+and+local+network+with+a+RaspberryPi) +#### Router mode +It is the implementation of the local network router [paper](https://zerotier.atlassian.net/wiki/spaces/SD/pages/224395274/Route+between+ZeroTier+and+Physical+Networks) docker run --name zerotier-one --device=/dev/net/tun \ --cap-add=NET_ADMIN --cap-add=NET_RAW --cap-add=SYS_ADMIN \ - -v /var/lib/zerotier-one:/var/lib/zerotier-one zyclonite/zerotier:bridge + -v /var/lib/zerotier-one:/var/lib/zerotier-one zyclonite/zerotier:router -That will start the zero-one, establish connection and build the bridge once the `zt` interface is up. +That will start the zero-one, establish connection and build the NAT+router once the `zt` interface is up. #### Source diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 6e53ca0..f15edbb 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -25,7 +25,7 @@ spec: containers: - name: zerotier - image: zyclonite/zerotier:bridge + image: zyclonite/zerotier:router resources: limits: memory: "128Mi" diff --git a/scripts/entrypoint-bridge.sh b/scripts/entrypoint-router.sh similarity index 100% rename from scripts/entrypoint-bridge.sh rename to scripts/entrypoint-router.sh