[deploy.sh] Install Docker if not present 93/61193/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Sun, 19 Aug 2018 22:11:02 +0000 (00:11 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 21 Aug 2018 15:21:28 +0000 (17:21 +0200)
JIRA: FUEL-383

Change-Id: I19d27ca59a3f24d1bd66e39457a6ca267bccce19
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
ci/deploy.sh
mcp/scripts/lib.sh

index d3704a1..47662f7 100755 (executable)
@@ -241,6 +241,7 @@ if [ ${USE_EXISTING_PKGS} -eq 1 ]; then
 else
     notify "[NOTE] Installing required distro pkgs" 2
     jumpserver_pkg_install 'deploy'
+    docker_install
 fi
 
 if ! virsh list >/dev/null 2>&1; then
index c3a71a4..5f1275d 100644 (file)
@@ -572,3 +572,14 @@ function get_nova_compute_pillar_data {
     echo "${value}"
   fi
 }
+
+function docker_install {
+  # Mininum effort attempt at installing Docker if missing
+  if ! which docker; then
+    curl -fsSL https://get.docker.com -o get-docker.sh
+    sudo sh get-docker.sh
+    rm get-docker.sh
+    # On RHEL distros, the Docker service should be explicitly started
+    sudo systemctl start docker
+  fi
+}