blob: cd2e2444bf7992504203d258944b53f27c510819 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/bin/bash
source /var/onap/functions
# _build_dmaap_images() - Build DMaaP Docker images from source code
function _build_dmaap_images {
if [[ "$compile_repo" != "True" ]]; then
compile_repos "dmaap"
fi
for project in buscontroller datarouter/datarouter-node datarouter/datarouter-prov messagerouter/messageservice; do
build_docker_image ${src_folders[dmaap]}/$project
done
}
# get_dmaap_images() - Get DMaaP Docker images
function get_dmaap_images {
if [[ "$build_image" == "True" ]]; then
_build_dmaap_images
else
for image in dmaap-mr datarouter-prov datarouter-node buscontroller; do
pull_onap_image dmaap/$image
done
fi
}
# install_dmaap() - Install DMaaP services
function install_dmaap {
cp ${src_folders[dmaap]}/messagerouter//messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/
sed -i "s|config.zk.servers=<zookeeper_host>|config.zk.servers=172.18.0.3|g" /var/tmp/MsgRtrApi.properties
sed -i "s|kafka.metadata.broker.list=<kafka_host>:<kafka_port>|kafka.metadata.broker.list=172.18.0.2:9092|g" /var/tmp/MsgRtrApi.properties
run_docker_compose ${src_folders[dmaap]}/messagerouter/messageservice/src/main/resources/docker-compose/
run_docker_compose ${src_folders[dmaap]}/datarouter/datarouter-prov/src/main/resources/docker-compose/
}
# init_dmaap() - Function that initialize DMaaP service
function init_dmaap {
if [[ "$clone_repo" == "True" ]]; then
clone_repos "dmaap"
if [[ "$compile_repo" == "True" ]]; then
compile_repos "dmaap"
fi
fi
if [[ "$skip_get_images" == "False" ]]; then
get_dmaap_images
fi
if [[ "$skip_install" == "False" ]]; then
install_dmaap
fi
}
|