From: garciadeblas Date: Thu, 19 Apr 2018 12:05:41 +0000 (+0200) Subject: install_osm.sh: updated docker env file generation X-Git-Tag: v3.1.0~12 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=740e0597d11e600ad9c0c1d750b74006776637fd;p=osm%2Fdevops.git install_osm.sh: updated docker env file generation Change-Id: Id3cc7d1b8516c4f119dbf3d3185a583321b76140 Signed-off-by: garciadeblas --- diff --git a/installers/docker/__lcm__.env b/installers/docker/__lcm__.env new file mode 100644 index 00000000..f0baac4a --- /dev/null +++ b/installers/docker/__lcm__.env @@ -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 index 00000000..10a03888 --- /dev/null +++ b/installers/docker/__mon__.env @@ -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 index 00000000..ac2a8d80 --- /dev/null +++ b/installers/docker/__ro-db__.env @@ -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 index 00000000..aa475937 --- /dev/null +++ b/installers/docker/__ro__.env @@ -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 index f0baac4a..00000000 --- a/installers/docker/lcm.env +++ /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 index 10a03888..00000000 --- a/installers/docker/mon.env +++ /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 index ac2a8d80..00000000 --- a/installers/docker/ro-db.env +++ /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 index aa475937..00000000 --- a/installers/docker/ro.env +++ /dev/null @@ -1 +0,0 @@ -RO_DB_ROOT_PASSWORD=__MYSQL_ROOT_PASSWORD__ diff --git a/installers/install_osm.sh b/installers/install_osm.sh index e2605103..6720357a 100755 --- a/installers/install_osm.sh +++ b/installers/install_osm.sh @@ -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" }