Victor Morales | 89ce321 | 2017-06-16 18:32:48 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -o xtrace |
| 4 | |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 5 | source /var/onap/functions |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 6 | |
Victor Morales | e173c76 | 2017-08-30 15:24:20 -0500 | [diff] [blame] | 7 | mr_src_folder=$git_src_folder/dcae/message-router |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 8 | |
Victor Morales | f0e6239 | 2017-08-17 14:07:51 -0500 | [diff] [blame] | 9 | # clone_mr_repos() - Function that clones the Message Router repositories |
| 10 | function clone_mr_repos { |
Victor Morales | e173c76 | 2017-08-30 15:24:20 -0500 | [diff] [blame] | 11 | clone_repo dcae/demo/startup/message-router $mr_src_folder |
Victor Morales | f0e6239 | 2017-08-17 14:07:51 -0500 | [diff] [blame] | 12 | } |
| 13 | |
| 14 | # get_mr_images() - Function that retrieves the Message Router Docker images |
| 15 | function get_mr_images { |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 16 | pull_docker_image attos/dmaap |
| 17 | pull_docker_image wurstmeister/zookeeper |
Victor Morales | f0e6239 | 2017-08-17 14:07:51 -0500 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | # install_message_router() - Downloads and configure message router source code |
| 21 | function install_message_router { |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 22 | install_docker_compose |
Victor Morales | f0e6239 | 2017-08-17 14:07:51 -0500 | [diff] [blame] | 23 | |
Victor Morales | e173c76 | 2017-08-30 15:24:20 -0500 | [diff] [blame] | 24 | pushd $mr_src_folder |
Victor Morales | 89ce321 | 2017-06-16 18:32:48 -0500 | [diff] [blame] | 25 | bash deploy.sh |
| 26 | popd |
| 27 | } |
| 28 | |
| 29 | # init_mr() - Function that initialize Message Router services |
| 30 | function init_mr { |
Idan Amit | 1690e08 | 2017-08-20 08:58:14 +0300 | [diff] [blame] | 31 | if [[ "$clone_repo" == "True" ]]; then |
| 32 | clone_mr_repos |
| 33 | fi |
Victor Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 34 | if [[ "$skip_get_images" == "False" ]]; then |
| 35 | get_mr_images |
| 36 | if [[ "$skip_install" == "False" ]]; then |
| 37 | install_message_router |
| 38 | fi |
| 39 | fi |
Victor Morales | 89ce321 | 2017-06-16 18:32:48 -0500 | [diff] [blame] | 40 | } |