Skip to content

Commit

Permalink
Rework things config
Browse files Browse the repository at this point in the history
* Remove thing-docker.conf
* Remove already defined mongo config from things.conf

Signed-off-by: Yannic Klem <yannic.klem@bosch.io>
  • Loading branch information
Yannic92 committed Nov 19, 2020
1 parent e867e31 commit 926d7f1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 80 deletions.
82 changes: 25 additions & 57 deletions services/things/starter/src/main/resources/things-dev.conf
Expand Up @@ -4,70 +4,38 @@ ditto {
port = 8090
}

mongodb {
hostname = "localhost"
hostname = ${?DOCKER_HOST}
hostname = ${?MONGO_HOSTNAME}
port = 27017
port = ${?MONGO_PORT}
database = "things"
#authentication = "user:password@"
#uri = "mongodb://..." # overwrite all other mongo settings
uri = "mongodb://"${?ditto.mongodb.authentication}${ditto.mongodb.hostname}":"${ditto.mongodb.port}"/"${ditto.mongodb.database}
}

metrics.prometheus.port = 9011
}

things {
thing {
activity-check {
inactive-interval = 2m
inactive-interval = ${?THING_ACTIVITY_CHECK_INTERVAL} # may be overridden with this environment variable

deleted-interval = 1m
deleted-interval = ${?THING_ACTIVITY_CHECK_DELETED_INTERVAL}
}

snapshot {
interval = 1m
interval = ${?THING_SNAPSHOT_INTERVAL} # may be overridden with this environment variable
akka {
management.http.port = 25530

threshold = 10
threshold = ${?THING_SNAPSHOT_THRESHOLD} # may be overridden with this environment variable
}
remote{
# for debugging purpose
watch-failure-detector {
expected-response-after = 120s
}
}
}

akka.management.http.port = 25530

akka.remote {
# for debugging purpose
watch-failure-detector {
expected-response-after = 120s
artery {
canonical.hostname = "127.0.0.1"
canonical.port = 2553
canonical.port = ${?REMOTE_PORT}
bind.bind-timeout = 6s
bind.bind-timeout = ${?ARTERY_BIND_TIMEOUT}
}
}

artery {
canonical.hostname = "127.0.0.1"
canonical.port = 2553
canonical.port = ${?REMOTE_PORT}

advanced.idle-cpu-level = 1 # for development, no max throughput required

bind.bind-timeout = 6s
}
}
cluster {
# for debugging purpose
failure-detector {
expected-response-after = 120s
threshold = 16.0
acceptable-heartbeat-pause = 120s
}

akka.cluster {
# for debugging purpose
failure-detector {
expected-response-after = 120s
threshold = 16.0
acceptable-heartbeat-pause = 120s
seed-nodes = [
"akka://ditto-cluster@127.0.0.1:2552", # port of the policies service to join in cluster
"akka://ditto-cluster@"${akka.remote.artery.canonical.hostname}":"${akka.remote.artery.canonical.port}
]
}

seed-nodes = [
"akka://ditto-cluster@127.0.0.1:2552", # port of the policies service to join in cluster
"akka://ditto-cluster@"${akka.remote.artery.canonical.hostname}":"${akka.remote.artery.canonical.port}
]
}
16 changes: 0 additions & 16 deletions services/things/starter/src/main/resources/things-docker.conf

This file was deleted.

9 changes: 2 additions & 7 deletions services/things/starter/src/main/resources/things.conf
Expand Up @@ -5,13 +5,8 @@ ditto {
persistence.operations.delay-after-persistence-actor-shutdown = ${?DELAY_AFTER_PERSISTENCE_ACTOR_SHUTDOWN}

mongodb {
options {
ssl = false
ssl = ${?MONGO_DB_SSL_ENABLED}
readPreference = primaryPreferred
readPreference = ${?MONGO_DB_READ_PREFERENCE}
w = 1
}
database = "things"
database = ${?MONGO_DB_DATABASE}
}

things {
Expand Down

0 comments on commit 926d7f1

Please sign in to comment.