From ad13ac513154e79be13a6210708144bfeef26907 Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Tue, 23 Apr 2019 12:37:20 -0700 Subject: Use config instead of env to start k8splugin k8splugin uses configuration files instead of env variables This patch reflects that in the setup.sh Issue-ID: MULTICLOUD-582 Change-Id: I38d42212cbc8788602b60a8756ceee29dfcb9f8c Signed-off-by: Kiran Kamineni --- plans/multicloud-k8s/functionality1/setup.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'plans/multicloud-k8s/functionality1') diff --git a/plans/multicloud-k8s/functionality1/setup.sh b/plans/multicloud-k8s/functionality1/setup.sh index 182fb8b7..eda24ba4 100755 --- a/plans/multicloud-k8s/functionality1/setup.sh +++ b/plans/multicloud-k8s/functionality1/setup.sh @@ -17,8 +17,22 @@ pushd ${SCRIPTS} ./run-instance.sh docker.io/mongo:4.0 multicloud-k8s-mongodb MONGO_IP=$(./get-instance-ip.sh multicloud-k8s-mongodb) +# setup multicloud-k8s configuration +CONFIG_FILE=$(pwd)/k8sconfig.json +cat << EOF > $CONFIG_FILE +{ + "database-address": "$MONGO_IP", + "database-type": "mongo", + "plugin-dir": "plugins", + "kube-config-dir": "kubeconfigs" +} +EOF + +cat $CONFIG_FILE + # start multicloud-k8s -./run-instance.sh nexus3.onap.org:10001/onap/multicloud/k8s:latest multicloud-k8s "-e PLUGINS_DIR=/opt/multicloud/k8s -e DATABASE_TYPE=mongo -e DATABASE_IP=$MONGO_IP" +docker run --name multicloud-k8s -v $CONFIG_FILE:/opt/multicloud/k8splugin/k8sconfig.json \ + -d nexus3.onap.org:10001/onap/multicloud/k8s:latest SERVICE_IP=$(./get-instance-ip.sh multicloud-k8s) SERVICE_PORT=8081 popd -- cgit 1.2.3-korg