[build.sh] Fix quotes, missing deb arch for repo
[fuel.git] / mcp / scripts / lib.sh
index c566cc9..5f1275d 100644 (file)
@@ -321,6 +321,7 @@ function prepare_vms {
 }
 
 function jumpserver_pkg_install {
+  local req_type=$1
   if [ -n "$(command -v apt-get)" ]; then
     pkg_type='deb'; pkg_cmd='sudo apt-get install -y'
   else
@@ -328,7 +329,7 @@ function jumpserver_pkg_install {
   fi
   eval "$(parse_yaml "./requirements_${pkg_type}.yaml")"
   for section in 'common' "$(uname -i)"; do
-    section_var="requirements_pkg_${section}[*]"
+    section_var="${req_type}_${section}[*]"
     pkg_list+=" ${!section_var}"
   done
   # shellcheck disable=SC2086
@@ -571,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
+}