2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright 2019 © Samsung Electronics Co., Ltd.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
16 function start_mongo {
17 docker-compose up -d mongo
18 export DATABASE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aqf "name=mongo"))
19 export no_proxy=${no_proxy:-},${DATABASE_IP}
20 export NO_PROXY=${NO_PROXY:-},${DATABASE_IP}
23 function generate_k8sconfig {
24 cat << EOF > k8sconfig.json
26 "database-address": "${DATABASE_IP}",
27 "database-type": "mongo",
28 "plugin-dir": "plugins",
29 "service-port": "9015"