blob: 4031956e41e974b29bdb40a2e5e90fcdcc6a051e [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
5multicloud_src_folder=$git_src_folder/multicloud
Shashank Kumar Shankarf84c9a12017-10-23 11:08:31 -07006multicloud_repos=("multicloud" "multicloud/framework" "multicloud/openstack" \
7"multicloud/openstack/vmware" "multicloud/openstack/windriver" \
8"multicloud/azure")
Victor Morales88d193e2017-11-16 10:50:28 -08009openstack_release="newton"
Victor Morales000de532017-08-31 17:28:10 -050010
Victor Morales88d193e2017-11-16 10:50:28 -080011function _build_images {
12 install_docker
13 install_python_requirements $multicloud_src_folder/openstack/$openstack_release
14 pushd $multicloud_src_folder/openstack/$openstack_release
15 bash build_image.sh
16 popd
17}
18
Victor Morales6a919972017-09-28 18:29:54 -070019# get_multicloud_images() -
20function get_multicloud_images {
Victor Morales88d193e2017-11-16 10:50:28 -080021 if [[ "$build_image" == "True" ]]; then
22 _build_images
23 else
24 pull_onap_image multicloud/openstack-$openstack_release
25 fi
Victor Morales6a919972017-09-28 18:29:54 -070026}
27
Victor Morales000de532017-08-31 17:28:10 -050028# install_multicloud() -
29function install_multicloud {
Victor Morales88d193e2017-11-16 10:50:28 -080030 pushd $multicloud_src_folder/openstack/$openstack_release
31 /opt/docker/docker-compose up -d
32 popd
Victor Morales000de532017-08-31 17:28:10 -050033}
34
35# init_multicloud() - Function that initialize Multi Cloud services
36function init_multicloud {
37 if [[ "$clone_repo" == "True" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080038 clone_repos "multicloud"
Victor Morales000de532017-08-31 17:28:10 -050039 if [[ "$compile_repo" == "True" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080040 compile_repos "multicloud"
Victor Morales000de532017-08-31 17:28:10 -050041 fi
42 fi
Victor Morales6a919972017-09-28 18:29:54 -070043 if [[ "$skip_get_images" == "False" ]]; then
44 get_multicloud_images
45 if [[ "$skip_install" == "False" ]]; then
46 install_multicloud
47 fi
48 fi
Victor Morales000de532017-08-31 17:28:10 -050049}