From e7d8f31c52de38a71d4245e7d3ff72d93266cce1 Mon Sep 17 00:00:00 2001 From: EliseCastle23 <109446148+EliseCastle23@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:54:05 -0700 Subject: [PATCH] removing old squid file from cloud auto as it now lives in "base_images" repo" (#2675) --- .github/workflows/image_build_push_squid.yaml | 23 ------- Docker/squid/Dockerfile | 62 ------------------- Docker/squid/ERR_ACCESS_DENIED | 36 ----------- Docker/squid/certfix.sh | 6 -- Docker/squid/entrypoint.sh | 45 -------------- flavors/squid_auto/squid_running_on_docker.sh | 4 +- 6 files changed, 2 insertions(+), 174 deletions(-) delete mode 100644 .github/workflows/image_build_push_squid.yaml delete mode 100644 Docker/squid/Dockerfile delete mode 100644 Docker/squid/ERR_ACCESS_DENIED delete mode 100644 Docker/squid/certfix.sh delete mode 100644 Docker/squid/entrypoint.sh diff --git a/.github/workflows/image_build_push_squid.yaml b/.github/workflows/image_build_push_squid.yaml deleted file mode 100644 index 0645fb8b23..0000000000 --- a/.github/workflows/image_build_push_squid.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Build Squid images - -on: - workflow_dispatch: - push: - paths: - - .github/workflows/image_build_push_squid.yaml - - Docker/squid/** - -jobs: - squid: - name: Squid image - uses: uc-cdis/.github/.github/workflows/image_build_push.yaml@master - with: - DOCKERFILE_LOCATION: "./Docker/squid/Dockerfile" - DOCKERFILE_BUILD_CONTEXT: "./Docker/squid" - OVERRIDE_REPO_NAME: "squid" - USE_QUAY_ONLY: true - secrets: - ECR_AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }} - ECR_AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }} - QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} - QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }} diff --git a/Docker/squid/Dockerfile b/Docker/squid/Dockerfile deleted file mode 100644 index 90b7389020..0000000000 --- a/Docker/squid/Dockerfile +++ /dev/null @@ -1,62 +0,0 @@ -FROM quay.io/cdis/ubuntu:18.04 - -ENV SQUID_VERSION="squid-5.1" \ - SQUID_DOWNLOAD_URL="http://www.squid-cache.org/Versions/v5/" \ - SQUID_USER="proxy" \ - SQUID_CACHE_DIR="/var/cache/squid" \ - SQUID_LOG_DIR="/var/log/squid" \ - SQUID_SYSCONFIG_DIR="/etc/squid" \ - SQUID_PID_DIR="/var/run/squid" \ - CFLAGS="-Os" \ - CXXFLAGS="-Os" - - -RUN apt update \ - && apt install -y build-essential wget libssl1.0-dev - -COPY ./entrypoint.sh /usr/sbin/entrypoint.sh -COPY ./certfix.sh /certfix.sh - -RUN chmod +x /usr/sbin/entrypoint.sh -RUN chmod +x /certfix.sh -RUN bash /certfix.sh - -RUN (cd /tmp \ - && wget ${SQUID_DOWNLOAD_URL}${SQUID_VERSION}.tar.xz \ - && tar -xJf ${SQUID_VERSION}.tar.xz \ - && sed -i 's/if (rawPid <= 1)/if (rawPid < 1)/' ${SQUID_VERSION}/src/Instance.cc \ - && mkdir squid-build \ - && cd squid-build \ - && ../${SQUID_VERSION}/configure \ - --prefix=/usr \ - --exec-prefix=/usr \ - --sysconfdir=${SQUID_SYSCONFIG_DIR} \ - --sharedstatedir=/var/lib \ - --localstatedir=/var \ - --datadir=/usr/share/squid \ - --with-logdir=${SQUID_LOG_DIR} \ - --with-pidfile=${SQUID_PID_DIR}/squid.pid \ - --with-default-user=${SQUID_USER} \ - --enable-linux-netfilter \ - --with-openssl \ - --without-nettle \ - --disable-arch-native \ - && make \ - && make install) - -RUN (cd /tmp \ - && rm ${SQUID_VERSION}.tar.xz \ - && rm -rf ${SQUID_VERSION} squid-build) - -COPY ./ERR_ACCESS_DENIED /usr/share/squid/errors/templates/ERR_ACCESS_DENIED - -RUN mkdir -p ${SQUID_LOG_DIR} ${SQUID_CACHE_DIR} \ - && chown -R ${SQUID_USER}. ${SQUID_LOG_DIR} ${SQUID_CACHE_DIR} - -EXPOSE 3128/tcp -EXPOSE 3129/tcp -EXPOSE 3130/tcp - -VOLUME ${SQUID_LOG_DIR} ${SQUID_CACHE_DIR} ${SQUID_PID_DIR} ${SQUID_SYSCONFIG_DIR} - -ENTRYPOINT ["/usr/sbin/entrypoint.sh"] diff --git a/Docker/squid/ERR_ACCESS_DENIED b/Docker/squid/ERR_ACCESS_DENIED deleted file mode 100644 index 4189c3d630..0000000000 --- a/Docker/squid/ERR_ACCESS_DENIED +++ /dev/null @@ -1,36 +0,0 @@ - - - - -ERROR: The requested URL could not be retrieved - - -
-

