blob: 55096cb4b7aec6d379f27af96439dee1a2741d5f [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# clone_mr_repos() - Function that clones the Message Router repositories
8function clone_mr_repos {
Victor Moralese173c762017-08-30 15:24:20 -05009 clone_repo dcae/demo/startup/message-router $mr_src_folder
Victor Moralesf0e62392017-08-17 14:07:51 -050010}
11
12# get_mr_images() - Function that retrieves the Message Router Docker images
13function get_mr_images {
Victor Moralesdd074802017-07-26 16:06:35 -050014 pull_docker_image attos/dmaap
15 pull_docker_image wurstmeister/zookeeper
Victor Moralesf0e62392017-08-17 14:07:51 -050016}
17
18# install_message_router() - Downloads and configure message router source code
19function install_message_router {
Victor Moralesdd074802017-07-26 16:06:35 -050020 install_docker_compose
Victor Moralesf0e62392017-08-17 14:07:51 -050021
Victor Moralese173c762017-08-30 15:24:20 -050022 pushd $mr_src_folder
Victor Morales89ce3212017-06-16 18:32:48 -050023 bash deploy.sh
24 popd
25}
26
27# init_mr() - Function that initialize Message Router services
28function init_mr {
Idan Amit1690e082017-08-20 08:58:14 +030029 if [[ "$clone_repo" == "True" ]]; then
30 clone_mr_repos
31 fi
Victor Morales6a919972017-09-28 18:29:54 -070032 if [[ "$skip_get_images" == "False" ]]; then
33 get_mr_images
34 if [[ "$skip_install" == "False" ]]; then
35 install_message_router
36 fi
37 fi
Victor Morales89ce3212017-06-16 18:32:48 -050038}