Partial fix for bug 936 36/8336/1
authorAdam Israel <adam.israel@canonical.com>
Thu, 5 Dec 2019 20:46:54 +0000 (15:46 -0500)
committerAdam Israel <adam.israel@canonical.com>
Thu, 5 Dec 2019 20:48:45 +0000 (15:48 -0500)
This is a partial fix for bug 936. It passes the OSM_VCA_CACERT variable into MON, to be used when initiating the legacy N2VC connection.

This required parameter was introduced by the work to use upstream libjuju.

Change-Id: Ief7fba168182f3a007d51464b3338693f6ff3755
Signed-off-by: Adam Israel <adam.israel@canonical.com>
installers/full_install_osm.sh

index 090b990..c1dd2cc 100755 (executable)
@@ -944,6 +944,13 @@ function generate_docker_env_files() {
         $WORKDIR_SUDO sed -i "s|OSMMON_VCA_SECRET.*|OSMMON_VCA_SECRET=$OSM_VCA_SECRET|g" $OSM_DOCKER_WORK_DIR/mon.env
     fi
 
+    if ! grep -Fq "OSMMON_VCA_CACERT" $OSM_DOCKER_WORK_DIR/mon.env; then
+       echo "OSMMON_VCA_CACERT=${OSM_VCA_CACERT}" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/mon.env
+    else
+       $WORKDIR_SUDO sed -i "s|OSMMON_VCA_CACERT.*|OSMMON_VCA_CACERT=${OSM_VCA_CACERT}|g" $OSM_DOCKER_WORK_DIR/mon.env
+    fi
+
+
     # POL
     if [ ! -f $OSM_DOCKER_WORK_DIR/pol.env ]; then
         echo "OSMPOL_SQL_DATABASE_URI=mysql://root:${MYSQL_ROOT_PASSWORD}@mysql:3306/pol" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/pol.env