Change dockerfile-local to install osm-im, lib-osm-openvim and RO from source instead of making
Change-Id: I03af69a2f798ed5b0645c2d3eac4ac48b15805a2
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
diff --git a/scripts/RO-start.sh b/scripts/RO-start.sh
index afc746a..7d442f0 100755
--- a/scripts/RO-start.sh
+++ b/scripts/RO-start.sh
@@ -66,7 +66,7 @@
#wait 120 sec
if [ $attempt -ge $max_attempts ]; then
echo
- echo "Can not connect to database ${db_host}:${db_port} during $max_attempts sec"
+ echo "Cannot connect to database ${db_host}:${db_port} during $max_attempts sec"
return 1
fi
attempt=$[$attempt+1]
@@ -78,7 +78,8 @@
echo "1/4 Apply config"
-configure || exit 1
+# this is not needed anymore because envioron overwrites config file
+# configure || exit 1
echo "2/4 Wait for db up"
@@ -129,4 +130,9 @@
echo "4/4 Try to start"
-/usr/bin/openmanod -c /etc/osm/openmanod.cfg --log-file=/var/log/osm/openmano.log --create-tenant=osm
+# look for openmanod.cfg
+RO_CONFIG_FILE="/etc/osm/openmanod.cfg"
+[ -f "$RO_CONFIG_FILE" ] || RO_CONFIG_FILE=$(python -c 'import osm_ro; print(osm_ro.__path__[0])')/openmanod.cfg
+[ -f "$RO_CONFIG_FILE" ] || ! echo "configuration file 'openmanod.cfg' not found" || exit 1
+
+openmanod -c "$RO_CONFIG_FILE" --log-file=/var/log/osm/openmano.log --create-tenant=osm