From 2ac3e280ffa732234fcf4175ff2ca895e0a1a110 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 22 Aug 2024 21:21:45 -0400 Subject: [PATCH 1/8] organize and tidy CI files --- .github/workflows/promote-downstreams.yml | 8 +++---- .github/workflows/publish-linux-packages.yml | 21 ++++++++++--------- ...r-deployments.yml => test-deployments.yml} | 2 +- .../linux/openziti-router/bootstrap.bash | 2 +- .../{ziti-controller => }/compose.test.bash | 0 .../ziti-controller/compose.test.yml | 2 +- 6 files changed, 18 insertions(+), 17 deletions(-) rename .github/workflows/{test-docker-deployments.yml => test-deployments.yml} (92%) rename dist/docker-images/{ziti-controller => }/compose.test.bash (100%) diff --git a/.github/workflows/promote-downstreams.yml b/.github/workflows/promote-downstreams.yml index 37a48b225..a5b2ebbf3 100644 --- a/.github/workflows/promote-downstreams.yml +++ b/.github/workflows/promote-downstreams.yml @@ -80,7 +80,7 @@ jobs: ${{ matrix.image.repo }}:${{ needs.parse_version.outputs.version }} promote_artifactory: - name: Promote ${{ matrix.package_name }}-${{ matrix.arch.rpm }}.${{ matrix.nfpm_packager }} + name: Promote ${{ matrix.package_name }}-${{ matrix.arch.rpm }}.${{ matrix.packager }} needs: parse_version strategy: fail-fast: true @@ -96,7 +96,7 @@ jobs: rpm: aarch64 - deb: armv7 rpm: armv7 - nfpm_packager: + packager: - rpm - deb runs-on: ubuntu-latest @@ -112,7 +112,7 @@ jobs: JF_ENV_1: ${{ secrets.ZITI_ARTIFACTORY_CLI_CONFIG_PACKAGE_UPLOAD }} - name: Copy RPM from test repo to stable repo with jFrog CLI - if: matrix.nfpm_packager == 'rpm' + if: matrix.packager == 'rpm' shell: bash run: > jf rt copy @@ -122,7 +122,7 @@ jobs: ${{ env.ZITI_RPM_PROD_REPO }}/redhat/${{ matrix.arch.rpm }}/ - name: Copy DEB from test repo to stable repo with jFrog CLI - if: matrix.nfpm_packager == 'deb' + if: matrix.packager == 'deb' shell: bash run: > jf rt copy diff --git a/.github/workflows/publish-linux-packages.yml b/.github/workflows/publish-linux-packages.yml index f27352f6e..4708d0d28 100644 --- a/.github/workflows/publish-linux-packages.yml +++ b/.github/workflows/publish-linux-packages.yml @@ -10,7 +10,7 @@ on: jobs: publish-linux-packages: - name: ${{ matrix.package_name }} ${{ matrix.arch.rpm }} ${{ matrix.nfpm_packager }} + name: ${{ matrix.package_name }} ${{ matrix.arch.gox }} ${{ matrix.packager }} runs-on: ubuntu-latest strategy: matrix: @@ -31,7 +31,7 @@ jobs: gox: arm deb: armv7 rpm: armv7 - nfpm_packager: + packager: - rpm - deb # - archlinux # (pacman) @@ -40,11 +40,12 @@ jobs: ZITI_VERSION: ${{ inputs.ziti-version || github.event.inputs.ziti-version }} ZITI_MAINTAINER: "OpenZiti Maintainers " ZITI_HOMEPAGE: "https://openziti.io" - ZITI_VENDOR: "NetFoundry" + ZITI_VENDOR: "NetFoundry, Inc." GOARCH: ${{ matrix.arch.goreleaser }} MINIMUM_SYSTEMD_VERSION: 232 ZITI_DEB_TEST_REPO: ${{ vars.ZITI_DEB_TEST_REPO || 'zitipax-openziti-deb-test' }} ZITI_RPM_TEST_REPO: ${{ vars.ZITI_RPM_TEST_REPO || 'zitipax-openziti-rpm-test' }} + NFPM_VERSION: "2.38.0" steps: - name: Checkout Workspace uses: actions/checkout@v4 @@ -63,11 +64,11 @@ jobs: - name: Build Package id: nfpm - uses: burningalchemist/action-gh-nfpm@v1 + uses: burningalchemist/action-gh-nfpm@eeac96f42da23d091eec0d0088bf05cac0ceb9f3 # uses: netfoundry/action-gh-nfpm@main with: - nfpm_version: "2.32.0" - packager: ${{ matrix.nfpm_packager }} + nfpm_version: ${{ env.NFPM_VERSION }} + packager: ${{ matrix.packager }} config: dist/dist-packages/linux/nfpm-${{ matrix.package_name }}.yaml target: release/ @@ -81,8 +82,8 @@ jobs: - name: upload package artifact to build summary page uses: actions/upload-artifact@v4 with: - name: ${{ matrix.package_name }}-${{ matrix.arch.goreleaser }}-${{ matrix.nfpm_packager }} - path: ./release/${{ matrix.package_name }}*.${{ matrix.nfpm_packager }} + name: ${{ matrix.package_name }}-${{ matrix.arch.gox }}-${{ matrix.packager }} + path: ./release/${{ matrix.package_name }}*.${{ matrix.packager }} if-no-files-found: error - name: Configure jFrog CLI @@ -91,7 +92,7 @@ jobs: JF_ENV_1: ${{ secrets.ZITI_ARTIFACTORY_CLI_CONFIG_PACKAGE_UPLOAD }} - name: Upload RPM to Artifactory testing repo - if: matrix.nfpm_packager == 'rpm' + if: matrix.packager == 'rpm' shell: bash run: > jf rt upload @@ -101,7 +102,7 @@ jobs: --flat=true - name: Upload DEB to Artifactory testing repo - if: matrix.nfpm_packager == 'deb' + if: matrix.packager == 'deb' shell: bash run: > jf rt upload diff --git a/.github/workflows/test-docker-deployments.yml b/.github/workflows/test-deployments.yml similarity index 92% rename from .github/workflows/test-docker-deployments.yml rename to .github/workflows/test-deployments.yml index 811a0042b..b5c964853 100644 --- a/.github/workflows/test-docker-deployments.yml +++ b/.github/workflows/test-deployments.yml @@ -31,6 +31,6 @@ jobs: - name: Run the Compose Test Script shell: bash - run: dist/docker-images/ziti-controller/compose.test.bash + run: dist/docker-images/compose.test.bash env: ZITI_GO_VERSION: ${{ steps.setup-go.outputs.go-version }} diff --git a/dist/dist-packages/linux/openziti-router/bootstrap.bash b/dist/dist-packages/linux/openziti-router/bootstrap.bash index ae9430267..e14546ba6 100755 --- a/dist/dist-packages/linux/openziti-router/bootstrap.bash +++ b/dist/dist-packages/linux/openziti-router/bootstrap.bash @@ -21,7 +21,7 @@ makeConfig() { hintLinuxBootstrap "${PWD}" return 1 else - echo "DEBUG: controller address is '${ZITI_CTRL_ADVERTISED_ADDRESS}${ZITI_CTRL_ADVERTISED_PORT}'" >&3 + echo "DEBUG: controller address is '${ZITI_CTRL_ADVERTISED_ADDRESS}:${ZITI_CTRL_ADVERTISED_PORT}'" >&3 echo "DEBUG: router address is '${ZITI_ROUTER_ADVERTISED_ADDRESS}:${ZITI_ROUTER_PORT}'" >&3 fi diff --git a/dist/docker-images/ziti-controller/compose.test.bash b/dist/docker-images/compose.test.bash similarity index 100% rename from dist/docker-images/ziti-controller/compose.test.bash rename to dist/docker-images/compose.test.bash diff --git a/dist/docker-images/ziti-controller/compose.test.yml b/dist/docker-images/ziti-controller/compose.test.yml index 1a14ce6bc..c5af51f5f 100644 --- a/dist/docker-images/ziti-controller/compose.test.yml +++ b/dist/docker-images/ziti-controller/compose.test.yml @@ -22,4 +22,4 @@ services: - -euxc - | chown -Rc ${ZIGGY_UID} /mnt - echo "Ziti is cooking" \ No newline at end of file + echo "Ziti is cooking" From 582a461c381005edbb4408827b2d8d2252bd7ae4 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 22 Aug 2024 21:24:42 -0400 Subject: [PATCH 2/8] fix portcheck --- dist/docker-images/compose.test.bash | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/dist/docker-images/compose.test.bash b/dist/docker-images/compose.test.bash index aad232a29..493f164d8 100755 --- a/dist/docker-images/compose.test.bash +++ b/dist/docker-images/compose.test.bash @@ -13,17 +13,18 @@ cleanup(){ portcheck(){ PORT="${1}" - if [ "$(nc -zv -G 5 localhost "$PORT" 2>&1 | grep -c 'succeeded')" -lt 1 ]; then - echo "port $PORT is FREE" - return 0 - else - echo "port $PORT is already allocated! cannot continue" + if nc -zv localhost "$PORT" &>/dev/null + then + echo "ERROR: port $PORT is already allocated" >&2 return 1 + else + echo "DEBUG: port $PORT is available" + return 0 fi } BASEDIR="$(cd "$(dirname "${0}")" && pwd)" -REPOROOT="$(cd "${BASEDIR}/../../.." && pwd)" +REPOROOT="$(cd "${BASEDIR}/../.." && pwd)" cd "${REPOROOT}" : "${ZIGGY_UID:=$(id -u)}" @@ -58,8 +59,8 @@ done export GOOS="linux" os="$(go env GOOS)" arch="$(go env GOARCH)" -mkdir -p ./release/$arch/$os -go build -o ./release/$arch/$os ./... +mkdir -p "./release/$arch/$os" +go build -o "./release/$arch/$os" ./... ZITI_CLI_IMAGE="ziti-cli" ZITI_CLI_TAG="local" From 5cde236c6eaedb8585379a57c166626b5afa8ffa Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 22 Aug 2024 21:25:10 -0400 Subject: [PATCH 3/8] add test for linux deployments --- .github/workflows/test-deployments.yml | 185 +++++++++++++++++++++++ dist/dist-packages/linux/linux.test.bash | 165 ++++++++++++++++++++ 2 files changed, 350 insertions(+) create mode 100755 dist/dist-packages/linux/linux.test.bash diff --git a/.github/workflows/test-deployments.yml b/.github/workflows/test-deployments.yml index b5c964853..46cb348f0 100644 --- a/.github/workflows/test-deployments.yml +++ b/.github/workflows/test-deployments.yml @@ -13,7 +13,192 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} cancel-in-progress: true +env: + ZITI_PWD: ziggypw + ZITI_CTRL_ADVERTISED_ADDRESS: linux-controller.127.21.71.0.sslip.io + ZITI_CTRL_ADVERTISED_PORT: 12800 + ZITI_ROUTER_ADVERTISED_ADDRESS: linux-router.127.21.71.0.sslip.io + ZITI_ROUTER_PORT: 30222 + ZITI_ROUTER_NAME: linux-router + NFPM_VERSION: "2.38.0" + I_AM_ROBOT: 1 + jobs: + build-linux-packages: + name: Build ${{ matrix.package_name }} ${{ matrix.arch.gox }} ${{ matrix.packager }} + runs-on: ubuntu-latest + strategy: + matrix: + package_name: + - openziti + - openziti-controller + - openziti-router + arch: + - goreleaser: amd64 + gox: amd64 + deb: amd64 + rpm: x86_64 + packager: + - rpm + - deb + steps: + - name: Shallow checkout + uses: actions/checkout@v4 + + - name: Install Go + id: setup-go + uses: actions/setup-go@v5 + with: + go-version-file: ./go.mod + + - name: Build ziti executable + shell: bash + run: | + mkdir -pv ${GITHUB_WORKSPACE}/release/ + go build -o ${GITHUB_WORKSPACE}/release/ ${GITHUB_WORKSPACE}/... + + - name: Build Package + id: nfpm + uses: burningalchemist/action-gh-nfpm@eeac96f42da23d091eec0d0088bf05cac0ceb9f3 + with: + nfpm_version: ${{ env.NFPM_VERSION }} + packager: ${{ matrix.packager }} + config: dist/dist-packages/linux/nfpm-${{ matrix.package_name }}.yaml + target: release/ + env: + ZITI_VERSION: 0.0.0 + ZITI_MAINTAINER: "OpenZiti Maintainers " + ZITI_HOMEPAGE: "https://openziti.io" + ZITI_VENDOR: "NetFoundry, Inc." + GOARCH: ${{ matrix.arch.goreleaser }} + MINIMUM_SYSTEMD_VERSION: 232 + + - name: Upload Package to Build Summary + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.package_name }}-${{ matrix.arch.gox }}-${{ matrix.packager }} + path: ./release/${{ matrix.package_name }}*.${{ matrix.packager }} + if-no-files-found: error + + dry-run-linux-packages: + needs: build-linux-packages + name: Dry Run ${{ format('{0}:{1}', matrix.distro.name, matrix.distro.version) }} ${{ matrix.arch.gox }} + runs-on: ubuntu-latest + # iterate over an assortment of popular distribution images + container: + image: docker.io/library/${{ format('{0}:{1}', matrix.distro.name, matrix.distro.version) }} + options: --user 0:0 + strategy: + matrix: + distro: + - name: ubuntu + version: "24.04" + org: + type: deb + - name: ubuntu + version: "22.04" + type: deb + - name: ubuntu + version: "20.04" + type: deb + - name: fedora + version: "35" + type: rpm + - name: rockylinux + version: "9" + type: rpm + arch: + - goreleaser: amd64 + gox: amd64 + deb: amd64 + rpm: x86_64 + steps: + - name: Download Linux Release Artifacts + uses: actions/download-artifact@v4 + with: + pattern: "*-${{ matrix.arch.gox }}-${{ matrix.distro.type }}" + merge-multiple: true + path: release/ + + - name: Install Packages + shell: bash + run: | + set -x + ls -lR ./release/ + case "${{ matrix.distro.type }}" in + rpm) + dnf makecache --refresh + dnf install -y systemd # install as impotent dep (not PID 1) + dnf install -y ./release/openziti-${ZITI_VERSION}*.${{ matrix.distro.type }} # install CLI + dnf install -y ./release/openziti-*-${ZITI_VERSION}*.${{ matrix.distro.type }} # install controller, router + ;; + deb) + apt-get update + apt-get install -y systemd # install as impotent dep (not PID 1) + dpkg --install ./release/openziti_*.${{ matrix.distro.type }} # install CLI + dpkg --install ./release/openziti-*.${{ matrix.distro.type }} # install controller, router + ;; + esac + + - name: Bootstrapping - Dry Run + shell: bash + env: + DEBUG: 1 + run: | + set -x + /opt/openziti/etc/controller/bootstrap.bash <> $GITHUB_PATH + mkdir -p ~/.local/bin + wget -qO- https://github.com/goreleaser/nfpm/releases/download/v${{ env.NFPM_VERSION }}/nfpm_${{ env.NFPM_VERSION }}_Linux_x86_64.tar.gz | tar --directory ~/.local/bin -xz nfpm + nfpm --version + + - name: Bootstrap & Run + shell: bash + run: ./dist/dist-packages/linux/linux.test.bash + + - name: Debug Info + if: always() + shell: bash + run: | + set -x +e + sudo ss -lntp | grep -E ":(${ZITI_CTRL_ADVERTISED_PORT}|${ZITI_ROUTER_PORT})" + sudo journalctl --no-pager -o cat -u ziti-controller.service + sudo journalctl --no-pager -o cat -u ziti-router.service + cat /opt/openziti/etc/**/*.env /tmp/${ZITI_ROUTER_NAME}.jwt + docker-deployments: name: Test the Docker Deployments runs-on: ubuntu-latest diff --git a/dist/dist-packages/linux/linux.test.bash b/dist/dist-packages/linux/linux.test.bash new file mode 100755 index 000000000..3c14a9159 --- /dev/null +++ b/dist/dist-packages/linux/linux.test.bash @@ -0,0 +1,165 @@ +#!/usr/bin/env bash + +# exec this script with BASH v4+ on Linux to test the checked-out ziti repo's Linux controller and router deployments + +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace + +cleanup(){ + if ! (( I_AM_ROBOT )) + then + echo "WARNING: destroying all controller and router state files in 30s; set I_AM_ROBOT=1 to suppress this message" >&2 + sleep 30 + fi + for SVC in ziti-{router,controller}.service + do + (set +e + sudo systemctl stop "${SVC}" + sudo systemctl disable --now "${SVC}" + sudo systemctl reset-failed "${SVC}" + sudo systemctl clean --what=state "${SVC}" + )||true + done + for ETC in router controller + do + (set +e + sudo apt-get remove --yes --purge "openziti-${ETC}" + if [[ -d /opt/openziti/etc/${ETC} ]] + then + sudo rm -r "/opt/openziti/etc/${ETC}" + fi + )||true + done +} + +portcheck(){ + PORT="${1}" + if nc -zv localhost "$PORT" &>/dev/null + then + echo "ERROR: port $PORT is already allocated" >&2 + return 1 + else + echo "DEBUG: port $PORT is available" + return 0 + fi +} + +BASEDIR="$(cd "$(dirname "${0}")" && pwd)" +REPOROOT="$(cd "${BASEDIR}/../../.." && pwd)" +cd "${REPOROOT}" + +: "${I_AM_ROBOT:=0}" +: "${ZITI_GO_VERSION:=$(grep -E '^go \d+\.\d*' "./go.mod" | cut -d " " -f2)}" +: "${ZITI_PWD:=ziggypw}" +: "${TMPDIR:=$(mktemp -d)}" +: "${ZITI_CTRL_ADVERTISED_ADDRESS:="ctrl1.127.0.0.1.sslip.io"}" +: "${ZITI_CTRL_ADVERTISED_PORT:="12801"}" +: "${ZITI_ROUTER_PORT:="30223"}" +: "${ZITI_ROUTER_NAME:="linux-router1"}" +: "${ZITI_ROUTER_ADVERTISED_ADDRESS:="${ZITI_ROUTER_NAME}.127.0.0.1.sslip.io"}" +: "${ZITI_ENROLL_TOKEN:="${TMPDIR}/${ZITI_ROUTER_NAME}.jwt"}" + +export \ +ZITI_GO_VERSION \ +ZITI_PWD \ +ZITI_CTRL_ADVERTISED_ADDRESS \ +ZITI_CTRL_ADVERTISED_PORT \ +ZITI_ROUTER_PORT \ +ZITI_ROUTER_NAME \ +ZITI_ROUTER_ADVERTISED_ADDRESS \ +ZITI_ENROLL_TOKEN + +cleanup + +for PORT in "${ZITI_CTRL_ADVERTISED_PORT}" "${ZITI_ROUTER_PORT}" +do + portcheck "${PORT}" +done + +# build ziti in the ./release dir where nfpm will look for it to build the package +mkdir -p ./release +go build -o ./release/ ./... + +for PKG in openziti{,-controller,-router} +do + ZITI_HOMEPAGE="https://openziti.io" \ + ZITI_VENDOR="netfoundry" \ + ZITI_MAINTAINER="Maintainers " \ + MINIMUM_SYSTEMD_VERSION="232" \ + nfpm pkg \ + --packager deb \ + --target "$TMPDIR" \ + --config "./dist/dist-packages/linux/nfpm-${PKG}.yaml" +done + +sudo dpkg --install "${TMPDIR}/openziti_"*.deb +sudo dpkg --install "${TMPDIR}/openziti-"{controller,router}_*.deb + +DEBUG=1 \ +ZITI_ENROLL_TOKEN=/tmp/${ZITI_ROUTER_NAME}.jwt \ +sudo /opt/openziti/etc/controller/bootstrap.bash << CTRL +ZITI_CTRL_ADVERTISED_ADDRESS="${ZITI_CTRL_ADVERTISED_ADDRESS}" +ZITI_CTRL_ADVERTISED_PORT="${ZITI_CTRL_ADVERTISED_PORT}" +ZITI_USER="admin" +ZITI_PWD="${ZITI_PWD}" +CTRL + +sudo systemctl start ziti-controller.service +sudo systemd-run \ +--wait --quiet \ +--service-type=oneshot \ +--property=TimeoutStartSec=20s \ +systemctl is-active ziti-controller.service + +# shellcheck disable=SC2140 +login_cmd="ziti edge login ${ZITI_CTRL_ADVERTISED_ADDRESS}:${ZITI_CTRL_ADVERTISED_PORT}"\ +" --yes"\ +" --username admin"\ +" --password ${ZITI_PWD}" +ATTEMPTS=10 +DELAY=3 +until ! ((ATTEMPTS)) || ${login_cmd} +do + (( ATTEMPTS-- )) + echo "Waiting for controller login" + sleep ${DELAY} +done +ziti edge create edge-router "${ZITI_ROUTER_NAME}" -to "${ZITI_ENROLL_TOKEN}" + +sudo /opt/openziti/etc/router/bootstrap.bash << ROUTER +ZITI_CTRL_ADVERTISED_ADDRESS="${ZITI_CTRL_ADVERTISED_ADDRESS}" +ZITI_CTRL_ADVERTISED_PORT="${ZITI_CTRL_ADVERTISED_PORT}" +ZITI_ROUTER_ADVERTISED_ADDRESS="${ZITI_ROUTER_ADVERTISED_ADDRESS}" +ZITI_ROUTER_PORT="${ZITI_ROUTER_PORT}" +ZITI_ENROLL_TOKEN="${ZITI_ENROLL_TOKEN}" +ROUTER +sudo systemctl start ziti-router.service +sudo systemd-run \ +--wait --quiet \ +--service-type=oneshot \ +--property=TimeoutStartSec=20s \ +systemctl is-active ziti-router.service + +ATTEMPTS=10 +DELAY=3 +until ! ((ATTEMPTS)) || [[ $(ziti edge list edge-routers -j | jq '.data[0].isOnline') == "true" ]] +do + (( ATTEMPTS-- )) + echo "INFO: waiting for router to be online" + sleep ${DELAY} +done +if [[ $(ziti edge list edge-routers -j | jq '.data[0].isOnline') == "true" ]] +then + echo "INFO: router is online" +else + echo "INFO: router is offline" + exit 1 +fi + +ZITI_CTRL_EDGE_ADVERTISED_ADDRESS=${ZITI_CTRL_ADVERTISED_ADDRESS} \ +ZITI_CTRL_EDGE_ADVERTISED_PORT=${ZITI_CTRL_ADVERTISED_PORT} \ +go test -v -count=1 -tags="quickstart manual" ./ziti/cmd/edge/... + +cleanup From 97df56346c8839278992c2332aebcbea78fda17f Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 22 Aug 2024 21:51:01 -0400 Subject: [PATCH 4/8] always exit 0 when printing debug info --- .github/workflows/test-deployments.yml | 4 +++- .github/workflows/test-quickstart.yml | 1 + dist/dist-packages/linux/linux.test.bash | 1 + dist/docker-images/compose.test.bash | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-deployments.yml b/.github/workflows/test-deployments.yml index 46cb348f0..ad50648a1 100644 --- a/.github/workflows/test-deployments.yml +++ b/.github/workflows/test-deployments.yml @@ -193,11 +193,13 @@ jobs: if: always() shell: bash run: | - set -x +e + set -x + set +e sudo ss -lntp | grep -E ":(${ZITI_CTRL_ADVERTISED_PORT}|${ZITI_ROUTER_PORT})" sudo journalctl --no-pager -o cat -u ziti-controller.service sudo journalctl --no-pager -o cat -u ziti-router.service cat /opt/openziti/etc/**/*.env /tmp/${ZITI_ROUTER_NAME}.jwt + exit 0 docker-deployments: name: Test the Docker Deployments diff --git a/.github/workflows/test-quickstart.yml b/.github/workflows/test-quickstart.yml index 023c59f13..758f03fde 100644 --- a/.github/workflows/test-quickstart.yml +++ b/.github/workflows/test-quickstart.yml @@ -85,3 +85,4 @@ jobs: id runner ls -lAn ${GOCACHE:-${HOME}/.cache/go-build}/ ${GOPATH:-${HOME}/go}/pkg/mod/ docker compose --profile test logs + exit 0 diff --git a/dist/dist-packages/linux/linux.test.bash b/dist/dist-packages/linux/linux.test.bash index 3c14a9159..97b243a36 100755 --- a/dist/dist-packages/linux/linux.test.bash +++ b/dist/dist-packages/linux/linux.test.bash @@ -32,6 +32,7 @@ cleanup(){ fi )||true done + echo "DEBUG: cleanup complete" } portcheck(){ diff --git a/dist/docker-images/compose.test.bash b/dist/docker-images/compose.test.bash index 493f164d8..511574512 100755 --- a/dist/docker-images/compose.test.bash +++ b/dist/docker-images/compose.test.bash @@ -9,6 +9,7 @@ set -o xtrace cleanup(){ docker compose --profile test down --volumes --remove-orphans + echo "DEBUG: cleanup complete" } portcheck(){ From 5cfcc6e53c9a51d6753533f5ee85a9c3faa66f94 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 22 Aug 2024 22:13:00 -0400 Subject: [PATCH 5/8] run Debian install/run test in parallel --- .github/workflows/test-deployments.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-deployments.yml b/.github/workflows/test-deployments.yml index ad50648a1..a775bfe36 100644 --- a/.github/workflows/test-deployments.yml +++ b/.github/workflows/test-deployments.yml @@ -164,8 +164,7 @@ jobs: ROUTER test-linux-services: - needs: dry-run-linux-packages - name: Test Linux Services + name: Test Debian Linux Services runs-on: ubuntu-latest steps: - name: Shallow checkout @@ -202,7 +201,7 @@ jobs: exit 0 docker-deployments: - name: Test the Docker Deployments + name: Test Docker Deployments runs-on: ubuntu-latest env: ZIGGY_UID: 1001 # let container EUID run-as GHA "runner" user to share cache, etc. From 09c5f88ae41371406bff1187754f62dce8df8bd3 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Fri, 23 Aug 2024 07:26:49 -0400 Subject: [PATCH 6/8] organize env vars --- .github/workflows/test-deployments.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-deployments.yml b/.github/workflows/test-deployments.yml index a775bfe36..51d63c082 100644 --- a/.github/workflows/test-deployments.yml +++ b/.github/workflows/test-deployments.yml @@ -14,14 +14,7 @@ concurrency: cancel-in-progress: true env: - ZITI_PWD: ziggypw - ZITI_CTRL_ADVERTISED_ADDRESS: linux-controller.127.21.71.0.sslip.io - ZITI_CTRL_ADVERTISED_PORT: 12800 - ZITI_ROUTER_ADVERTISED_ADDRESS: linux-router.127.21.71.0.sslip.io - ZITI_ROUTER_PORT: 30222 - ZITI_ROUTER_NAME: linux-router NFPM_VERSION: "2.38.0" - I_AM_ROBOT: 1 jobs: build-linux-packages: @@ -84,6 +77,13 @@ jobs: needs: build-linux-packages name: Dry Run ${{ format('{0}:{1}', matrix.distro.name, matrix.distro.version) }} ${{ matrix.arch.gox }} runs-on: ubuntu-latest + env: + ZITI_PWD: ziggypw + ZITI_CTRL_ADVERTISED_ADDRESS: linux-controller.127.21.71.0.sslip.io + ZITI_CTRL_ADVERTISED_PORT: 12800 + ZITI_ROUTER_ADVERTISED_ADDRESS: linux-router.127.21.71.0.sslip.io + ZITI_ROUTER_PORT: 30222 + ZITI_ROUTER_NAME: linux-router # iterate over an assortment of popular distribution images container: image: docker.io/library/${{ format('{0}:{1}', matrix.distro.name, matrix.distro.version) }} @@ -186,6 +186,8 @@ jobs: - name: Bootstrap & Run shell: bash + env: + I_AM_ROBOT: 1 # let CI runner skip destructive script warning run: ./dist/dist-packages/linux/linux.test.bash - name: Debug Info From 61eb740b00ee06e2824ddce05d147adc12e8319b Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Fri, 23 Aug 2024 07:39:49 -0400 Subject: [PATCH 7/8] add supported fedora major releases to linux package test matrix --- .github/workflows/test-deployments.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test-deployments.yml b/.github/workflows/test-deployments.yml index 51d63c082..8f7eea41d 100644 --- a/.github/workflows/test-deployments.yml +++ b/.github/workflows/test-deployments.yml @@ -101,6 +101,18 @@ jobs: - name: ubuntu version: "20.04" type: deb + - name: fedora + version: "39" + type: rpm + - name: fedora + version: "38" + type: rpm + - name: fedora + version: "37" + type: rpm + - name: fedora + version: "36" + type: rpm - name: fedora version: "35" type: rpm From 8849cd64725e0b54150a7c99eda666b712ae8bb7 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Fri, 23 Aug 2024 09:35:26 -0400 Subject: [PATCH 8/8] stop adding a comma to Netfoundry Inc --- .github/workflows/publish-linux-packages.yml | 2 +- .github/workflows/test-deployments.yml | 2 +- .../linux/systemd/etc/systemd/system/ziti-tunnel.service | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-linux-packages.yml b/.github/workflows/publish-linux-packages.yml index 4708d0d28..803cbd838 100644 --- a/.github/workflows/publish-linux-packages.yml +++ b/.github/workflows/publish-linux-packages.yml @@ -40,7 +40,7 @@ jobs: ZITI_VERSION: ${{ inputs.ziti-version || github.event.inputs.ziti-version }} ZITI_MAINTAINER: "OpenZiti Maintainers " ZITI_HOMEPAGE: "https://openziti.io" - ZITI_VENDOR: "NetFoundry, Inc." + ZITI_VENDOR: "NetFoundry Inc." GOARCH: ${{ matrix.arch.goreleaser }} MINIMUM_SYSTEMD_VERSION: 232 ZITI_DEB_TEST_REPO: ${{ vars.ZITI_DEB_TEST_REPO || 'zitipax-openziti-deb-test' }} diff --git a/.github/workflows/test-deployments.yml b/.github/workflows/test-deployments.yml index 8f7eea41d..2132716e6 100644 --- a/.github/workflows/test-deployments.yml +++ b/.github/workflows/test-deployments.yml @@ -62,7 +62,7 @@ jobs: ZITI_VERSION: 0.0.0 ZITI_MAINTAINER: "OpenZiti Maintainers " ZITI_HOMEPAGE: "https://openziti.io" - ZITI_VENDOR: "NetFoundry, Inc." + ZITI_VENDOR: "NetFoundry Inc." GOARCH: ${{ matrix.arch.goreleaser }} MINIMUM_SYSTEMD_VERSION: 232 diff --git a/ziti-tunnel/deployment/linux/systemd/etc/systemd/system/ziti-tunnel.service b/ziti-tunnel/deployment/linux/systemd/etc/systemd/system/ziti-tunnel.service index 127fa47b3..5f029c522 100644 --- a/ziti-tunnel/deployment/linux/systemd/etc/systemd/system/ziti-tunnel.service +++ b/ziti-tunnel/deployment/linux/systemd/etc/systemd/system/ziti-tunnel.service @@ -1,4 +1,4 @@ -# Copyright (c) 2017-2019 NetFoundry, Inc. +# Copyright (c) 2017-2019 NetFoundry Inc. # All rights reserved. # https://netfoundry.io