From d6c63f1baa57df4d644ec51ce3088f82daf872e6 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Sun, 13 May 2018 21:09:05 -0700 Subject: [PATCH] Add validation for docker registry v2 Validate that Registry is actually up and running. It's useful to fail early if the registry is for some reasons not started correctly. It avoids to go further in the deployments steps and loose time before seeing the failures when deploying containers. Change-Id: Ic29d1c10741bf946c1df709d14b9b30dcf7f6c9b --- tasks/docker-distribution.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/docker-distribution.yml b/tasks/docker-distribution.yml index 2d1b687..800f14e 100644 --- a/tasks/docker-distribution.yml +++ b/tasks/docker-distribution.yml @@ -16,3 +16,9 @@ enabled: true state: started name: docker-distribution + +- name: validate that registry is up + uri: + # Just checking API version should be fine + # https://docs.docker.com/registry/spec/api/#api-version-check + url: "http://{{ container_registry_host }}:{{ container_registry_port }}/v2/"