blob: 2ffe69e26ffb9cd0434e49c43adfb91aebd03864 [file] [log] [blame]
Victor Morales89ce3212017-06-16 18:32:48 -05001#!/bin/bash
2
Victor Moralesdd074802017-07-26 16:06:35 -05003source /var/onap/functions
Victor Moralesdd074802017-07-26 16:06:35 -05004
Victor Moralese173c762017-08-30 15:24:20 -05005mr_src_folder=$git_src_folder/dcae/message-router
Victor Moralesdd074802017-07-26 16:06:35 -05006
Victor Moralesf0e62392017-08-17 14:07:51 -05007# get_mr_images() - Function that retrieves the Message Router Docker images
8function get_mr_images {
Victor Moralesdd074802017-07-26 16:06:35 -05009 pull_docker_image attos/dmaap
10 pull_docker_image wurstmeister/zookeeper
Victor Moralesf0e62392017-08-17 14:07:51 -050011}
12
13# install_message_router() - Downloads and configure message router source code
14function install_message_router {
Victor Moralesdd074802017-07-26 16:06:35 -050015 install_docker_compose
Victor Moralesf0e62392017-08-17 14:07:51 -050016
Victor Moralese173c762017-08-30 15:24:20 -050017 pushd $mr_src_folder
Victor Morales89ce3212017-06-16 18:32:48 -050018 bash deploy.sh
19 popd
20}
21
22# init_mr() - Function that initialize Message Router services
23function init_mr {
Idan Amit1690e082017-08-20 08:58:14 +030024 if [[ "$clone_repo" == "True" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080025 clone_repo dcae/demo/startup/message-router $mr_src_folder
Idan Amit1690e082017-08-20 08:58:14 +030026 fi
Victor Morales6a919972017-09-28 18:29:54 -070027 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 Morales89ce3212017-06-16 18:32:48 -050033}