From 4a762a6a8a9bc6c4364e8a4b3588326e4fc40982 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 5 May 2023 12:00:00 -0700 Subject: [PATCH] Migrate statsd sidecar container images to quay.io The migration of the zookeeper-statsd image itself already happened as it was our test case. That said I found a small typo that needs fixing (and will clean up the extra image that was created later). We also update zookeeper-statsd to pull the base python image from quay.io The real fun happens with haproxy-statsd. We update the image to pull the python base image from quay.io and set it up to publish to quay.io itself. Change-Id: Ie0c119ac309837baef850236f7d5ba6b9da97ce0 --- docker/haproxy-statsd/Dockerfile | 2 +- docker/zookeeper-statsd/Dockerfile | 2 +- .../haproxy/templates/docker-compose.yaml.j2 | 2 +- zuul.d/docker-images/haproxy.yaml | 15 ++++++++++----- zuul.d/docker-images/zookeeper-statsd.yaml | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docker/haproxy-statsd/Dockerfile b/docker/haproxy-statsd/Dockerfile index 4651373cda..db86fa3270 100644 --- a/docker/haproxy-statsd/Dockerfile +++ b/docker/haproxy-statsd/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM docker.io/opendevorg/python-base:3.11-bullseye +FROM quay.io/opendevorg/python-base:3.11-bullseye COPY haproxy-statsd.py /usr/local/bin RUN pip install statsd diff --git a/docker/zookeeper-statsd/Dockerfile b/docker/zookeeper-statsd/Dockerfile index 6806c8a210..a026a5acab 100644 --- a/docker/zookeeper-statsd/Dockerfile +++ b/docker/zookeeper-statsd/Dockerfile @@ -16,7 +16,7 @@ # Mon May 1 19:42:37 UTC 2023 - trigger rebuild -FROM docker.io/opendevorg/python-base:3.9-bullseye +FROM quay.io/opendevorg/python-base:3.9-bullseye COPY zookeeper-statsd.py /usr/local/bin RUN pip install statsd diff --git a/playbooks/roles/haproxy/templates/docker-compose.yaml.j2 b/playbooks/roles/haproxy/templates/docker-compose.yaml.j2 index 04488bde3f..c7216c5546 100644 --- a/playbooks/roles/haproxy/templates/docker-compose.yaml.j2 +++ b/playbooks/roles/haproxy/templates/docker-compose.yaml.j2 @@ -46,7 +46,7 @@ services: {% if haproxy_run_statsd %} haproxy-statsd: restart: always - image: docker.io/opendevorg/haproxy-statsd:latest + image: quay.io/opendevorg/haproxy-statsd:latest network_mode: host user: "1000:1000" volumes: diff --git a/zuul.d/docker-images/haproxy.yaml b/zuul.d/docker-images/haproxy.yaml index 9fa863afae..0e1b796bd3 100644 --- a/zuul.d/docker-images/haproxy.yaml +++ b/zuul.d/docker-images/haproxy.yaml @@ -2,13 +2,18 @@ - job: name: system-config-build-image-haproxy-statsd description: Build a haproxy-statsd image. - parent: system-config-build-image + parent: system-config-build-container-image requires: python-base-3.11-bullseye-container-image provides: haproxy-statsd-container-image vars: &haproxy-statsd_vars - docker_images: + promote_container_image_job: system-config-upload-image-haproxy-statsd + container_images: - context: docker/haproxy-statsd - repository: opendevorg/haproxy-statsd + registry: quay.io + repository: quay.io/opendevorg/haproxy-statsd + namespace: opendevorg + repo_shortname: haproxy-statsd + repo_description: Tool to report HaProxy stats to statsd # Duplicate in the run-gitea job files: &haproxy-statsd_files - docker/haproxy-statsd/ @@ -17,7 +22,7 @@ - job: name: system-config-upload-image-haproxy-statsd description: Build and upload a haproxy-statsd image. - parent: system-config-upload-image + parent: system-config-upload-container-image requires: python-base-3.11-bullseye-container-image provides: haproxy-statsd-container-image vars: *haproxy-statsd_vars @@ -26,6 +31,6 @@ - job: name: system-config-promote-image-haproxy-statsd description: Promote a previously published haproxy-statsd image to latest. - parent: system-config-promote-image + parent: system-config-promote-container-image vars: *haproxy-statsd_vars files: *haproxy-statsd_files diff --git a/zuul.d/docker-images/zookeeper-statsd.yaml b/zuul.d/docker-images/zookeeper-statsd.yaml index 48c563641c..f9c2ce055c 100644 --- a/zuul.d/docker-images/zookeeper-statsd.yaml +++ b/zuul.d/docker-images/zookeeper-statsd.yaml @@ -11,7 +11,7 @@ registry: quay.io repository: quay.io/opendevorg/zookeeper-statsd namespace: opendevorg - repo_shortname: zookeeker-statsd + repo_shortname: zookeeper-statsd repo_description: Tool to report ZooKeeper stats to statsd files: &zookeeper-statsd_files - docker/zookeeper-statsd/