install_osm.sh: updated docker env file generation 08/6008/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 19 Apr 2018 12:05:41 +0000 (14:05 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 19 Apr 2018 12:05:41 +0000 (14:05 +0200)
Change-Id: Id3cc7d1b8516c4f119dbf3d3185a583321b76140
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
installers/docker/__lcm__.env [new file with mode: 0644]
installers/docker/__mon__.env [new file with mode: 0644]
installers/docker/__ro-db__.env [new file with mode: 0644]
installers/docker/__ro__.env [new file with mode: 0644]
installers/docker/lcm.env [deleted file]
installers/docker/mon.env [deleted file]
installers/docker/ro-db.env [deleted file]
installers/docker/ro.env [deleted file]
installers/install_osm.sh

diff --git a/installers/docker/__lcm__.env b/installers/docker/__lcm__.env
new file mode 100644 (file)
index 0000000..f0baac4
--- /dev/null
@@ -0,0 +1,2 @@
+OSMLCM_VCA_HOST=__JUJU_CONTROLLER_IP__
+OSMLCM_VCA_SECRET=__JUJU_PASSWORD__
diff --git a/installers/docker/__mon__.env b/installers/docker/__mon__.env
new file mode 100644 (file)
index 0000000..10a0388
--- /dev/null
@@ -0,0 +1 @@
+OS_NOTIFIER_URI=http://__DEFAULT_IP__:8662
diff --git a/installers/docker/__ro-db__.env b/installers/docker/__ro-db__.env
new file mode 100644 (file)
index 0000000..ac2a8d8
--- /dev/null
@@ -0,0 +1 @@
+MYSQL_ROOT_PASSWORD=__MYSQL_ROOT_PASSWORD__
diff --git a/installers/docker/__ro__.env b/installers/docker/__ro__.env
new file mode 100644 (file)
index 0000000..aa47593
--- /dev/null
@@ -0,0 +1 @@
+RO_DB_ROOT_PASSWORD=__MYSQL_ROOT_PASSWORD__
diff --git a/installers/docker/lcm.env b/installers/docker/lcm.env
deleted file mode 100644 (file)
index f0baac4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-OSMLCM_VCA_HOST=__JUJU_CONTROLLER_IP__
-OSMLCM_VCA_SECRET=__JUJU_PASSWORD__
diff --git a/installers/docker/mon.env b/installers/docker/mon.env
deleted file mode 100644 (file)
index 10a0388..0000000
+++ /dev/null
@@ -1 +0,0 @@
-OS_NOTIFIER_URI=http://__DEFAULT_IP__:8662
diff --git a/installers/docker/ro-db.env b/installers/docker/ro-db.env
deleted file mode 100644 (file)
index ac2a8d8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MYSQL_ROOT_PASSWORD=__MYSQL_ROOT_PASSWORD__
diff --git a/installers/docker/ro.env b/installers/docker/ro.env
deleted file mode 100644 (file)
index aa47593..0000000
+++ /dev/null
@@ -1 +0,0 @@
-RO_DB_ROOT_PASSWORD=__MYSQL_ROOT_PASSWORD__
index e260510..6720357 100755 (executable)
@@ -522,11 +522,11 @@ function generate_docker_env_files() {
     OSMLCM_VCA_HOST=`juju show-controller|grep api-endpoints|awk -F\' '{print $2}'|awk -F\: '{print $1}'`
     OSMLCM_VCA_SECRET=`grep password /home/ubuntu/.local/share/juju/accounts.yaml |awk '{print $2}'`
     MYSQL_ROOT_PASSWORD=`date +%s | sha256sum | base64 | head -c 32`
-    echo "OSMLCM_VCA_HOST=${OSMLCM_VCA_HOST}" > ${OSM_DEVOPS}/installers/docker/lcm.env
-    echo "OSMLCM_VCA_SECRET=${OSMLCM_VCA_SECRET}" >> ${OSM_DEVOPS}/installers/docker/lcm.env
-    echo "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" > ${OSM_DEVOPS}/installers/docker/ro-db.env
-    echo "RO_DB_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" > ${OSM_DEVOPS}/installers/docker/ro.env
-    echo "OS_NOTIFIER_URI=http://${DEFAULT_IP}:8662" > ${OSM_DEVOPS}/installers/docker/mon.env
+    sudo echo "OSMLCM_VCA_HOST=${OSMLCM_VCA_HOST}" > ${OSM_DEVOPS}/installers/docker/lcm.env
+    sudo echo "OSMLCM_VCA_SECRET=${OSMLCM_VCA_SECRET}" >> ${OSM_DEVOPS}/installers/docker/lcm.env
+    sudo echo "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" > ${OSM_DEVOPS}/installers/docker/ro-db.env
+    sudo echo "RO_DB_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" > ${OSM_DEVOPS}/installers/docker/ro.env
+    sudo echo "OS_NOTIFIER_URI=http://${DEFAULT_IP}:8662" > ${OSM_DEVOPS}/installers/docker/mon.env
     echo "Finished generation of docker env files"
 }