chore(backport): use HashiCorp Docker mirror (#9167)

* chore: backport Docker mirror for Envoy integration tests

* use hashicorp docker mirror in envoy helper (#9080)

* use hashicorp docker mirror to prevent rate limit (#9070)

Co-authored-by: R.B. Boyer <rb@hashicorp.com>
Co-authored-by: Alvin Huang <17609145+alvin-huang@users.noreply.github.com>
This commit is contained in:
Mike Morris 2020-11-11 18:31:40 -05:00 committed by GitHub
parent 0c2eea2918
commit 7df79f0988
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 44 additions and 44 deletions

View File

@ -382,7 +382,7 @@ jobs:
# upload dev docker image # upload dev docker image
dev-upload-docker: dev-upload-docker:
docker: docker:
- image: circleci/golang:latest # use a circleci image so the attach_workspace step works (has ca-certs installed) - image: *GOLANG_IMAGE # use a circleci image so the attach_workspace step works (has ca-certs installed)
environment: environment:
<<: *ENVIRONMENT <<: *ENVIRONMENT
steps: steps:
@ -397,7 +397,7 @@ jobs:
# Run integration tests on nomad/v0.8.7 # Run integration tests on nomad/v0.8.7
nomad-integration-0_8: nomad-integration-0_8:
docker: docker:
- image: circleci/golang:1.10 - image: docker.mirror.hashicorp.services/circleci/golang:1.10
environment: environment:
<<: *ENVIRONMENT <<: *ENVIRONMENT
NOMAD_WORKING_DIR: &NOMAD_WORKING_DIR /go/src/github.com/hashicorp/nomad NOMAD_WORKING_DIR: &NOMAD_WORKING_DIR /go/src/github.com/hashicorp/nomad
@ -445,7 +445,7 @@ jobs:
build-website-docker-image: build-website-docker-image:
docker: docker:
- image: circleci/buildpack-deps - image: docker.mirror.hashicorp.services/circleci/buildpack-deps
shell: /usr/bin/env bash -euo pipefail -c shell: /usr/bin/env bash -euo pipefail -c
steps: steps:
- checkout - checkout
@ -687,7 +687,7 @@ jobs:
# only runs on master: checks latest commit to see if the PR associated has a backport/* or docs* label to cherry-pick # only runs on master: checks latest commit to see if the PR associated has a backport/* or docs* label to cherry-pick
cherry-picker: cherry-picker:
docker: docker:
- image: alpine:3.11 - image: docker.mirror.hashicorp.services/alpine:3.11
steps: steps:
- run: apk add --no-cache --no-progress git bash curl ncurses jq openssh-client - run: apk add --no-cache --no-progress git bash curl ncurses jq openssh-client
- checkout - checkout

View File

@ -1,6 +1,6 @@
FROM fortio/fortio AS fortio FROM docker.mirror.hashicorp.services/fortio/fortio AS fortio
FROM bats/bats:latest FROM docker.mirror.hashicorp.services/bats/bats:latest
RUN apk add curl RUN apk add curl
RUN apk add openssl RUN apk add openssl

View File

@ -3,5 +3,5 @@ ARG ENVOY_VERSION
FROM consul-dev as consul FROM consul-dev as consul
FROM envoyproxy/envoy:v${ENVOY_VERSION} FROM docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}
COPY --from=consul /bin/consul /bin/consul COPY --from=consul /bin/consul /bin/consul

View File

@ -1,4 +1,4 @@
FROM alpine:latest FROM docker.mirror.hashicorp.services/alpine:latest
RUN apk add --no-cache tcpdump RUN apk add --no-cache tcpdump
VOLUME [ "/data" ] VOLUME [ "/data" ]

View File

@ -15,7 +15,7 @@ services:
# This is a dummy container that we use to create volume and keep it # This is a dummy container that we use to create volume and keep it
# accessible while other containers are down. # accessible while other containers are down.
workdir: workdir:
image: alpine image: docker.mirror.hashicorp.services/alpine
volumes: volumes:
- *workdir-volume - *workdir-volume
command: command:
@ -47,7 +47,7 @@ services:
s1: s1:
depends_on: depends_on:
- consul-primary - consul-primary
image: "fortio/fortio" image: "docker.mirror.hashicorp.services/fortio/fortio"
environment: environment:
- "FORTIO_NAME=s1" - "FORTIO_NAME=s1"
command: command:
@ -63,7 +63,7 @@ services:
s2: s2:
depends_on: depends_on:
- consul-primary - consul-primary
image: "fortio/fortio" image: "docker.mirror.hashicorp.services/fortio/fortio"
environment: environment:
- "FORTIO_NAME=s2" - "FORTIO_NAME=s2"
command: command:
@ -79,7 +79,7 @@ services:
s2-v1: s2-v1:
depends_on: depends_on:
- consul-primary - consul-primary
image: "fortio/fortio" image: "docker.mirror.hashicorp.services/fortio/fortio"
environment: environment:
- "FORTIO_NAME=s2-v1" - "FORTIO_NAME=s2-v1"
command: command:
@ -95,7 +95,7 @@ services:
s2-v2: s2-v2:
depends_on: depends_on:
- consul-primary - consul-primary
image: "fortio/fortio" image: "docker.mirror.hashicorp.services/fortio/fortio"
environment: environment:
- "FORTIO_NAME=s2-v2" - "FORTIO_NAME=s2-v2"
command: command:
@ -111,7 +111,7 @@ services:
s3: s3:
depends_on: depends_on:
- consul-primary - consul-primary
image: "fortio/fortio" image: "docker.mirror.hashicorp.services/fortio/fortio"
environment: environment:
- "FORTIO_NAME=s3" - "FORTIO_NAME=s3"
command: command:
@ -127,7 +127,7 @@ services:
s3-v1: s3-v1:
depends_on: depends_on:
- consul-primary - consul-primary
image: "fortio/fortio" image: "docker.mirror.hashicorp.services/fortio/fortio"
environment: environment:
- "FORTIO_NAME=s3-v1" - "FORTIO_NAME=s3-v1"
command: command:
@ -143,7 +143,7 @@ services:
s3-v2: s3-v2:
depends_on: depends_on:
- consul-primary - consul-primary
image: "fortio/fortio" image: "docker.mirror.hashicorp.services/fortio/fortio"
environment: environment:
- "FORTIO_NAME=s3-v2" - "FORTIO_NAME=s3-v2"
command: command:
@ -159,7 +159,7 @@ services:
s3-alt: s3-alt:
depends_on: depends_on:
- consul-primary - consul-primary
image: "fortio/fortio" image: "docker.mirror.hashicorp.services/fortio/fortio"
environment: environment:
- "FORTIO_NAME=s3-alt" - "FORTIO_NAME=s3-alt"
command: command:
@ -175,7 +175,7 @@ services:
s4: s4:
depends_on: depends_on:
- consul-primary - consul-primary
image: "fortio/fortio" image: "docker.mirror.hashicorp.services/fortio/fortio"
environment: environment:
- "FORTIO_NAME=s4" - "FORTIO_NAME=s4"
command: command:
@ -191,7 +191,7 @@ services:
s1-sidecar-proxy: s1-sidecar-proxy:
depends_on: depends_on:
- consul-primary - consul-primary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -212,7 +212,7 @@ services:
s2-sidecar-proxy: s2-sidecar-proxy:
depends_on: depends_on:
- consul-primary - consul-primary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -233,7 +233,7 @@ services:
s2-v1-sidecar-proxy: s2-v1-sidecar-proxy:
depends_on: depends_on:
- consul-primary - consul-primary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -254,7 +254,7 @@ services:
s2-v2-sidecar-proxy: s2-v2-sidecar-proxy:
depends_on: depends_on:
- consul-primary - consul-primary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -275,7 +275,7 @@ services:
s3-sidecar-proxy: s3-sidecar-proxy:
depends_on: depends_on:
- consul-primary - consul-primary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -296,7 +296,7 @@ services:
s3-v1-sidecar-proxy: s3-v1-sidecar-proxy:
depends_on: depends_on:
- consul-primary - consul-primary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -317,7 +317,7 @@ services:
s3-v2-sidecar-proxy: s3-v2-sidecar-proxy:
depends_on: depends_on:
- consul-primary - consul-primary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -338,7 +338,7 @@ services:
s3-alt-sidecar-proxy: s3-alt-sidecar-proxy:
depends_on: depends_on:
- consul-primary - consul-primary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -397,7 +397,7 @@ services:
fake-statsd: fake-statsd:
depends_on: depends_on:
- consul-primary - consul-primary
image: "alpine/socat" image: "docker.mirror.hashicorp.services/alpine/socat"
command: command:
- -u - -u
- UDP-RECVFROM:8125,fork,reuseaddr - UDP-RECVFROM:8125,fork,reuseaddr
@ -412,7 +412,7 @@ services:
wipe-volumes: wipe-volumes:
volumes: volumes:
- *workdir-volume - *workdir-volume
image: alpine image: docker.mirror.hashicorp.services/alpine
command: command:
- sh - sh
- -c - -c
@ -424,7 +424,7 @@ services:
volumes: volumes:
- *workdir-volume - *workdir-volume
- ./:/cwd - ./:/cwd
image: alpine image: docker.mirror.hashicorp.services/alpine
command: command:
- cp - cp
- -r - -r
@ -434,13 +434,13 @@ services:
zipkin: zipkin:
volumes: volumes:
- *workdir-volume - *workdir-volume
image: openzipkin/zipkin image: docker.mirror.hashicorp.services/openzipkin/zipkin
network_mode: service:consul-primary network_mode: service:consul-primary
jaeger: jaeger:
volumes: volumes:
- *workdir-volume - *workdir-volume
image: jaegertracing/all-in-one:1.11 image: docker.mirror.hashicorp.services/jaegertracing/all-in-one:1.11
network_mode: service:consul-primary network_mode: service:consul-primary
command: command:
- --collector.zipkin.http-port=9411 - --collector.zipkin.http-port=9411
@ -466,7 +466,7 @@ services:
s1-secondary: s1-secondary:
depends_on: depends_on:
- consul-secondary - consul-secondary
image: "fortio/fortio" image: "docker.mirror.hashicorp.services/fortio/fortio"
environment: environment:
- "FORTIO_NAME=s1-secondary" - "FORTIO_NAME=s1-secondary"
command: command:
@ -482,7 +482,7 @@ services:
s2-secondary: s2-secondary:
depends_on: depends_on:
- consul-secondary - consul-secondary
image: "fortio/fortio" image: "docker.mirror.hashicorp.services/fortio/fortio"
environment: environment:
- "FORTIO_NAME=s2-secondary" - "FORTIO_NAME=s2-secondary"
command: command:
@ -498,7 +498,7 @@ services:
s1-sidecar-proxy-secondary: s1-sidecar-proxy-secondary:
depends_on: depends_on:
- consul-secondary - consul-secondary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -519,7 +519,7 @@ services:
s2-sidecar-proxy-secondary: s2-sidecar-proxy-secondary:
depends_on: depends_on:
- consul-secondary - consul-secondary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -540,7 +540,7 @@ services:
gateway-primary: gateway-primary:
depends_on: depends_on:
- consul-primary - consul-primary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -561,7 +561,7 @@ services:
gateway-secondary: gateway-secondary:
depends_on: depends_on:
- consul-secondary - consul-secondary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -582,7 +582,7 @@ services:
ingress-gateway-primary: ingress-gateway-primary:
depends_on: depends_on:
- consul-primary - consul-primary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"
@ -599,7 +599,7 @@ services:
terminating-gateway-primary: terminating-gateway-primary:
depends_on: depends_on:
- consul-primary - consul-primary
image: "envoyproxy/envoy:v${ENVOY_VERSION}" image: "docker.mirror.hashicorp.services/envoyproxy/envoy:v${ENVOY_VERSION}"
command: command:
- "envoy" - "envoy"
- "-c" - "-c"

View File

@ -195,7 +195,7 @@ function snapshot_envoy_admin {
local ENVOY_NAME=$2 local ENVOY_NAME=$2
local DC=${3:-primary} local DC=${3:-primary}
local OUTDIR="${LOG_DIR}/envoy-snapshots/${DC}/${ENVOY_NAME}" local OUTDIR="${LOG_DIR}/envoy-snapshots/${DC}/${ENVOY_NAME}"
mkdir -p "${OUTDIR}" mkdir -p "${OUTDIR}"
docker_wget "$DC" "http://${HOSTPORT}/config_dump" -q -O - > "${OUTDIR}/config_dump.json" docker_wget "$DC" "http://${HOSTPORT}/config_dump" -q -O - > "${OUTDIR}/config_dump.json"
docker_wget "$DC" "http://${HOSTPORT}/clusters?format=json" -q -O - > "${OUTDIR}/clusters.json" docker_wget "$DC" "http://${HOSTPORT}/clusters?format=json" -q -O - > "${OUTDIR}/clusters.json"
@ -425,7 +425,7 @@ function docker_consul {
function docker_wget { function docker_wget {
local DC=$1 local DC=$1
shift 1 shift 1
docker run --rm --network container:envoy_consul-${DC}_1 alpine:3.9 wget "$@" docker run --rm --network container:envoy_consul-${DC}_1 docker.mirror.hashicorp.services/alpine:3.9 wget "$@"
} }
function docker_curl { function docker_curl {

View File

@ -59,12 +59,12 @@ function init_workdir {
find ${CASE_DIR}/${DC} -type f -name '*.hcl' -exec cp -f {} workdir/${DC}/consul \; find ${CASE_DIR}/${DC} -type f -name '*.hcl' -exec cp -f {} workdir/${DC}/consul \;
find ${CASE_DIR}/${DC} -type f -name '*.bats' -exec cp -f {} workdir/${DC}/bats \; find ${CASE_DIR}/${DC} -type f -name '*.bats' -exec cp -f {} workdir/${DC}/bats \;
fi fi
if test -d "${CASE_DIR}/data" if test -d "${CASE_DIR}/data"
then then
cp -r ${CASE_DIR}/data/* workdir/${DC}/data cp -r ${CASE_DIR}/data/* workdir/${DC}/data
fi fi
return 0 return 0
} }

View File

@ -1,4 +1,4 @@
FROM node:10.16.3-alpine FROM docker.mirror.hashicorp.services/node:10.16.3-alpine
RUN apk add --update --no-cache git make g++ automake autoconf libtool nasm libpng-dev RUN apk add --update --no-cache git make g++ automake autoconf libtool nasm libpng-dev
COPY ./package.json /website/package.json COPY ./package.json /website/package.json