blob: 2f9e5d8d89518a2aaeedc5fa471c156439bfe8e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#!/bin/bash
source /var/onap/functions
multicloud_src_folder=$git_src_folder/multicloud
multicloud_repos=("multicloud" "multicloud/framework" "multicloud/openstack" \
"multicloud/openstack/vmware" "multicloud/openstack/windriver" \
"multicloud/azure")
openstack_release="newton"
# clone_multicloud_repos() - Function that clones the Multi Cloud repositories
function clone_multicloud_repos {
for repo in ${multicloud_repos[@]}; do
clone_repo $repo $multicloud_src_folder${repo#*multicloud}
done
}
# compile_multicloud_repos() -
function compile_multicloud_repos {
for repo in ${multicloud_repos[@]}; do
compile_src $multicloud_src_folder${repo#*multicloud}
done
}
function _build_images {
install_docker
install_python_requirements $multicloud_src_folder/openstack/$openstack_release
pushd $multicloud_src_folder/openstack/$openstack_release
bash build_image.sh
popd
}
# get_multicloud_images() -
function get_multicloud_images {
if [[ "$build_image" == "True" ]]; then
_build_images
else
pull_onap_image multicloud/openstack-$openstack_release
fi
}
# install_multicloud() -
function install_multicloud {
pushd $multicloud_src_folder/openstack/$openstack_release
/opt/docker/docker-compose up -d
popd
}
# init_multicloud() - Function that initialize Multi Cloud services
function init_multicloud {
if [[ "$clone_repo" == "True" ]]; then
clone_multicloud_repos
if [[ "$compile_repo" == "True" ]]; then
compile_multicloud_repos
fi
fi
if [[ "$skip_get_images" == "False" ]]; then
get_multicloud_images
if [[ "$skip_install" == "False" ]]; then
install_multicloud
fi
fi
}
|