Adjust docker image to support new configuration option

Add option that allow to disable/enable log and metric part

Change-Id: I07fa8ec983a9720b600470f6538cd50141726d85
This commit is contained in:
Adrian Czarnecki 2019-11-05 11:57:47 +01:00
parent 221ac58a06
commit b6eeb9a391
3 changed files with 16 additions and 1 deletions

View File

@ -56,7 +56,9 @@ ENV \
LOG_LEVEL_ROOT=WARN \
LOG_LEVEL_CONSOLE=INFO \
LOG_LEVEL_ACCESS=INFO \
STAY_ALIVE_ON_FAILURE=false
STAY_ALIVE_ON_FAILURE=false \
ENABLE_METRICS_API=true \
ENABLE_LOGS_API=false
# Copy all neccessary files to proper locations.
COPY api-* /etc/monasca/

View File

@ -70,6 +70,8 @@ LOG_LEVEL_ROOT WARN
LOG_LEVEL_CONSOLE INFO Log level for console logging
LOG_LEVEL_ACCESS INFO Log level for access logging
STAY_ALIVE_ON_FAILURE false If true, container runs 2 hours after service fail
ENABLE_METRICS_API true Enable/Disable metrics endpoints
ENABLE_LOGS_API false Enable/disable logs endpoints
============================== ======================================================================= ==========================================
Wait scripts environment variables

View File

@ -18,6 +18,14 @@ region = {{ DEFAULT_REGION }}
# (list value)
#valid_notification_periods = 0,60
#
# Enable Metrics api endpoints (boolean value)
enable_metrics_api = {{ ENABLE_METRICS_API }}
#
# Enable Logs api endpoints (boolean value)
enable_logs_api = {{ ENABLE_LOGS_API }}
#
# From oslo.log
#
@ -424,6 +432,9 @@ metrics_topic = metrics
# (string value)
#events_topic = events
# The topic that logs will be published to (multi valued)
#logs_topics = log
#
# The topic that alarm state will be published too
# (string value)