ERROR

-

The requested URL could not be retrieved

-
-
- -
-

The following error was encountered while trying to retrieve the URL: %U

- -
-

Access Denied.

-
- -

Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.

- -
-
- -
- - - diff --git a/Docker/squid/certfix.sh b/Docker/squid/certfix.sh deleted file mode 100644 index 87dfef66ca..0000000000 --- a/Docker/squid/certfix.sh +++ /dev/null @@ -1,6 +0,0 @@ -#/bin/bash - -if [[ -z $(cat /etc/ca-certificates.conf | grep '!mozilla/DST_Root_CA_X3.crt') ]] && [[ ! -z $(cat /etc/ca-certificates.conf | grep 'mozilla/DST_Root_CA_X3.crt') ]]; then - echo /etc/ca-certificates.conf | xargs sed -i 's/mozilla\/DST_Root_CA_X3.crt/!mozilla\/DST_Root_CA_X3.crt/g' - update-ca-certificates -fi diff --git a/Docker/squid/entrypoint.sh b/Docker/squid/entrypoint.sh deleted file mode 100644 index 3a9c89b6b0..0000000000 --- a/Docker/squid/entrypoint.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -set -e - -create_log_dir() { - mkdir -p ${SQUID_LOG_DIR} - chmod -R 755 ${SQUID_LOG_DIR} - chown -R ${SQUID_USER}:${SQUID_USER} ${SQUID_LOG_DIR} -} - -create_cache_dir() { - mkdir -p ${SQUID_CACHE_DIR} - chown -R ${SQUID_USER}:${SQUID_USER} ${SQUID_CACHE_DIR} -} - -apply_backward_compatibility_fixes() { - if [[ -f ${SQUID_SYSCONFIG_DIR}/squid.user.conf ]]; then - rm -rf ${SQUID_SYSCONFIG_DIR}/squid.conf - ln -sf ${SQUID_SYSCONFIG_DIR}/squid.user.conf ${SQUID_SYSCONFIG_DIR}/squid.conf - fi -} - -create_log_dir -create_cache_dir -apply_backward_compatibility_fixes - -# allow arguments to be passed to squid -if [[ ${1:0:1} = '-' ]]; then - EXTRA_ARGS="$@" - set -- -elif [[ ${1} == squid || ${1} == $(which squid) ]]; then - EXTRA_ARGS="${@:2}" - set -- -fi - -# default behaviour is to launch squid -if [[ -z ${1} ]]; then - if [[ ! -d ${SQUID_CACHE_DIR}/00 ]]; then - echo "Initializing cache..." - $(which squid) -N -f ${SQUID_SYSCONFIG_DIR}/squid.conf -z - fi - echo "Starting squid..." - exec $(which squid) -f ${SQUID_SYSCONFIG_DIR}/squid.conf -NYCd 1 ${EXTRA_ARGS} -else - exec "$@" -fi diff --git a/flavors/squid_auto/squid_running_on_docker.sh b/flavors/squid_auto/squid_running_on_docker.sh index 836ceb01fd..812a9f7387 100644 --- a/flavors/squid_auto/squid_running_on_docker.sh +++ b/flavors/squid_auto/squid_running_on_docker.sh @@ -166,7 +166,7 @@ $(command -v docker) run --name squid --network=host -d \ --volume ${SQUID_PID_DIR}:${SQUID_PID_DIR} \ --volume ${SQUID_CACHE_DIR}:${SQUID_CACHE_DIR} \ --volume ${SQUID_CONFIG_DIR}:${SQUID_CONFIG_DIR}:ro \ - quay.io/cdis/squid-al:${SQUID_IMAGE_TAG} + quay.io/cdis/squid:${SQUID_IMAGE_TAG} exit 0 EOF @@ -306,7 +306,7 @@ function main(){ --volume ${SQUID_PID_DIR}:${SQUID_PID_DIR} \ --volume ${SQUID_CACHE_DIR}:${SQUID_CACHE_DIR} \ --volume ${SQUID_CONFIG_DIR}:${SQUID_CONFIG_DIR}:ro \ - quay.io/cdis/squid-al:${SQUID_IMAGE_TAG} + quay.io/cdis/squid:${SQUID_IMAGE_TAG} max_attempts=10 attempt_counter=0