blob: a137f73bb93f51757043cc90f45f1b02527a612a [file] [log] [blame]
Victor Morales89ce3212017-06-16 18:32:48 -05001#!/bin/bash
2
3set -o xtrace
4
Victor Moralesdd074802017-07-26 16:06:35 -05005source /var/onap/functions
Victor Moralesdd074802017-07-26 16:06:35 -05006
Victor Moralese173c762017-08-30 15:24:20 -05007mr_src_folder=$git_src_folder/dcae/message-router
Victor Moralesdd074802017-07-26 16:06:35 -05008
Victor Moralesf0e62392017-08-17 14:07:51 -05009# clone_mr_repos() - Function that clones the Message Router repositories
10function clone_mr_repos {
Victor Moralese173c762017-08-30 15:24:20 -050011 clone_repo dcae/demo/startup/message-router $mr_src_folder
Victor Moralesf0e62392017-08-17 14:07:51 -050012}
13
14# get_mr_images() - Function that retrieves the Message Router Docker images
15function get_mr_images {
Victor Moralesdd074802017-07-26 16:06:35 -050016 pull_docker_image attos/dmaap
17 pull_docker_image wurstmeister/zookeeper
Victor Moralesf0e62392017-08-17 14:07:51 -050018}
19
20# install_message_router() - Downloads and configure message router source code
21function install_message_router {
Victor Moralesdd074802017-07-26 16:06:35 -050022 install_docker_compose
Victor Moralesf0e62392017-08-17 14:07:51 -050023
Victor Moralese173c762017-08-30 15:24:20 -050024 pushd $mr_src_folder
Victor Morales89ce3212017-06-16 18:32:48 -050025 bash deploy.sh
26 popd
27}
28
29# init_mr() - Function that initialize Message Router services
30function init_mr {
Idan Amit1690e082017-08-20 08:58:14 +030031 if [[ "$clone_repo" == "True" ]]; then
32 clone_mr_repos
33 fi
Victor Moralesf0e62392017-08-17 14:07:51 -050034 get_mr_images
35 install_message_router
Victor Morales89ce3212017-06-16 18:32:48 -050036}