Commit f7253728 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Update configs & helm chart

parent 452e3426
Pipeline #24776 passed with stages
in 3 minutes and 43 seconds
deploymentName: di-mapper-prod
kafkaConfigs: prod-kafka-bootstrap-servers
applicationId: di-mapper-prod-app
inputTopicName: mb-di-mapper-prod
outputTopicName: mb-di-media-linker-prod
reportingTopicName: mb-di-reports-prod
configTopicName: mb-di-config-prod
\ No newline at end of file
deploymentName: di-mapper-stage
kafkaConfigs: prod-kafka-bootstrap-servers
applicationId: di-mapper-stage-app
inputTopicName: mb-di-mapper-stage
outputTopicName: mb-di-media-linker-stage
reportingTopicName: mb-di-reports-stage
configTopicName: mb-di-config-stage
\ No newline at end of file
deploymentName: di-mapper-test
kafkaConfigs: test-kafka-bootstrap-servers
applicationId: di-mapper-test-app
inputTopicName: mb-di-mapper-test
outputTopicName: mb-di-media-linker-test
reportingTopicName: mb-di-reports-test
configTopicName: mb-di-config-test
\ No newline at end of file
kafkaConfigs: prod-kafka-bootstrap-servers
deploymentName: ip-mapper-service
applicationId: mapper-service-app
inputTopicName: import-process-mapper
outputTopicName: import-process-media-linker
reportingTopicName: import-process-reporting
\ No newline at end of file
...@@ -5,6 +5,7 @@ metadata: ...@@ -5,6 +5,7 @@ metadata:
namespace: memobase namespace: memobase
data: data:
APPLICATION_ID: {{ .Values.applicationId }} APPLICATION_ID: {{ .Values.applicationId }}
SERVICE_CONFIG_TOPIC: {{ .Values.configTopicName }}
TOPIC_IN: {{ .Values.inputTopicName }} TOPIC_IN: {{ .Values.inputTopicName }}
TOPIC_OUT: {{ .Values.outputTopicName }} TOPIC_OUT: {{ .Values.outputTopicName }}
TOPIC_PROCESS: {{ .Values.reportingTopicName }} TOPIC_PROCESS: {{ .Values.reportingTopicName }}
\ No newline at end of file
...@@ -2,9 +2,10 @@ registry: "cr.gitlab.switch.ch" ...@@ -2,9 +2,10 @@ registry: "cr.gitlab.switch.ch"
image: "memoriav/memobase-2020/services/import-process/mapper-service" image: "memoriav/memobase-2020/services/import-process/mapper-service"
tag: "latest" tag: "latest"
kafkaConfigs: prod-kafka-bootstrap-servers kafkaConfigs: placeholder
deploymentName: mapper-service deploymentName: placeholder
applicationId: mapper-service-app applicationId: placeholder
inputTopicName: import-process-mapper inputTopicName: placeholder
outputTopicName: import-process-media-linker outputTopicName: placeholder
reportingTopicName: import-process-reporting reportingTopicName: placeholder
\ No newline at end of file configTopicName: placeholder
\ No newline at end of file
...@@ -66,7 +66,7 @@ class KafkaTopology( ...@@ -66,7 +66,7 @@ class KafkaTopology(
fun prepare(): StreamsBuilder { fun prepare(): StreamsBuilder {
val builder = StreamsBuilder() val builder = StreamsBuilder()
val configStream = builder.stream<String, String>("import-process-config") val configStream = builder.stream<String, String>(settings.appSettings.getProperty(Service.configTopicNameProp))
.map { key, value -> KeyValue(key.toByteArray(), value.toByteArray()) } .map { key, value -> KeyValue(key.toByteArray(), value.toByteArray()) }
val stream = builder.stream<String, String>(settings.inputTopic) val stream = builder.stream<String, String>(settings.inputTopic)
......
...@@ -25,12 +25,15 @@ import ch.memobase.settings.SettingsLoader ...@@ -25,12 +25,15 @@ import ch.memobase.settings.SettingsLoader
class Service(file: String = "app.yml") { class Service(file: String = "app.yml") {
companion object { companion object {
const val step = "mapper-service" const val step = "mapper-service"
const val configTopicNameProp = "configTopic"
} }
private val log = LogManager.getLogger("MapperService") private val log = LogManager.getLogger("MapperService")
val settings = SettingsLoader( val settings = SettingsLoader(
listOf(), listOf(
configTopicNameProp
),
file, file,
useStreamsConfig = true useStreamsConfig = true
) )
......
app:
configTopic: ${SERVICE_CONFIG_TOPIC:?system}
kafka: kafka:
streams: streams:
bootstrap.servers: ${KAFKA_BOOTSTRAP_SERVERS:?system} bootstrap.servers: ${KAFKA_BOOTSTRAP_SERVERS:?system}
......
...@@ -95,7 +95,7 @@ class IntegrationTests { ...@@ -95,7 +95,7 @@ class IntegrationTests {
testDriver.pipeInput( testDriver.pipeInput(
factory.create( factory.create(
"import-process-config", "mb-di-config-test",
"ati-002#mapping", "ati-002#mapping",
readFile("kafkaTests/${params.count}/config/mapping.yml") readFile("kafkaTests/${params.count}/config/mapping.yml")
) )
......
app: app:
institutionId: "BAZ" configTopic: mb-di-config-test
recordSetId: "BAZ-B_MEI"
configs: src/test/resources/kafkaTests/1/config
isPublished: false
kafka: kafka:
streams: streams:
bootstrap.servers: localhost:12345 bootstrap.servers: localhost:12345
......
app: app:
institutionId: "TEST" configTopic: mb-di-config-test
recordSetId: "TEST_RECORD_SET"
configs: src/test/resources/kafkaTests/2/config
isPublished: false
kafka: kafka:
streams: streams:
bootstrap.servers: localhost:12345 bootstrap.servers: localhost:12345
......
app: app:
institutionId: "TEST" configTopic: mb-di-config-test
recordSetId: "TEST_RECORD_SET"
configs: src/test/resources/kafkaTests/3/config
isPublished: false
kafka: kafka:
streams: streams:
bootstrap.servers: localhost:12345 bootstrap.servers: localhost:12345
......
app: app:
institutionId: "TEST" configTopic: mb-di-config-test
recordSetId: "TEST_RECORD_SET"
configs: src/test/resources/kafkaTests/4/config
isPublished: false
kafka: kafka:
streams: streams:
bootstrap.servers: localhost:12345 bootstrap.servers: localhost:12345
......
app: app:
institutionId: "TEST" configTopic: mb-di-config-test
recordSetId: "TEST_RECORD_SET"
configs: src/test/resources/kafkaTests/5/config
isPublished: false
kafka: kafka:
streams: streams:
bootstrap.servers: localhost:12345 bootstrap.servers: localhost:12345
......
app: app:
institutionId: "TEST" configTopic: mb-di-config-test
recordSetId: "TEST_RECORD_SET"
configs: src/test/resources/kafkaTests/6/config
isPublished: false
kafka: kafka:
streams: streams:
bootstrap.servers: localhost:12345 bootstrap.servers: localhost:12345
......
app: app:
institutionId: "TEST" configTopic: mb-di-config-test
recordSetId: "TEST_RECORD_SET"
configs: src/test/resources/kafkaTests/7/config
isPublished: false
kafka: kafka:
streams: streams:
bootstrap.servers: localhost:12345 bootstrap.servers: localhost:12345
......
app: app:
institutionId: "TEST" configTopic: mb-di-config-test
recordSetId: "TEST_RECORD_SET"
configs: src/test/resources/kafkaTests/8/config
isPublished: false
kafka: kafka:
streams: streams:
bootstrap.servers: localhost:12345 bootstrap.servers: localhost:12345
......
app: app:
institutionId: "TEST" configTopic: mb-di-config-test
recordSetId: "TEST_RECORD_SET"
configs: src/test/resources/kafkaTests/9/config
isPublished: false
kafka: kafka:
streams: streams:
bootstrap.servers: localhost:12345 bootstrap.servers: localhost:12345
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment