aboutsummaryrefslogtreecommitdiffstats
path: root/plans/multicloud-k8s/functionality1
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2019-04-23 12:37:20 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2019-04-23 12:37:27 -0700
commitad13ac513154e79be13a6210708144bfeef26907 (patch)
tree579d1ac9f08db4c539d5e30f9db3fc7df189f6e7 /plans/multicloud-k8s/functionality1
parent39c0dadfc85c06a0d5a3ea517ff9d06c39bd4e8a (diff)
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 <kiran.k.kamineni@intel.com>
Diffstat (limited to 'plans/multicloud-k8s/functionality1')
-rwxr-xr-xplans/multicloud-k8s/functionality1/setup.sh16
1 files changed, 15 insertions, 1 deletions
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