From ee8090717d959a64dc0c130694d87d3dd5d8bb12 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Fri, 21 Feb 2025 14:49:10 -0500 Subject: [PATCH] Remove dw-cnpg and analytics-cnpg (#93) The former ceased to be used sometime after bd378b1 merged its installation of the Tembo fork of `parquet_s3_fdw` to the latter. And now, with the removal of `pg_tier` from stacks (tembo/tembo#1160), the Analytics stack is no longer needed, either. --- .../actions/build-and-push-to-quay/action.yml | 6 +- .github/workflows/build_tembo_pg_slim.yaml | 133 ------------------ analytics-cnpg/Cargo.toml | 16 --- analytics-cnpg/Dockerfile | 51 ------- dw-cnpg/Cargo.toml | 16 --- dw-cnpg/Dockerfile | 53 ------- 6 files changed, 3 insertions(+), 272 deletions(-) delete mode 100644 analytics-cnpg/Cargo.toml delete mode 100644 analytics-cnpg/Dockerfile delete mode 100644 dw-cnpg/Cargo.toml delete mode 100644 dw-cnpg/Dockerfile diff --git a/.github/actions/build-and-push-to-quay/action.yml b/.github/actions/build-and-push-to-quay/action.yml index 79b78cc..d2f5da8 100644 --- a/.github/actions/build-and-push-to-quay/action.yml +++ b/.github/actions/build-and-push-to-quay/action.yml @@ -161,17 +161,17 @@ runs: docker push ${{ inputs.registry_tembo}}/${{ inputs.image_name }}:$tag done - name: Configure AWS credentials for ECR - if: inputs.image_name == 'standard-cnpg' || inputs.image_name == 'ml-cnpg' || inputs.image_name == 'dw-cnpg' || inputs.image_name == 'geo-cnpg' || inputs.image_name == 'analytics-cnpg' + if: inputs.image_name == 'standard-cnpg' || inputs.image_name == 'ml-cnpg' || inputs.image_name == 'geo-cnpg' uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ inputs.gha_iam_role }} role-session-name: images-gha-docker-build-and-push aws-region: ${{ inputs.aws_region }} - name: Install awscli - if: inputs.image_name == 'standard-cnpg' || inputs.image_name == 'ml-cnpg' || inputs.image_name == 'dw-cnpg' || inputs.image_name == 'geo-cnpg' || inputs.image_name == 'analytics-cnpg' + if: inputs.image_name == 'standard-cnpg' || inputs.image_name == 'ml-cnpg' || inputs.image_name == 'geo-cnpg' uses: unfor19/install-aws-cli-action@v1 - name: Push to ECR - if: inputs.image_name == 'standard-cnpg' || inputs.image_name == 'ml-cnpg' || inputs.image_name == 'dw-cnpg' || inputs.image_name == 'geo-cnpg' || inputs.image_name == 'analytics-cnpg' + if: inputs.image_name == 'standard-cnpg' || inputs.image_name == 'ml-cnpg' || inputs.image_name == 'geo-cnpg' shell: bash run: | set -xe diff --git a/.github/workflows/build_tembo_pg_slim.yaml b/.github/workflows/build_tembo_pg_slim.yaml index 5068af2..0fdc09e 100644 --- a/.github/workflows/build_tembo_pg_slim.yaml +++ b/.github/workflows/build_tembo_pg_slim.yaml @@ -8,10 +8,8 @@ on: - 'tembo-pg-slim/**' - 'standard-cnpg/**' - 'tembo-pg-cnpg/**' - - 'dw-cnpg/**' - 'ml-cnpg/**' - 'geo-cnpg/**' - - 'analytics-cnpg/**' - .github/workflows/build_tembo_pg_slim.yaml pull_request: branches: @@ -19,10 +17,8 @@ on: paths: - 'tembo-pg-slim/**' - 'standard-cnpg/**' - - 'dw-cnpg/**' - 'ml-cnpg/**' - 'geo-cnpg/**' - - 'analytics-cnpg/**' - .github/workflows/build_tembo_pg_slim.yaml jobs: @@ -259,70 +255,6 @@ jobs: docker push ${{ secrets.ECR_REGISTRY }}/$IMAGE_NAME-$tag done - dw-cnpg-build: - name: 🏢 dw-cnpg 🐘 ${{ matrix.pg_version }} - needs: [pre-build, standard-cnpg-build] - permissions: - id-token: write - contents: read - runs-on: - - self-hosted - - dind - - large-8x8 - strategy: - fail-fast: false - matrix: ${{fromJson(needs.pre-build.outputs.build_matrix)}} - env: - CONTAINER_NAME: "dw-cnpg" - steps: - - uses: actions/checkout@v4 - - name: Build Docker images based on conditions - if: ${{ matrix.pg_version != '17' }} - run: | - IMAGE_NAME=$CONTAINER_NAME:${{ matrix.pg_version }} - docker build ./$CONTAINER_NAME --build-arg PG_VERSION=${{ matrix.pg_version }} --build-arg TAG=${{ needs.pre-build.outputs.short_sha }} -t $IMAGE_NAME - shell: bash - - name: Login to Tembo Quay - if: ${{ matrix.pg_version != '17' }} - uses: docker/login-action@v2 - with: - registry: ${{ secrets.QUAY_REPOSITORY }} - username: ${{ secrets.QUAY_USER_TEMBO }} - password: ${{ secrets.QUAY_PASSWORD_TEMBO }} - - name: Push to Quay - if: ${{ matrix.pg_version != '17' }} - shell: bash - run: | - set -xe - IMAGE_NAME=$CONTAINER_NAME:${{ matrix.pg_version }} - IFS=' ' read -ra TAG_ARRAY <<< "${{ needs.pre-build.outputs.tags }}" - for tag in "${TAG_ARRAY[@]}"; do - docker tag $IMAGE_NAME ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag - docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag - done - - name: Configure AWS credentials for ECR - if: ${{ matrix.pg_version != '17' }} - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.GHA_IAM_ROLE }} - role-session-name: images-gha-docker-build-and-push - aws-region: "us-east-1" - - name: Install awscli - if: ${{ matrix.pg_version != '17' }} - uses: unfor19/install-aws-cli-action@v1 - - name: Push to ECR - shell: bash - if: ${{ matrix.pg_version != '17' }} - run: | - set -xe - IMAGE_NAME=$CONTAINER_NAME:${{ matrix.pg_version }} - IFS=' ' read -ra TAG_ARRAY <<< "${{ needs.pre-build.outputs.tags }}" - for tag in "${TAG_ARRAY[@]}"; do - aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${{ secrets.ECR_REGISTRY }}/$CONTAINER_NAME - docker tag $IMAGE_NAME ${{ secrets.ECR_REGISTRY }}/$IMAGE_NAME-$tag - docker push ${{ secrets.ECR_REGISTRY }}/$IMAGE_NAME-$tag - done - geo-cnpg-build: name: 🌍 geo-cnpg 🐘 ${{ matrix.pg_version }} needs: [pre-build, standard-cnpg-build] @@ -381,71 +313,6 @@ jobs: docker push ${{ secrets.ECR_REGISTRY }}/$IMAGE_NAME-$tag done - analytics-cnpg-build: - name: 📊 analytics-cnpg 🐘 ${{ matrix.pg_version }} - needs: [pre-build, standard-cnpg-build] - permissions: - id-token: write - contents: read - runs-on: - - self-hosted - - dind - - large-8x8 - strategy: - fail-fast: false - matrix: ${{fromJson(needs.pre-build.outputs.build_matrix)}} - env: - CONTAINER_NAME: "analytics-cnpg" - steps: - - uses: actions/checkout@v4 - if: ${{ matrix.pg_version != '17' }} - - name: Build Docker images based on conditions - if: ${{ matrix.pg_version != '17' }} - run: | - IMAGE_NAME=$CONTAINER_NAME:${{ matrix.pg_version }} - docker build ./$CONTAINER_NAME --build-arg PG_VERSION=${{ matrix.pg_version }} --build-arg TAG=${{ needs.pre-build.outputs.short_sha }} -t $IMAGE_NAME - shell: bash - - name: Login to Tembo Quay - if: ${{ matrix.pg_version != '17' }} - uses: docker/login-action@v2 - with: - registry: ${{ secrets.QUAY_REPOSITORY }} - username: ${{ secrets.QUAY_USER_TEMBO }} - password: ${{ secrets.QUAY_PASSWORD_TEMBO }} - - name: Push to Quay - if: ${{ matrix.pg_version != '17' }} - shell: bash - run: | - set -xe - IMAGE_NAME=$CONTAINER_NAME:${{ matrix.pg_version }} - IFS=' ' read -ra TAG_ARRAY <<< "${{ needs.pre-build.outputs.tags }}" - for tag in "${TAG_ARRAY[@]}"; do - docker tag $IMAGE_NAME ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag - docker push ${{ secrets.QUAY_REPOSITORY }}/$IMAGE_NAME-$tag - done - - name: Configure AWS credentials for ECR - if: ${{ matrix.pg_version != '17' }} - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.GHA_IAM_ROLE }} - role-session-name: images-gha-docker-build-and-push - aws-region: "us-east-1" - - name: Install awscli - if: ${{ matrix.pg_version != '17' }} - uses: unfor19/install-aws-cli-action@v1 - - name: Push to ECR - if: ${{ matrix.pg_version != '17' }} - shell: bash - run: | - set -xe - IMAGE_NAME=$CONTAINER_NAME:${{ matrix.pg_version }} - IFS=' ' read -ra TAG_ARRAY <<< "${{ needs.pre-build.outputs.tags }}" - for tag in "${TAG_ARRAY[@]}"; do - aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${{ secrets.ECR_REGISTRY }}/$CONTAINER_NAME - docker tag $IMAGE_NAME ${{ secrets.ECR_REGISTRY }}/$IMAGE_NAME-$tag - docker push ${{ secrets.ECR_REGISTRY }}/$IMAGE_NAME-$tag - done - tembo-pg-cnpg-build: name: ☁️ tembo-pg-cnpg 🐘 ${{ matrix.pg_version }} needs: [pre-build, tembo-pg-slim-build] diff --git a/analytics-cnpg/Cargo.toml b/analytics-cnpg/Cargo.toml deleted file mode 100644 index 1d15431..0000000 --- a/analytics-cnpg/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "analytics-cnpg" -version = "16.4.0-1" -edition = "2021" -authors = ["tembo.io"] -description = "Container image for Tembo's Analytics Stack" -homepage = "https://www.tembo.io" -license = "Apache-2.0" -readme = "README.md" -repository = " https://github.com/tembo-io/tembo-images" -publish = false - - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] diff --git a/analytics-cnpg/Dockerfile b/analytics-cnpg/Dockerfile deleted file mode 100644 index c78a092..0000000 --- a/analytics-cnpg/Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -ARG PG_VERSION=16 -ARG TAG=latest - -FROM quay.io/tembo/standard-cnpg:${PG_VERSION}-${TAG} AS build -USER root -WORKDIR /work - - -# Install build dependencies for parquet_s3_fdw and its dependent libraries -RUN apt-get update && apt-get install -y \ - automake \ - bison \ - build-essential \ - ccache \ - cmake \ - flex \ - git \ - libboost-all-dev \ - libcurl4-openssl-dev \ - libevent-dev \ - libprotobuf-dev \ - libprotoc-dev \ - libreadline-dev \ - libssl-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - libxslt-dev \ - pkg-config \ - protobuf-compiler \ - xsltproc \ - zlib1g-dev - -# Clone and build Tembo's fork of parquet_s3_fdw (required for pg_tier). -RUN git clone https://github.com/tembo-io/tembo_parquet_s3_fdw.git \ - && (cd tembo_parquet_s3_fdw && git checkout v1.1.4) \ - && make -C tembo_parquet_s3_fdw USE_PGXS=1 install DESTDIR="$PWD/target" - -# Copy the files to the final image. -FROM quay.io/tembo/standard-cnpg:${PG_VERSION}-${TAG} -USER root -COPY --from=build /work/target/./ / - -# cache all extensions -RUN set -eux; \ - cp -r $(pg_config --pkglibdir)/* /tmp/pg_pkglibdir; \ - cp -r $(pg_config --sharedir)/* /tmp/pg_sharedir; - -# Revert the postgres user to id 26 -RUN usermod -u 26 postgres -USER 26 diff --git a/dw-cnpg/Cargo.toml b/dw-cnpg/Cargo.toml deleted file mode 100644 index fd92ee8..0000000 --- a/dw-cnpg/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "dw-cnpg" -version = "15.3.0-1" -edition = "2021" -authors = ["tembo.io"] -description = "Container image for Tembo's DW Stack" -homepage = "https://www.tembo.io" -license = "Apache-2.0" -readme = "README.md" -repository = " https://github.com/tembo-io/tembo-images" -publish = false - - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] diff --git a/dw-cnpg/Dockerfile b/dw-cnpg/Dockerfile deleted file mode 100644 index 1231ef8..0000000 --- a/dw-cnpg/Dockerfile +++ /dev/null @@ -1,53 +0,0 @@ -ARG PG_VERSION=15 -ARG TAG=latest - -FROM quay.io/tembo/standard-cnpg:${PG_VERSION}-${TAG} -USER root - -WORKDIR / - -# Install build dependencies for parquet_s3_fdw and its dependent libraries -RUN apt-get update && apt-get install -y \ - automake \ - bison \ - build-essential \ - ccache \ - cmake \ - flex \ - g++ \ - git \ - libboost-all-dev \ - libcurl4-openssl-dev \ - libevent-dev \ - libprotobuf-dev \ - libprotoc-dev \ - libreadline-dev \ - libssl-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - libxslt-dev \ - make \ - pkg-config \ - protobuf-compiler \ - xsltproc \ - zlib1g-dev \ - && rm -rf /var/lib/apt/lists/* - -# Clone and build parquet_s3_fdw -RUN git clone https://github.com/tembo-io/tembo_parquet_s3_fdw.git && \ - cd tembo_parquet_s3_fdw && \ - git checkout v1.1.4 && \ - make USE_PGXS=1 install && \ - cd .. && rm -rf tembo_parquet_s3_fdw - -# cache all extensions -RUN set -eux; \ - cp -r $(pg_config --pkglibdir)/* /tmp/pg_pkglibdir; \ - cp -r $(pg_config --sharedir)/* /tmp/pg_sharedir; - -ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH - -# Revert the postgres user to id 26 -RUN usermod -u 26 postgres -USER 26