aboutsummaryrefslogtreecommitdiffstats
path: root/functest_kubernetes/ci/download_images.sh
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-03-16 14:09:29 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2021-03-19 10:05:48 +0100
commitb26ac308d4d441195fcd804d4d0ff36356fa8a90 (patch)
tree60596049d1c4497657ef85fd4a7cddb988901506 /functest_kubernetes/ci/download_images.sh
parent4117257dfb7462f0892ec2bc057af86dc56194d8 (diff)
Provide support for air gapped env for rally
Sometimes, tested Kubernetes doesn't have direct access to Internet but access through repository mirrors. This patch handles this case for rally test case. There's two ways for providing the repository mirrors: - Give an environment variable (`MIRROR_REPO`) which gives a repository mirro with all needed images. - Gives an environment variable per needed repo: - `DOCKERHUB_REPO` for DockerHub repository (`docker.io`) - `GCR_REPO` for Google Cloud repository (`gcr.io`) - `K8S_GCR_REPO` for Kubernetes repository (`k8s.gcr.io`) Needed images list has also been extracted so Kubernetes administrator can easily upload these images to the mirror if the mirror also doesn't have access to Internet. Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I2ea6622b79f7e3c3c63c1441c4dab48e9bc4fb1a
Diffstat (limited to 'functest_kubernetes/ci/download_images.sh')
-rw-r--r--functest_kubernetes/ci/download_images.sh60
1 files changed, 2 insertions, 58 deletions
diff --git a/functest_kubernetes/ci/download_images.sh b/functest_kubernetes/ci/download_images.sh
index 1d982ce1..dfadb024 100644
--- a/functest_kubernetes/ci/download_images.sh
+++ b/functest_kubernetes/ci/download_images.sh
@@ -2,66 +2,10 @@
set -e
-tmpfile=$(mktemp)
-cat << EOF > $tmpfile
-docker.io/appropriate/curl:edge
-docker.io/aquasec/kube-bench:0.3.1
-docker.io/aquasec/kube-hunter:0.3.1
-docker.io/gluster/glusterdynamic-provisioner:v1.0
-docker.io/library/busybox:1.28
-docker.io/library/busybox:1.29
-docker.io/library/httpd:2.4.38-alpine
-docker.io/library/httpd:2.4.39-alpine
-docker.io/library/nginx:1.14-alpine
-docker.io/library/nginx:1.15-alpine
-docker.io/library/perl:5.26
-docker.io/library/redis:5.0.5-alpine
-docker.io/ollivier/clearwater-astaire:hunter
-docker.io/ollivier/clearwater-bono:hunter
-docker.io/ollivier/clearwater-cassandra:hunter
-docker.io/ollivier/clearwater-chronos:hunter
-docker.io/ollivier/clearwater-ellis:hunter
-docker.io/ollivier/clearwater-homer:hunter
-docker.io/ollivier/clearwater-homestead:hunter
-docker.io/ollivier/clearwater-homestead-prov:hunter
-docker.io/ollivier/clearwater-live-test:hunter
-docker.io/ollivier/clearwater-ralf:hunter
-docker.io/ollivier/clearwater-sprout:hunter
-gcr.io/google-samples/hello-go-gke:1.0
-gcr.io/kubernetes-e2e-test-images/apparmor-loader:1.0
-gcr.io/kubernetes-e2e-test-images/cuda-vector-add:1.0
-gcr.io/kubernetes-e2e-test-images/cuda-vector-add:2.0
-gcr.io/kubernetes-e2e-test-images/echoserver:2.2
-gcr.io/kubernetes-e2e-test-images/ipc-utils:1.0
-gcr.io/kubernetes-e2e-test-images/jessie-dnsutils:1.0
-gcr.io/kubernetes-e2e-test-images/kitten:1.0
-gcr.io/kubernetes-e2e-test-images/metadata-concealment:1.2
-gcr.io/kubernetes-e2e-test-images/nautilus:1.0
-gcr.io/kubernetes-e2e-test-images/nonewprivs:1.0
-gcr.io/kubernetes-e2e-test-images/nonroot:1.0
-gcr.io/kubernetes-e2e-test-images/regression-issue-74839-amd64:1.0
-gcr.io/kubernetes-e2e-test-images/resource-consumer:1.5
-gcr.io/kubernetes-e2e-test-images/sample-apiserver:1.17
-gcr.io/kubernetes-e2e-test-images/volume/gluster:1.0
-gcr.io/kubernetes-e2e-test-images/volume/iscsi:2.0
-gcr.io/kubernetes-e2e-test-images/volume/nfs:1.0
-gcr.io/kubernetes-e2e-test-images/volume/rbd:1.0.1
-k8s.gcr.io/build-image/debian-iptables:v12.1.2
-k8s.gcr.io/conformance:v1.19.0
-k8s.gcr.io/e2e-test-images/agnhost:2.20
-k8s.gcr.io/etcd:3.4.13-0
-k8s.gcr.io/pause:3.2
-k8s.gcr.io/pause:3.3
-k8s.gcr.io/prometheus-dummy-exporter:v0.1.0
-k8s.gcr.io/prometheus-to-sd:v0.5.0
-k8s.gcr.io/sd-dummy-exporter:v0.2.0
-k8s.gcr.io/sig-storage/nfs-provisioner:v2.2.2
-quay.io/coreos/etcd:v2.2.5
-EOF
-for i in $(cat $tmpfile); do
+DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)"
+for i in $(cat $DIR/images.txt); do
sudo docker pull $i
# https://kind.sigs.k8s.io/docs/user/quick-start/
# Be free to use docker save && kind load image-archive
kind load docker-image $i --name latest
done
-rm -f $tmpfile