summaryrefslogtreecommitdiffstats
path: root/mcp/scripts
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-23 15:34:36 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-08-23 15:34:36 +0000
commit0908d946b32e5b134fab4eb0e119d8bf9661c902 (patch)
tree6e38d7fed392992b548c43b6e2473ccfe3a84eba /mcp/scripts
parent81b3142363d36b5328906e084262a723dcdf2fda (diff)
parent10a751f1e43a1c719ad4f313fb8059847de6190a (diff)
Merge changes from topic 'docker-build'
* changes: [docker build] Install OpenSSH server [submodule] Add docker-salt-formulas, ci/build.sh [deploy.sh] Install Docker if not present [jump req] Add build/deploy specific requirements
Diffstat (limited to 'mcp/scripts')
-rw-r--r--mcp/scripts/lib.sh14
-rw-r--r--mcp/scripts/requirements_deb.yaml7
-rw-r--r--mcp/scripts/requirements_rpm.yaml7
3 files changed, 25 insertions, 3 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index c566cc993..5f1275dc5 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -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
+}
diff --git a/mcp/scripts/requirements_deb.yaml b/mcp/scripts/requirements_deb.yaml
index 04ddcf631..c04f2a1d7 100644
--- a/mcp/scripts/requirements_deb.yaml
+++ b/mcp/scripts/requirements_deb.yaml
@@ -6,13 +6,18 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
-requirements_pkg:
+build:
+ # Common pkgs required for all builds, no matter the type, arch etc.
+ common:
+ - python-pip
+deploy:
# Common pkgs required for all deploys, no matter the type, arch etc.
common:
- bridge-utils
- cloud-guest-utils
- cpu-checker
- curl
+ - docker-compose
- e2fsprogs
- git
- kpartx
diff --git a/mcp/scripts/requirements_rpm.yaml b/mcp/scripts/requirements_rpm.yaml
index 3df4d0a80..50ce5d9f5 100644
--- a/mcp/scripts/requirements_rpm.yaml
+++ b/mcp/scripts/requirements_rpm.yaml
@@ -6,13 +6,18 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
-requirements_pkg:
+build:
+ # Common pkgs required for all builds, no matter the type, arch etc.
+ common:
+ - python-pip
+deploy:
# Common pkgs required for all deploys, no matter the type, arch etc.
common:
- bc
- bridge-utils
- cloud-utils-growpart
- curl
+ - docker-compose
- elfutils-libelf-devel
- e2fsprogs
- genisoimage