summaryrefslogtreecommitdiffstats
path: root/kubernetes/config/docker
diff options
context:
space:
mode:
authorMike Elliott <mike.elliott@amdocs.com>2017-08-14 16:21:40 -0400
committerMike Elliott <mike.elliott@amdocs.com>2017-08-15 08:09:33 -0400
commitd17accd32f4f7851dbe7b023f1997aa4e17938e8 (patch)
treea0add5147ff2e3a2da78c8117d237bcdb656758d /kubernetes/config/docker
parent8fc4b23407fa42cde4c592491824e48c564245a1 (diff)
[OOM-117] Multiple ONAP instances same K8s cluster
Change-Id: Ie670dd37da819b33e32885d3be20cc8739fc2524 Signed-off-by: Mike Elliott <mike.elliott@amdocs.com>
Diffstat (limited to 'kubernetes/config/docker')
-rwxr-xr-xkubernetes/config/docker/init/config-init.sh45
1 files changed, 24 insertions, 21 deletions
diff --git a/kubernetes/config/docker/init/config-init.sh b/kubernetes/config/docker/init/config-init.sh
index bf0e644b6f..f751f4d1ca 100755
--- a/kubernetes/config/docker/init/config-init.sh
+++ b/kubernetes/config/docker/init/config-init.sh
@@ -1,26 +1,29 @@
#!/bin/bash
-#make owner directory
-mkdir -p /config-init/$OWNER/
+#make NAMESPACE directory
+mkdir -p /config-init/$NAMESPACE/
-#unzip the configs in the owners directory ensuring no overwriting of files
-cp -vnpr /opt/config/src/* /config-init/$OWNER/
+#unzip the configs in the NAMESPACEs directory ensuring no overwriting of files
+cp -vnpr /opt/config/src/* /config-init/$NAMESPACE/
#ensure db directories exist.
-mkdir -p /config-init/$OWNER/appc/data/
-mkdir -p /config-init/$OWNER/dcae/pgaas/pgdata/
-mkdir -p /config-init/$OWNER/portal/mariadb/data/
-mkdir -p /config-init/$OWNER/sdnc/data/
-mkdir -p /config-init/$OWNER/vid/mariadb/data/
-mkdir -p /config-init/$OWNER/sdc/sdc-cs/CS/
-mkdir -p /config-init/$OWNER/sdc/sdc-es/ES/
-mkdir -p /config-init/$OWNER/sdc/logs/ASDC/ASDC-ES/
-mkdir -p /config-init/$OWNER/sdc/logs/ASDC/ASDC-CS/
-mkdir -p /config-init/$OWNER/sdc/logs/ASDC/ASDC-KB/
-mkdir -p /config-init/$OWNER/sdc/logs/ASDC/ASDC-BE/
-mkdir -p /config-init/$OWNER/sdc/logs/ASDC/ASDC-FE/
-mkdir -p /config-init/$OWNER/aai/opt/aai/logroot/
+mkdir -p /config-init/$NAMESPACE/appc/data/
+mkdir -p /config-init/$NAMESPACE/dcae/pgaas/pgdata/
+mkdir -p /config-init/$NAMESPACE/portal/mariadb/data/
+mkdir -p /config-init/$NAMESPACE/sdnc/data/
+mkdir -p /config-init/$NAMESPACE/vid/mariadb/data/
+mkdir -p /config-init/$NAMESPACE/sdc/sdc-cs/CS/
+mkdir -p /config-init/$NAMESPACE/sdc/sdc-es/ES/
+mkdir -p /config-init/$NAMESPACE/sdc/logs/ASDC/ASDC-ES/
+mkdir -p /config-init/$NAMESPACE/sdc/logs/ASDC/ASDC-CS/
+mkdir -p /config-init/$NAMESPACE/sdc/logs/ASDC/ASDC-KB/
+mkdir -p /config-init/$NAMESPACE/sdc/logs/ASDC/ASDC-BE/
+mkdir -p /config-init/$NAMESPACE/sdc/logs/ASDC/ASDC-FE/
+mkdir -p /config-init/$NAMESPACE/aai/opt/aai/logroot/
-chmod -R 777 /config-init/$OWNER/sdc/logs/
-chmod -R 777 /config-init/$OWNER/aai/aai-config/
-chmod -R 777 /config-init/$OWNER/aai/aai-data/
-chmod -R 777 /config-init/$OWNER/aai/opt/aai/logroot/
+chmod -R 777 /config-init/$NAMESPACE/sdc/logs/
+chmod -R 777 /config-init/$NAMESPACE/aai/aai-config/
+chmod -R 777 /config-init/$NAMESPACE/aai/aai-data/
+chmod -R 777 /config-init/$NAMESPACE/aai/opt/aai/logroot/
+
+# replace the default 'onap' namespace qualification of K8s hostnames within the config files
+find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/onap-/$NAMESPACE-/g" {} \;