Skip to content

Commit

Permalink
Allow Docker registry, Kind and NGINX images to be configured via env…
Browse files Browse the repository at this point in the history
… variables. Resolves #2106
  • Loading branch information
ryanemerson committed Jun 11, 2024
1 parent e077392 commit 8dd4cb0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,18 @@ To test locally in running Kind clusters, run:
$ go test -v ./test/e2e/xsite/ -timeout 30m
```

## Arm Support
In order to test on ARM machines locally, it's necessary for a few changes to be made.

1. `scripts/ci/kind.sh` needs to be executed with the following env variables:

```bash
DOCKER_REGISTRY_IMAGE="registry:2"
KINDEST_IMAGE="kindest/node"
KINDEST_NODE_VERSION="v1.28.7" # Must be >= 1.28.x to ensure ARM support works as expected
```

2. When executing `make infinispan-test`, set `TEST_NGINX_IMAGE="nginx"` so a multi-arch nginx container is used.

## Java Integration Tests
TODO
6 changes: 4 additions & 2 deletions scripts/ci/kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -o errexit

SERVER_TAGS=${SERVER_TAGS:-'13.0.10.Final 14.0.1.Final 14.0.6.Final 14.0.9.Final 14.0.13.Final 14.0.17.Final 14.0.19.Final 14.0.20.Final 14.0.21.Final 14.0.24.Final 14.0.27.Final 14.0 15.0.0.Final 15.0.3.Final 15.0.4.Final 15.0'}
DOCKER_REGISTRY_IMAGE=${DOCKER_REGISTRY_IMAGE:-"quay.io/infinispan-test/registry:2"}
KINDEST_IMAGE=${KINDEST_IMAGE:-"quay.io/infinispan-test/kindest-node"}
KINDEST_NODE_VERSION=${KINDEST_NODE_VERSION:-'v1.24.15'}
KIND_SUBNET=${KIND_SUBNET-172.172.0.0}

Expand All @@ -15,7 +17,7 @@ running="$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || t
if [ "${running}" != 'true' ]; then
docker run \
-d --restart=always -p "127.0.0.1:${reg_port}:5000" --name "${reg_name}" \
quay.io/infinispan-test/registry:2
${DOCKER_REGISTRY_IMAGE}
fi

# create a cluster with the local registry enabled in containerd
Expand All @@ -28,7 +30,7 @@ containerdConfigPatches:
endpoint = ["http://${reg_name}:5000"]
nodes:
- role: control-plane
image: quay.io/infinispan-test/kindest-node:${KINDEST_NODE_VERSION}
image: ${KINDEST_IMAGE}:${KINDEST_NODE_VERSION}
extraPortMappings:
- containerPort: 30222
hostPort: 11222
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/utils/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
Platform = os.Getenv("TESTING_PLATFORM")

WebServerName = "external-libs-web-server"
WebServerImageName = "quay.io/openshift-scale/nginx"
WebServerImageName = constants.GetEnvWithDefault("TEST_NGINX_IMAGE", "quay.io/openshift-scale/nginx")
WebServerRootFolder = "/usr/share/nginx/html"
WebServerPortNumber = 8080

Expand Down

0 comments on commit 8dd4cb0

Please sign in to comment.