From b0613bdd36131078b787f7b6e900e2c6713eec5c Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 7 Jul 2020 17:11:27 +0200 Subject: [PATCH] tests: add docker hub authentication in jobs This commit makes all jobs authenticating to docker hub in order to avoid the rate limit. Signed-off-by: Guillaume Abrioux (cherry picked from commit 40307f810c76f22b7152cb1f4113089a22a84274) --- tox-docker2podman.ini | 3 +++ tox-external_clients.ini | 6 ++++++ tox-filestore_to_bluestore.ini | 7 +++---- tox-podman.ini | 3 +++ tox-update.ini | 6 ++++++ tox.ini | 30 ++++++++++++++++++++++++++++++ 6 files changed, 51 insertions(+), 4 deletions(-) diff --git a/tox-docker2podman.ini b/tox-docker2podman.ini index b50463953..fb67ab851 100644 --- a/tox-docker2podman.ini +++ b/tox-docker2podman.ini @@ -43,6 +43,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " ansible-playbook -vv -i {changedir}/hosts {toxinidir}/infrastructure-playbooks/docker-to-podman.yml --extra-vars "\ diff --git a/tox-external_clients.ini b/tox-external_clients.ini index a9aa8ec7f..2ed5b8306 100644 --- a/tox-external_clients.ini +++ b/tox-external_clients.ini @@ -46,6 +46,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image=ceph/daemon \ ceph_docker_image_tag=latest-octopus \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " ansible-playbook -vv -i {changedir}/inventory {toxinidir}/tests/functional/external_clients_admin_key.yml @@ -60,6 +63,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image=ceph/daemon \ ceph_docker_image_tag=latest-octopus \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " bash -c "CEPH_STABLE_RELEASE={env:CEPH_STABLE_RELEASE:octopus} py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/inventory/external_clients-hosts --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests/test_install.py::TestCephConf" diff --git a/tox-filestore_to_bluestore.ini b/tox-filestore_to_bluestore.ini index f9615b2c5..16a2c9910 100644 --- a/tox-filestore_to_bluestore.ini +++ b/tox-filestore_to_bluestore.ini @@ -54,8 +54,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ - ceph_dev_branch={env:CEPH_DEV_BRANCH:octopus} \ - ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/filestore-to-bluestore.yml --limit osds --extra-vars "\ delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \ @@ -64,8 +65,6 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ - ceph_dev_branch={env:CEPH_DEV_BRANCH:octopus} \ - ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} \ " bash -c "CEPH_STABLE_RELEASE={env:CEPH_STABLE_RELEASE:octopus} py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests" diff --git a/tox-podman.ini b/tox-podman.ini index 79367d2c9..83742afea 100644 --- a/tox-podman.ini +++ b/tox-podman.ini @@ -46,6 +46,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " # wait 30sec for services to be ready diff --git a/tox-update.ini b/tox-update.ini index ee4ef3cd7..ac6066434 100644 --- a/tox-update.ini +++ b/tox-update.ini @@ -54,6 +54,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " ansible-playbook -vv -i {changedir}/hosts {toxinidir}/infrastructure-playbooks/rolling_update.yml --extra-vars "\ @@ -63,6 +66,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:UPDATE_CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:UPDATE_CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts --hosts='ansible://osd[!s4]' --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests diff --git a/tox.ini b/tox.ini index c4347a2bb..6095466ec 100644 --- a/tox.ini +++ b/tox.ini @@ -139,6 +139,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " # test that the cluster can be redeployed in a healthy state py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests @@ -153,6 +156,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/lvm_setup.yml @@ -220,6 +226,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-switch-to-containers --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests @@ -248,6 +257,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests @@ -261,6 +273,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " py.test --reruns 5 --reruns-delay 1 -n 8 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests @@ -274,6 +289,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " py.test --reruns 5 --reruns-delay 1 -n 8 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests @@ -287,6 +305,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " py.test --reruns 5 --reruns-delay 1 -n 8 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests @@ -300,6 +321,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " py.test --reruns 5 --reruns-delay 1 -n 8 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests @@ -319,6 +343,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/rgw_multisite.yml --extra-vars "ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest}" ansible-playbook --ssh-common-args='-F {changedir}/secondary/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey' -vv -i {changedir}/secondary/hosts {toxinidir}/tests/functional/rgw_multisite.yml --extra-vars "ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest}" @@ -423,6 +450,9 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-octopus} \ + ceph_docker_registry_auth=True \ + ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \ + ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \ " # wait 30sec for services to be ready