From 1fffe64d49b82b2c4b7425eb956f75c59732e900 Mon Sep 17 00:00:00 2001 From: Adrian Villin Date: Wed, 18 Jun 2025 17:49:55 +0200 Subject: [PATCH] hs-test: change local registry port - changed to 5001, CalicoVPP uses port 5000 Type: test Change-Id: Ic45c613d684685f21e49612c4e6454c302bbabb6 Signed-off-by: Adrian Villin --- extras/hs-test/docker/Dockerfile.ab | 2 +- extras/hs-test/docker/Dockerfile.curl | 2 +- extras/hs-test/docker/Dockerfile.h2load | 2 +- extras/hs-test/docker/Dockerfile.nginx | 2 +- extras/hs-test/docker/Dockerfile.nginx-http3 | 2 +- extras/hs-test/docker/Dockerfile.nginx-server | 2 +- extras/hs-test/docker/Dockerfile.vpp | 2 +- extras/hs-test/docker/Dockerfile.wrk | 2 +- extras/hs-test/docker/setup-local-registry.sh | 14 +++++++------- extras/hs-test/infra/hst_suite.go | 1 + extras/hs-test/script/build-images.sh | 2 +- extras/hs-test/script/build_hst.sh | 7 ++++--- 12 files changed, 21 insertions(+), 19 deletions(-) diff --git a/extras/hs-test/docker/Dockerfile.ab b/extras/hs-test/docker/Dockerfile.ab index 5e975af3b95..d61e1255033 100644 --- a/extras/hs-test/docker/Dockerfile.ab +++ b/extras/hs-test/docker/Dockerfile.ab @@ -1,6 +1,6 @@ # Apache Bench container that uses the base image ARG UBUNTU_VERSION=22.04 -FROM localhost:5000/vpp-test-base:latest +FROM localhost:5001/vpp-test-base:latest # apache2-utils is now installed in the base image diff --git a/extras/hs-test/docker/Dockerfile.curl b/extras/hs-test/docker/Dockerfile.curl index b76a9d8da66..e2fea20a45e 100644 --- a/extras/hs-test/docker/Dockerfile.curl +++ b/extras/hs-test/docker/Dockerfile.curl @@ -1,6 +1,6 @@ # curl container that uses the base image ARG UBUNTU_VERSION=22.04 -FROM localhost:5000/vpp-test-base:latest +FROM localhost:5001/vpp-test-base:latest # Note: wget and xz-utils are already in the base image diff --git a/extras/hs-test/docker/Dockerfile.h2load b/extras/hs-test/docker/Dockerfile.h2load index 40bfc72aae4..276e0268233 100644 --- a/extras/hs-test/docker/Dockerfile.h2load +++ b/extras/hs-test/docker/Dockerfile.h2load @@ -1,6 +1,6 @@ # h2load container that uses the base image ARG UBUNTU_VERSION=22.04 -FROM localhost:5000/vpp-test-base:latest +FROM localhost:5001/vpp-test-base:latest # nghttp2 is now installed in the base image diff --git a/extras/hs-test/docker/Dockerfile.nginx b/extras/hs-test/docker/Dockerfile.nginx index bc392d5f0c4..5a3e7e2a84d 100644 --- a/extras/hs-test/docker/Dockerfile.nginx +++ b/extras/hs-test/docker/Dockerfile.nginx @@ -1,6 +1,6 @@ # nginx container that uses the base image ARG UBUNTU_VERSION=22.04 -FROM localhost:5000/vpp-test-base:latest +FROM localhost:5001/vpp-test-base:latest # nginx is now installed in the base image diff --git a/extras/hs-test/docker/Dockerfile.nginx-http3 b/extras/hs-test/docker/Dockerfile.nginx-http3 index 568bd9baab1..701c66b0b6a 100644 --- a/extras/hs-test/docker/Dockerfile.nginx-http3 +++ b/extras/hs-test/docker/Dockerfile.nginx-http3 @@ -1,6 +1,6 @@ ARG UBUNTU_VERSION=22.04 -FROM localhost:5000/vpp-test-base:latest +FROM localhost:5001/vpp-test-base:latest COPY resources/nginx/vcl.conf /vcl.conf COPY resources/nginx/nginx_http3.conf /nginx.conf diff --git a/extras/hs-test/docker/Dockerfile.nginx-server b/extras/hs-test/docker/Dockerfile.nginx-server index 33c004a48bc..5284ea77636 100644 --- a/extras/hs-test/docker/Dockerfile.nginx-server +++ b/extras/hs-test/docker/Dockerfile.nginx-server @@ -1,6 +1,6 @@ # nginx server container that uses the base image ARG UBUNTU_VERSION=22.04 -FROM localhost:5000/vpp-test-base:latest +FROM localhost:5001/vpp-test-base:latest # nginx is now installed in the base image diff --git a/extras/hs-test/docker/Dockerfile.vpp b/extras/hs-test/docker/Dockerfile.vpp index 69414c80d15..1e69e2cf2f4 100644 --- a/extras/hs-test/docker/Dockerfile.vpp +++ b/extras/hs-test/docker/Dockerfile.vpp @@ -1,6 +1,6 @@ # VPP container that uses the base image ARG UBUNTU_VERSION=22.04 -FROM localhost:5000/vpp-test-base:latest +FROM localhost:5001/vpp-test-base:latest # We don't need to install these packages as they're in the base image # Just install anything specific to VPP that isn't in the base diff --git a/extras/hs-test/docker/Dockerfile.wrk b/extras/hs-test/docker/Dockerfile.wrk index ae376c5af8d..8517a058965 100644 --- a/extras/hs-test/docker/Dockerfile.wrk +++ b/extras/hs-test/docker/Dockerfile.wrk @@ -1,6 +1,6 @@ # wrk HTTP benchmarking container that uses the base image ARG UBUNTU_VERSION=22.04 -FROM localhost:5000/vpp-test-base:latest +FROM localhost:5001/vpp-test-base:latest # wrk is installed in the base image diff --git a/extras/hs-test/docker/setup-local-registry.sh b/extras/hs-test/docker/setup-local-registry.sh index 638a2f898d1..ea8cb1c24c1 100755 --- a/extras/hs-test/docker/setup-local-registry.sh +++ b/extras/hs-test/docker/setup-local-registry.sh @@ -16,7 +16,7 @@ fi # Registry container name REGISTRY_NAME="local-registry" -REGISTRY_PORT=5000 +REGISTRY_PORT=${1:-5001} # Check if registry container is already running if docker container inspect "$REGISTRY_NAME" &>/dev/null; then @@ -48,17 +48,17 @@ else echo "Adding 'localhost:$REGISTRY_PORT' to insecure-registries in /etc/docker/daemon.json" echo "You may need to restart Docker for changes to take effect" echo "Please add the following to /etc/docker/daemon.json:" - echo '{ - "insecure-registries": ["localhost:5000"] -}' + echo "{ + \"insecure-registries\": [\"localhost:$REGISTRY_PORT\"] +}" fi else echo "Creating /etc/docker/daemon.json with insecure-registries configuration" echo "You may need to restart Docker for changes to take effect" echo "Please create /etc/docker/daemon.json with the following content:" - echo '{ - "insecure-registries": ["localhost:5000"] -}' + echo "{ + \"insecure-registries\": [\"localhost:$REGISTRY_PORT\"] +}" fi fi diff --git a/extras/hs-test/infra/hst_suite.go b/extras/hs-test/infra/hst_suite.go index dc06934e4cb..b610b66b614 100644 --- a/extras/hs-test/infra/hst_suite.go +++ b/extras/hs-test/infra/hst_suite.go @@ -89,6 +89,7 @@ var reservedPorts = []string{ "48879", "4790", "5000", + "5001", "6633", "6081", "53053", diff --git a/extras/hs-test/script/build-images.sh b/extras/hs-test/script/build-images.sh index 74bb2eb06cd..2ec7de3746f 100755 --- a/extras/hs-test/script/build-images.sh +++ b/extras/hs-test/script/build-images.sh @@ -34,7 +34,7 @@ if [ -d "${DOCKER_BUILD_DIR}" ] ; then fi # Set the tag for the base image -BASE_TAG=${BASE_TAG:-"localhost:5000/vpp-test-base:latest"} +BASE_TAG=${BASE_TAG:-"localhost:5001/vpp-test-base:latest"} echo "=== Building base image ===" # shellcheck disable=2086 diff --git a/extras/hs-test/script/build_hst.sh b/extras/hs-test/script/build_hst.sh index a36037c0b67..b527466062c 100755 --- a/extras/hs-test/script/build_hst.sh +++ b/extras/hs-test/script/build_hst.sh @@ -39,6 +39,7 @@ OS_ARCH="$(uname -m)" DOCKER_BUILD_DIR="/scratch/docker-build" DOCKER_CACHE_DIR="${DOCKER_BUILD_DIR}/docker_cache" DOCKER_LOGIN_SCRIPT="/scratch/nomad/.docker-ro/dlogin.sh" +REGISTRY_PORT=5001 if [ -x "$DOCKER_LOGIN_SCRIPT" ] ; then $DOCKER_LOGIN_SCRIPT fi @@ -46,12 +47,12 @@ fi # Set up the local registry before creating containers echo "=== Setting up local registry ===" if [ -x "$(dirname "$0")/../docker/setup-local-registry.sh" ]; then - "$(dirname "$0")/../docker/setup-local-registry.sh" + "$(dirname "$0")/../docker/setup-local-registry.sh" "$REGISTRY_PORT" else echo "Warning: setup-local-registry.sh not found or not executable" echo "Attempting to create and use local registry at localhost:5000" if ! docker ps | grep -q "local-registry"; then - docker run -d --restart=always -p 5000:5000 --name local-registry registry:2 + docker run -d --restart=always -p $REGISTRY_PORT:5000 --name local-registry registry:2 fi fi @@ -83,7 +84,7 @@ fi echo "=== Building all containers using build-images.sh ===" ( # Export necessary environment variables for build-images.sh - export BASE_TAG="localhost:5000/vpp-test-base:latest" + export BASE_TAG="localhost:$REGISTRY_PORT/vpp-test-base:latest" export OS_ARCH export UBUNTU_VERSION export HTTP_PROXY -- 2.16.6