Merge "Fix config file in docker"

This commit is contained in:
Zuul 2019-03-27 14:18:24 +00:00 committed by Gerrit Code Review
commit 5c690dccc7
3 changed files with 22 additions and 14 deletions

View File

@ -1,4 +1,4 @@
ARG DOCKER_IMAGE=monasca-persister
ARG DOCKER_IMAGE=monasca/persister
ARG APP_REPO=https://git.openstack.org/openstack/monasca-persister
# Branch, tag or git hash to build from.
@ -23,11 +23,19 @@ ENV \
KAFKA_METRICS_BATCH_SIZE=1000 \
KAFKA_METRICS_WAIT_TIME=15 \
KAFKA_WAIT_FOR_TOPICS=alarm-state-transitions,metrics \
DATABASE_BACKEND=influxdb \
INFLUX_HOST=influxdb \
INFLUX_PORT=8086 \
INFLUX_USER=mon_persister \
INFLUX_PASSWORD=password \
INFLUX_DB=mon \
CASSANDRA_HOSTS=cassandra \
CASSANDRA_PORT=8086 \
CASSANDRA_USER=mon_persister \
CASSANDRA_PASSWORD=password \
CASSANDRA_KEY_SPACE=monasca \
CASSANDRA_CONNECTION_TIMEOUT=5 \
CASSANDRA_RETENTION_POLICY=45 \
STAY_ALIVE_ON_FAILURE="false"
# Copy all necessary files to proper locations.

View File

@ -63,13 +63,13 @@ INFLUX_PORT 8086 The port for infl
INFLUX_USER mon_persister The influx username
INFLUX_PASSWORD password The influx password
INFLUX_DB mon The influx database name
CASSANDRA_HOSTS 127.0.0.1 Cassandra node addresses
CASSANDRA_HOSTS cassandra Cassandra node addresses
CASSANDRA_PORT 8086 Cassandra port number
KEY_SPACE monasca Keyspace name where metrics are stored
CASSANDRA_USER undefined Cassandra user name
CASSANDRA_PASSWORD undefined Cassandra password
CONNECTION_TIMEOUT 5 Cassandra timeout in seconds
RETENTION_POLICY 45 Data retention period in days
CASSANDRA_USER mon_persister Cassandra user name
CASSANDRA_PASSWORD password Cassandra password
CASSANDRA_KEY_SPACE monasca Keyspace name where metrics are stored
CASSANDRA_CONNECTION_TIMEOUT 5 Cassandra timeout in seconds
CASSANDRA_RETENTION_POLICY 45 Data retention period in days
STAY_ALIVE_ON_FAILURE false If true, container runs 2 hours even start fails
============================== =============================== ================================================

View File

@ -9,7 +9,7 @@ debug = {{ DEBUG }}
verbose = {{ VERBOSE }}
[repositories]
{% if DATABASE_BACKEND == 'CASSANDRA' %}
{% if DATABASE_BACKEND | lower == 'cassandra' %}
# The cassandra driver to use for the metrics repository
metrics_driver = monasca_persister.repositories.cassandra.metrics_repository:MetricCassandraRepository
@ -64,15 +64,15 @@ max_buffer_size = 32768
zookeeper_path = /persister_partitions/metrics
num_processors = 1
{% if DATABASE_BACKEND == 'CASSANDRA' %}
{% if DATABASE_BACKEND | lower == 'cassandra' %}
[cassandra]
contact_points = {{CASSANDRA_HOSTS}}
contact_points = {{ CASSANDRA_HOSTS }}
port = {{ CASSANDRA_PORT }}
keyspace = {{ KEY_SPACE }}
keyspace = {{ CASSANDRA_KEY_SPACE }}
user = {{ CASSANDRA_USER }}
password = {{ CASSANDRA_PASSWORD }}
connection_timeout = {{CONNECTION_TIMEOUT}}
retention_policy = {{RETENTION_POLICY}}
connection_timeout = {{ CASSANDRA_CONNECTION_TIMEOUT }}
retention_policy = {{ CASSANDRA_RETENTION_POLICY }}
{% else %}
[influxdb]
database_name = {{ INFLUX_DB }}
@ -80,4 +80,4 @@ ip_address = {{ INFLUX_HOST }}
port = {{ INFLUX_PORT }}
user = {{ INFLUX_USER }}
password = {{ INFLUX_PASSWORD }}
{% endif %}
{% endif %}