From a19d25bb7ad0881cd8de500439cac48fda25b2fa Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Mon, 3 Apr 2023 13:39:04 -0300 Subject: [PATCH 01/12] remove-old-org --- .github/workflows/build-develop.yml | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-develop.yml b/.github/workflows/build-develop.yml index 927acaf5d..ec63dd70d 100644 --- a/.github/workflows/build-develop.yml +++ b/.github/workflows/build-develop.yml @@ -332,8 +332,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + username: ${{ secrets.ORB_DOCKERHUB_USERNAME }} + password: ${{ secrets.ORB_DOCKERHUB_TOKEN }} - name: Replace token run: | @@ -354,7 +354,6 @@ jobs: - name: Build + push - pktvisor (multi-arch) env: - IMAGE_NAME: ns1labs/pktvisor IMAGE_NAME1: orbcommunity/pktvisor IMAGE_NAME2: ghcr.io/orb-community/pktvisor uses: docker/build-push-action@v3 @@ -363,20 +362,17 @@ jobs: context: . file: ./docker/Dockerfile.crashhandler platforms: linux/amd64 - tags: ${{ env.IMAGE_NAME }}:${{ needs.unit-tests-linux.outputs.version_number }} , ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }} , ${{ env.IMAGE_NAME1 }}:${{ needs.unit-tests-linux.outputs.version_number }} , ${{ env.IMAGE_NAME1 }}:${{ env.REF_TAG }} , ${{ env.IMAGE_NAME2 }}:amd64-${{needs.unit-tests-linux.outputs.commit_hash}} + tags: ${{ env.IMAGE_NAME1 }}:${{ needs.unit-tests-linux.outputs.version_number }} , ${{ env.IMAGE_NAME1 }}:${{ env.REF_TAG }} , ${{ env.IMAGE_NAME2 }}:amd64-${{needs.unit-tests-linux.outputs.commit_hash}} outputs: type=docker,dest=/tmp/amd64.tar - name: Load image env: - IMAGE_NAME: ns1labs/pktvisor IMAGE_NAME1: orbcommunity/pktvisor IMAGE_NAME2: ghcr.io/orb-community/pktvisor run: | docker load --input /tmp/amd64.tar docker image ls -a docker push ${{ env.IMAGE_NAME2 }}:amd64-${{needs.unit-tests-linux.outputs.commit_hash}} - docker push ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }} - docker push ${{ env.IMAGE_NAME }}:${{ needs.unit-tests-linux.outputs.version_number }} docker push ${{ env.IMAGE_NAME1 }}:${{ env.REF_TAG }} docker push ${{ env.IMAGE_NAME1 }}:${{ needs.unit-tests-linux.outputs.version_number }} @@ -421,8 +417,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + username: ${{ secrets.ORB_DOCKERHUB_USERNAME }} + password: ${{ secrets.ORB_DOCKERHUB_TOKEN }} - name: Build + push - pktvisor-cli env: @@ -1012,18 +1008,6 @@ jobs: - name: Copy from ghcr.io to docker.io run: | - sudo skopeo copy \ - --all \ - docker://ghcr.io/orb-community/pktvisor:latest-develop \ - docker://docker.io/ns1labs/pktvisor:latest-develop - sudo skopeo copy \ - --all \ - docker://ghcr.io/orb-community/pktvisor:latest-develop \ - docker://docker.io/ns1labs/pktvisor:develop - sudo skopeo copy \ - --all \ - docker://ghcr.io/orb-community/pktvisor:latest-develop \ - docker://docker.io/ns1labs/pktvisor:${{ needs.unit-tests-linux.outputs.version_number }} sudo skopeo copy \ --all \ docker://ghcr.io/orb-community/pktvisor:latest-develop \ From ad5e570e299a70b70d9271dff74ea2e0ece5d6f3 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Mon, 3 Apr 2023 13:43:40 -0300 Subject: [PATCH 02/12] remove old org --- .github/workflows/build-release.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 6059e09ec..828f41a69 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -980,14 +980,10 @@ jobs: - name: Login skopeo to dockerhub run: | - sudo skopeo login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} docker.io + sudo skopeo login -u ${{ secrets.ORB_DOCKERHUB_USERNAME }} -p ${{ secrets.ORB_DOCKERHUB_TOKEN }} docker.io - name: Copy latest from ghcr.io to docker.io run: | - sudo skopeo copy \ - --all \ - docker://ghcr.io/orb-community/pktvisor:latest \ - docker://docker.io/ns1labs/pktvisor:latest sudo skopeo copy \ --all \ docker://ghcr.io/orb-community/pktvisor:latest \ @@ -995,10 +991,6 @@ jobs: - name: Copy release version from ghcr.io to docker.io run: | - sudo skopeo copy \ - --all \ - docker://ghcr.io/orb-community/pktvisor:latest \ - docker://docker.io/ns1labs/pktvisor:${{ needs.package-amd64.outputs.release_version }} sudo skopeo copy \ --all \ docker://ghcr.io/orb-community/pktvisor:latest \ From 380afc4d9c9bbf10d7ae9b4076b85f12f2916ae7 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:14:14 -0300 Subject: [PATCH 03/12] Update Dockerfile --- .github/actions/build-go/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-go/Dockerfile b/.github/actions/build-go/Dockerfile index 9a2f5e5e5..d213b8ace 100644 --- a/.github/actions/build-go/Dockerfile +++ b/.github/actions/build-go/Dockerfile @@ -1,7 +1,7 @@ FROM golang:latest LABEL author="Everton Haise Taques " -LABEL maintainer="NS1 Labs" +LABEL maintainer="netboxlabs" LABEL version="1.0.0" COPY ./entrypoint.sh /entrypoint.sh From bd64691c80f43f8e6fe810deaed1686ac99d1f7e Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:15:37 -0300 Subject: [PATCH 04/12] Update Dockerfile --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 459370e50..44b82b7ad 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -50,8 +50,8 @@ RUN \ #create dir and download geo db RUN mkdir /geo-db -RUN cd /geo-db && wget https://github.com/ns1labs/geo-asn-database/raw/main/asn.mmdb.gz -RUN cd /geo-db && wget https://github.com/ns1labs/geo-asn-database/raw/main/city.mmdb.gz +RUN cd /geo-db && wget https://github.com/orb-community/geo-asn-database/raw/main/asn.mmdb.gz +RUN cd /geo-db && wget https://github.com/orb-community/geo-asn-database/raw/main/city.mmdb.gz RUN mkdir /iana COPY --from=cppbuild /pktvisor-src/src/tests/fixtures/pktvisor-port-service-names.csv /iana/custom-iana.csv From f51c4eba6dcc4d128f42049543f8ebaa66cd70ac Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:17:18 -0300 Subject: [PATCH 05/12] Update entry-cp.sh --- docker/entry-cp.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/entry-cp.sh b/docker/entry-cp.sh index 2e5761179..8c54b33d9 100755 --- a/docker/entry-cp.sh +++ b/docker/entry-cp.sh @@ -14,9 +14,9 @@ trap trapeze SIGINT if [ $# -eq 0 ]; then echo "No arguments provided: specify either 'pktvisor-cli', 'pktvisor-reader' or 'pktvisord'. Try:" - echo "docker run ns1labs/pktvisor pktvisor-cli -h" - echo "docker run ns1labs/pktvisor pktvisor-reader --help" - echo "docker run ns1labs/pktvisor pktvisord --help" + echo "docker run orbcommunity/pktvisor pktvisor-cli -h" + echo "docker run orbcommunity/pktvisor pktvisor-reader --help" + echo "docker run orbcommunity/pktvisor pktvisord --help" exit 1 fi From b9e5bf87dcdfe5b936817a4b7ef04b54fc7f7bc5 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:17:40 -0300 Subject: [PATCH 06/12] Update entry.sh --- docker/entry.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/entry.sh b/docker/entry.sh index b65428857..e6401a2ae 100755 --- a/docker/entry.sh +++ b/docker/entry.sh @@ -7,9 +7,9 @@ export PATH=$PATH:/usr/local/bin/:/usr/local/sbin/ if [ $# -eq 0 ]; then echo "No arguments provided: specify either 'pktvisor-cli', 'pktvisor-reader' or 'pktvisord'. Try:" - echo "docker run ns1labs/pktvisor pktvisor-cli -h" - echo "docker run ns1labs/pktvisor pktvisor-reader --help" - echo "docker run ns1labs/pktvisor pktvisord --help" + echo "docker run orbcommunity/pktvisor pktvisor-cli -h" + echo "docker run orbcommunity/pktvisor pktvisor-reader --help" + echo "docker run orbcommunity/pktvisor pktvisord --help" exit 1 fi From f4db97c246e803cf92cf9ee0051548b6e8863de6 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:19:26 -0300 Subject: [PATCH 07/12] Delete Dockerfile.clang-toolchain --- docker/Dockerfile.clang-toolchain | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 docker/Dockerfile.clang-toolchain diff --git a/docker/Dockerfile.clang-toolchain b/docker/Dockerfile.clang-toolchain deleted file mode 100644 index 61b65fe53..000000000 --- a/docker/Dockerfile.clang-toolchain +++ /dev/null @@ -1,16 +0,0 @@ -FROM ns1labs/clang-toolchain:latest -ARG REQUIRE="make cmake python3 py3-pip perl git bash libexecinfo-static libexecinfo-dev" -ARG UID=1000 - -RUN adduser -u ${UID} -D builder - -RUN apk add --no-cache ${REQUIRE} - -RUN ln -s /usr/local/bin/clang /usr/local/bin/cc \ - && ln -s /usr/local/bin/clang /usr/local/bin/gcc \ - && ln -s /usr/local/bin/clang++ /usr/local/bin/c++ \ - && ln -s /usr/local/bin/clang++ /usr/local/bin/g++ \ - && ln -s /usr/local/bin/clang-cpp /usr/local/bin/cpp \ - && pip install conan - -USER builder From cd6201af1c45a0e14c9721e25a7f4e5aa871be21 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:22:53 -0300 Subject: [PATCH 08/12] Delete Dockerfile.pktvisord-static --- docker/Dockerfile.pktvisord-static | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 docker/Dockerfile.pktvisord-static diff --git a/docker/Dockerfile.pktvisord-static b/docker/Dockerfile.pktvisord-static deleted file mode 100644 index 72637d926..000000000 --- a/docker/Dockerfile.pktvisord-static +++ /dev/null @@ -1,7 +0,0 @@ -FROM ns1labs/static-base AS cppbuild - -FROM scratch AS runtime - -COPY --from=cppbuild /tmp/build/bin/pktvisord /pktvisord - -ENTRYPOINT [ "/pktvisord" ] From 3194a30285e252ccd772e0343c3299c8e0827783 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:23:09 -0300 Subject: [PATCH 09/12] Delete Dockerfile.pktvisor-reader-static --- docker/Dockerfile.pktvisor-reader-static | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 docker/Dockerfile.pktvisor-reader-static diff --git a/docker/Dockerfile.pktvisor-reader-static b/docker/Dockerfile.pktvisor-reader-static deleted file mode 100644 index b1d4ae0b2..000000000 --- a/docker/Dockerfile.pktvisor-reader-static +++ /dev/null @@ -1,7 +0,0 @@ -FROM ns1labs/static-base AS cppbuild - -FROM scratch AS runtime - -COPY --from=cppbuild /tmp/build/bin/pktvisor-reader /pktvisor-reader - -ENTRYPOINT [ "/pktvisor-reader" ] From 28c5da0032b7585755a053ae11c5b25bcf623088 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:24:43 -0300 Subject: [PATCH 10/12] Delete Dockerfile.static-base --- docker/Dockerfile.static-base | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 docker/Dockerfile.static-base diff --git a/docker/Dockerfile.static-base b/docker/Dockerfile.static-base deleted file mode 100644 index de7a909ae..000000000 --- a/docker/Dockerfile.static-base +++ /dev/null @@ -1,31 +0,0 @@ -FROM ns1labs/clang-toolchain:latest AS cppbuild -ARG REQUIRE="make cmake python3 py3-pip perl git bash libexecinfo-static libexecinfo-dev" - -RUN apk add --no-cache ${REQUIRE} - -RUN ln -s /usr/local/bin/clang /usr/local/bin/cc \ - && ln -s /usr/local/bin/clang /usr/local/bin/gcc \ - && ln -s /usr/local/bin/clang++ /usr/local/bin/c++ \ - && ln -s /usr/local/bin/clang++ /usr/local/bin/g++ \ - && ln -s /usr/local/bin/clang-cpp /usr/local/bin/cpp \ - && pip install conan==1.59.0 - -# need git for current hash for VERSION -COPY ./.git/ /pktvisor-src/.git/ -COPY ./src/ /pktvisor-src/src/ -COPY ./cmd/ /pktvisor-src/cmd/ -COPY ./3rd/ /pktvisor-src/3rd/ -COPY ./golang/ /pktvisor-src/golang/ -COPY ./integration_tests/ /pktvisor-src/integration_tests/ -COPY ./cmake/ /pktvisor-src/cmake/ -COPY ./CMakeLists.txt /pktvisor-src/ -COPY ./conanfile.txt /pktvisor-src/ - -WORKDIR /tmp/build - -RUN cmake -DCMAKE_BUILD_TYPE=Release /pktvisor-src \ - && make all test -j 4 - -# after build, use this to upload conan packages to ns1labs jfrog server -# docker run --rm -it ns1labs/static-base -# CONAN_USER_HOME=/tmp/build/conan_home conan upload "*" --all -r ns1labs -c From 2be869eacc757c015a342c147113a227bc03a0d0 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:27:02 -0300 Subject: [PATCH 11/12] Update Dockerfile.crashhandler --- docker/Dockerfile.crashhandler | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile.crashhandler b/docker/Dockerfile.crashhandler index d33f892f0..4295f2088 100644 --- a/docker/Dockerfile.crashhandler +++ b/docker/Dockerfile.crashhandler @@ -18,8 +18,8 @@ COPY ./docker/run.sh /run.sh #create dir and download geo db RUN mkdir /geo-db -RUN cd /geo-db && wget https://github.com/ns1labs/geo-asn-database/raw/main/asn.mmdb.gz -RUN cd /geo-db && wget https://github.com/ns1labs/geo-asn-database/raw/main/city.mmdb.gz +RUN cd /geo-db && wget https://github.com/orb-community/geo-asn-database/raw/main/asn.mmdb.gz +RUN cd /geo-db && wget https://github.com/orb-community/geo-asn-database/raw/main/city.mmdb.gz #create dir and setup iana csv RUN mkdir /iana From 4f85c154b1f973795c409692d8dd84ec377e104a Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:28:36 -0300 Subject: [PATCH 12/12] Update Dockerfile --- .../prometheus/docker-grafana-agent/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centralized_collection/prometheus/docker-grafana-agent/Dockerfile b/centralized_collection/prometheus/docker-grafana-agent/Dockerfile index 9dae75965..59435f097 100644 --- a/centralized_collection/prometheus/docker-grafana-agent/Dockerfile +++ b/centralized_collection/prometheus/docker-grafana-agent/Dockerfile @@ -1,7 +1,7 @@ ARG PKTVISOR_TAG=latest FROM grafana/agent:latest as agent -FROM ns1labs/pktvisor:${PKTVISOR_TAG} +FROM orbcommunity/pktvisor:${PKTVISOR_TAG} COPY --from=agent /bin/agent /usr/local/bin/agent