blob: 377d4dcd73dd8151e486613f24aff67397ae961f [file] [log] [blame]
Victor Morales000de532017-08-31 17:28:10 -05001#!/bin/bash
2
Victor Morales000de532017-08-31 17:28:10 -05003source /var/onap/functions
4
Victor Morales88d193e2017-11-16 10:50:28 -08005openstack_release="newton"
Victor Morales000de532017-08-31 17:28:10 -05006
Victor Morales54646642017-12-08 11:57:42 -08007# _build_images() - Function that builds docker images from source code
Victor Morales88d193e2017-11-16 10:50:28 -08008function _build_images {
9 install_docker
10 install_python_requirements $multicloud_src_folder/openstack/$openstack_release
11 pushd $multicloud_src_folder/openstack/$openstack_release
12 bash build_image.sh
13 popd
14}
15
Victor Morales6a919972017-09-28 18:29:54 -070016# get_multicloud_images() -
17function get_multicloud_images {
Victor Morales88d193e2017-11-16 10:50:28 -080018 if [[ "$build_image" == "True" ]]; then
19 _build_images
20 else
21 pull_onap_image multicloud/openstack-$openstack_release
22 fi
Victor Morales6a919972017-09-28 18:29:54 -070023}
24
Victor Morales000de532017-08-31 17:28:10 -050025# install_multicloud() -
26function install_multicloud {
Victor Morales88d193e2017-11-16 10:50:28 -080027 pushd $multicloud_src_folder/openstack/$openstack_release
28 /opt/docker/docker-compose up -d
29 popd
Victor Morales000de532017-08-31 17:28:10 -050030}
31
32# init_multicloud() - Function that initialize Multi Cloud services
33function init_multicloud {
34 if [[ "$clone_repo" == "True" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080035 clone_repos "multicloud"
Victor Morales000de532017-08-31 17:28:10 -050036 if [[ "$compile_repo" == "True" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080037 compile_repos "multicloud"
Victor Morales000de532017-08-31 17:28:10 -050038 fi
39 fi
Victor Morales6a919972017-09-28 18:29:54 -070040 if [[ "$skip_get_images" == "False" ]]; then
41 get_multicloud_images
42 if [[ "$skip_install" == "False" ]]; then
43 install_multicloud
44 fi
45 fi
Victor Morales000de532017-08-31 17:28:10 -050046}