# RO_DB_OVIM_PORT: default value '3306'
# RO_DB_NAME: default value 'mano_db'
# RO_DB_OVIM_NAME: default value 'mano_vim_db'
+# RO_LOG_FILE: default log to stderr if not defined
ENV RO_DB_HOST="" \
RO_DB_OVIM_HOST="" \
RO_DB_PORT=3306 \
RO_DB_OVIM_PORT=3306 \
RO_DB_NAME=mano_db \
- RO_DB_OVIM_NAME=mano_vim_db
+ RO_DB_OVIM_NAME=mano_vim_db \
+ OPENMANO_TENANT=osm \
+ RO_LOG_LEVEL=DEBUG
CMD /bin/RO/start.sh
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" --create-tenant=osm # --log-file=/var/log/osm/openmano.log
+
__author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes"
__date__ = "$26-aug-2014 11:09:29$"
__version__ = "0.5.75-r585"
-version_date = "Ago 2018"
+version_date = "Oct 2018"
database_version = 32 # expected database schema version
'db_ovim_user': 'RO_DB_OVIM_USER',
'db_ovim_passwd': 'RO_DB_OVIM_PASSWORD',
'db_port': 'RO_DB_PORT',
- 'db_port': 'RO_DB_PORT',
+ 'log_level': 'RO_LOG_LEVEL',
+ 'log_file': 'RO_LOG_FILE',
}
# Configure logging step 1
hostname = socket.gethostname()
#general logging parameters
#choose among: DEBUG, INFO, WARNING, ERROR, CRITICAL
-log_level: DEBUG #general log levels for internal logging
+log_level: INFO #general log levels for internal logging
#standard output is used unless 'log_file' is specify
#log_file: /var/log/openmano/openmano.log