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