Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 3 | source /var/onap/functions |
| 4 | |
| 5 | multicloud_src_folder=$git_src_folder/multicloud |
Shashank Kumar Shankar | f84c9a1 | 2017-10-23 11:08:31 -0700 | [diff] [blame] | 6 | multicloud_repos=("multicloud" "multicloud/framework" "multicloud/openstack" \ |
| 7 | "multicloud/openstack/vmware" "multicloud/openstack/windriver" \ |
| 8 | "multicloud/azure") |
Victor Morales | 88d193e | 2017-11-16 10:50:28 -0800 | [diff] [blame] | 9 | openstack_release="newton" |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 10 | |
Victor Morales | 88d193e | 2017-11-16 10:50:28 -0800 | [diff] [blame] | 11 | function _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 Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 19 | # get_multicloud_images() - |
| 20 | function get_multicloud_images { |
Victor Morales | 88d193e | 2017-11-16 10:50:28 -0800 | [diff] [blame] | 21 | if [[ "$build_image" == "True" ]]; then |
| 22 | _build_images |
| 23 | else |
| 24 | pull_onap_image multicloud/openstack-$openstack_release |
| 25 | fi |
Victor Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 26 | } |
| 27 | |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 28 | # install_multicloud() - |
| 29 | function install_multicloud { |
Victor Morales | 88d193e | 2017-11-16 10:50:28 -0800 | [diff] [blame] | 30 | pushd $multicloud_src_folder/openstack/$openstack_release |
| 31 | /opt/docker/docker-compose up -d |
| 32 | popd |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | # init_multicloud() - Function that initialize Multi Cloud services |
| 36 | function init_multicloud { |
| 37 | if [[ "$clone_repo" == "True" ]]; then |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 38 | clone_repos "multicloud" |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 39 | if [[ "$compile_repo" == "True" ]]; then |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 40 | compile_repos "multicloud" |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 41 | fi |
| 42 | fi |
Victor Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 43 | if [[ "$skip_get_images" == "False" ]]; then |
| 44 | get_multicloud_images |
| 45 | if [[ "$skip_install" == "False" ]]; then |
| 46 | install_multicloud |
| 47 | fi |
| 48 | fi |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 49 | } |