Skip to content

Commit

Permalink
cep and notification handler working with mongodb without password (#121
Browse files Browse the repository at this point in the history
)
  • Loading branch information
vgenev authored and mdebarros committed Dec 11, 2018
1 parent b1b4233 commit 1153047
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 44 deletions.
20 changes: 8 additions & 12 deletions central/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6081,7 +6081,7 @@ emailnotifier:
},
"rdkafkaConf": {
"client.id": "cep-con-notification-event",
"group.id": "notifier",
"group.id": "email-notifier",
"metadata.broker.list": "$kafka_host:$kafka_port",
"socket.blocking.max.ms": 1,
"fetch.wait.max.ms": 1,
Expand Down Expand Up @@ -6227,7 +6227,7 @@ centraleventprocessor:
repository: bitnami/mongodb
tag: latest
pullPolicy: Always
command: "mongo mongodb://$mongo_username:$mongo_password@$mongo_host:$mongo_port/$mongo_database --eval \"db.adminCommand('ping')\""
command: "mongo mongodb://$mongo_host:$mongo_port --eval \"db.adminCommand('ping')\""

service:
name: central-event-processor
Expand Down Expand Up @@ -6302,9 +6302,7 @@ centraleventprocessor:
PORT: 3080
mongo_host: '$release_name-mongodb'
mongo_port: 27017
mongo_username: mojaloop
mongo_database: mojaloop
mongo_password: password
central_ledger_admin_host: 'centralledger-service'
central_ledger_admin_port: 3001
central_ledger_api_host: 'centralledger-service'
Expand Down Expand Up @@ -6335,8 +6333,6 @@ centraleventprocessor:
"mongo": {
"uri": "$mongo_host:$mongo_port",
"database": "$mongo_database",
"username": "$mongo_username",
"password": "$mongo_password",
"ruleCollection": "Rule",
"netDebitCapPositionCollection": "NDCPosition",
"actionCollection": "Actions",
Expand Down Expand Up @@ -6370,7 +6366,7 @@ centraleventprocessor:
},
"rdkafkaConf": {
"client.id": "cep-con-notification-event",
"group.id": "notifier",
"group.id": "cep",
"metadata.broker.list": "$kafka_host:$kafka_port",
"socket.blocking.max.ms": 1,
"fetch.wait.max.ms": 1,
Expand Down Expand Up @@ -6456,20 +6452,20 @@ centraleventprocessor:
## Enable authentication
## ref: https://docs.mongodb.com/manual/tutorial/enable-authentication/
#
usePassword: true
usePassword: false
# existingSecret: name-of-existing-secret

## MongoDB admin password
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#setting-the-root-password-on-first-run
##
mongodbRootPassword: adminpass
# mongodbRootPassword: adminpass

## MongoDB custom user and database
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#creating-a-user-and-database-on-first-run
##
mongodbUsername: mojaloop
mongodbPassword: password
mongodbDatabase: mojaloop
# mongodbUsername: mojaloop
# mongodbPassword: password
# mongodbDatabase: mojaloop


## Whether enable/disable IPv6 on MongoDB
Expand Down
2 changes: 1 addition & 1 deletion centraleventprocessor/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
default.json: {{ .Values.config.default_json | replace "$ingress_host" .Values.ingress.hosts.api | replace "$kafka_host" (default .Values.config.kafka_host $kafkaHost) | replace "$kafka_port" (printf "%.0f" .Values.config.kafka_port) | replace "$mongo_host" (default .Values.config.mongo_host $mongodbHost) | replace "$mongo_port" (printf "%.0f" .Values.config.mongo_port) | replace "$mongo_database" .Values.config.mongo_database | replace "$mongo_username" .Values.config.mongo_username |replace "$mongo_password" .Values.config.mongo_password | replace "$port" (printf "%.0f" .Values.config.PORT) | replace "$central_ledger_admin_host" $centralLedgerAdminHost | replace "$central_ledger_admin_port" (printf "%.0f" .Values.config.central_ledger_admin_port) | replace "$central_ledger_api_host" $centralLedgerApiHost | replace "$central_ledger_api_port" (printf "%.0f" .Values.config.central_ledger_api_port)| quote}}
default.json: {{ .Values.config.default_json | replace "$ingress_host" .Values.ingress.hosts.api | replace "$kafka_host" (default .Values.config.kafka_host $kafkaHost) | replace "$kafka_port" (printf "%.0f" .Values.config.kafka_port) | replace "$mongo_host" (default .Values.config.mongo_host $mongodbHost) | replace "$mongo_port" (printf "%.0f" .Values.config.mongo_port) | replace "$mongo_database" .Values.config.mongo_database | replace "$port" (printf "%.0f" .Values.config.PORT) | replace "$central_ledger_admin_host" $centralLedgerAdminHost | replace "$central_ledger_admin_port" (printf "%.0f" .Values.config.central_ledger_admin_port) | replace "$central_ledger_api_host" $centralLedgerApiHost | replace "$central_ledger_api_port" (printf "%.0f" .Values.config.central_ledger_api_port)| quote}}
2 changes: 1 addition & 1 deletion centraleventprocessor/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
command:
- sh
- "-c"
- {{ (.Values.init.mongodb.command | replace "$mongo_host" $mongodbHost | replace "$mongo_port" (printf "%.0f" .Values.config.mongo_port) ) | replace "$mongo_database" .Values.config.mongo_database | replace "$mongo_username" .Values.config.mongo_username |replace "$mongo_password" .Values.config.mongo_password | quote }}
- {{ (.Values.init.mongodb.command | replace "$mongo_host" $mongodbHost | replace "$mongo_port" (printf "%.0f" .Values.config.mongo_port) ) | replace "$mongo_database" .Values.config.mongo_database | quote }}
- name: {{ .Values.init.kafka.name }}
image: {{ .Values.init.kafka.repository }}:{{ .Values.init.kafka.tag }}
imagePullPolicy: {{ .Values.init.kafka.pullPolicy }}
Expand Down
22 changes: 9 additions & 13 deletions centraleventprocessor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ init:
repository: bitnami/mongodb
tag: latest
pullPolicy: Always
command: "mongo mongodb://$mongo_username:$mongo_password@$mongo_host:$mongo_port/$mongo_database --eval \"db.adminCommand('ping')\""
command: "mongo mongodb://$mongo_host:$mongo_port --eval \"db.adminCommand('ping')\""

service:
name: central-event-processor
Expand Down Expand Up @@ -120,9 +120,7 @@ config:
PORT: 3080
mongo_host: '$release_name-mongodb'
mongo_port: 27017
mongo_username: mojaloop
mongo_database: mojaloop
mongo_password: password
central_ledger_admin_host: 'centralledger-service'
central_ledger_admin_port: 3001
central_ledger_api_host: 'centralledger-service'
Expand Down Expand Up @@ -153,8 +151,6 @@ config:
"mongo": {
"uri": "$mongo_host:$mongo_port",
"database": "$mongo_database",
"username": "$mongo_username",
"password": "$mongo_password",
"ruleCollection": "Rule",
"netDebitCapPositionCollection": "NDCPosition",
"actionCollection": "Actions",
Expand Down Expand Up @@ -188,7 +184,7 @@ config:
},
"rdkafkaConf": {
"client.id": "cep-con-notification-event",
"group.id": "notifier",
"group.id": "cep",
"metadata.broker.list": "$kafka_host:$kafka_port",
"socket.blocking.max.ms": 1,
"fetch.wait.max.ms": 1,
Expand Down Expand Up @@ -600,20 +596,20 @@ mongodb:
## Enable authentication
## ref: https://docs.mongodb.com/manual/tutorial/enable-authentication/
#
usePassword: true
usePassword: false
# existingSecret: name-of-existing-secret

## MongoDB admin password
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#setting-the-root-password-on-first-run
##
mongodbRootPassword: adminpass
# mongodbRootPassword: adminpass

## MongoDB custom user and database
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#creating-a-user-and-database-on-first-run
##
mongodbUsername: mojaloop
mongodbPassword: password
mongodbDatabase: mojaloop
# mongodbUsername: mojaloop
# mongodbPassword: password
# mongodbDatabase: mojaloop


## Whether enable/disable IPv6 on MongoDB
Expand Down Expand Up @@ -783,8 +779,8 @@ mongodb:
# enableLocalhostAuthBypass: true
# # security options
# security:
# authorization: enabled
# #keyFile: /opt/bitnami/mongodb/conf/keyfile
# authorization: enabled
#keyFile: /opt/bitnami/mongodb/conf/keyfile

## Prometheus Exporter / Metrics
##
Expand Down
2 changes: 1 addition & 1 deletion emailnotifier/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
default.json: {{.Values.config.default_json | replace "$ingress_host" .Values.ingress.hosts.api | replace "$kafka_host" (default .Values.config.kafka_host $kafkaHost) | replace "$kafka_port" (printf "%.0f" .Values.config.kafka_port) | replace "$email_pass" (.Values.config.email.pass) | replace "$email_user" (.Values.config.email.user) | replace "$email_tls_ciphers" (.Values.config.email.ciphers) | replace "$email_port" (printf "%.0f" .Values.config.email.port) | replace "$port" (printf "%.0f" .Values.config.PORT) | quote }}
default.json: {{.Values.config.default_json | replace "$ingress_host" .Values.ingress.hosts.api | replace "$kafka_host" (default .Values.config.kafka_host $kafkaHost) | replace "$kafka_port" (printf "%.0f" .Values.config.kafka_port) | replace "$email_host" (.Values.config.email.host) | replace "$email_pass" (.Values.config.email.pass) | replace "$email_user" (.Values.config.email.user) | replace "$email_tls_ciphers" (.Values.config.email.ciphers) | replace "$email_port" (printf "%.0f" .Values.config.email.port) | replace "$port" (printf "%.0f" .Values.config.PORT) | quote }}
2 changes: 1 addition & 1 deletion emailnotifier/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ config:
},
"rdkafkaConf": {
"client.id": "cep-con-notification-event",
"group.id": "notifier",
"group.id": "email-notifier",
"metadata.broker.list": "$kafka_host:$kafka_port",
"socket.blocking.max.ms": 1,
"fetch.wait.max.ms": 1,
Expand Down
26 changes: 11 additions & 15 deletions mojaloop/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6080,7 +6080,7 @@ central:
},
"rdkafkaConf": {
"client.id": "cep-con-notification-event",
"group.id": "notifier",
"group.id": "email-notifier",
"metadata.broker.list": "$kafka_host:$kafka_port",
"socket.blocking.max.ms": 1,
"fetch.wait.max.ms": 1,
Expand Down Expand Up @@ -6215,7 +6215,7 @@ central:
repository: bitnami/mongodb
tag: latest
pullPolicy: Always
command: "mongo mongodb://$mongo_username:$mongo_password@$mongo_host:$mongo_port/$mongo_database --eval \"db.adminCommand('ping')\""
command: "mongo mongodb://$mongo_host:$mongo_port --eval \"db.adminCommand('ping')\""

service:
name: central-event-processor
Expand Down Expand Up @@ -6290,9 +6290,7 @@ central:
PORT: 3080
mongo_host: '$release_name-mongodb'
mongo_port: 27017
mongo_username: mojaloop
mongo_database: mojaloop
mongo_password: password
central_ledger_admin_host: 'centralledger-service'
central_ledger_admin_port: 3001
central_ledger_api_host: 'centralledger-service'
Expand Down Expand Up @@ -6324,8 +6322,6 @@ central:
"mongo": {
"uri": "$mongo_host:$mongo_port",
"database": "$mongo_database",
"username": "$mongo_username",
"password": "$mongo_password",
"ruleCollection": "Rule",
"netDebitCapPositionCollection": "NDCPosition",
"actionCollection": "Actions",
Expand Down Expand Up @@ -6359,7 +6355,7 @@ central:
},
"rdkafkaConf": {
"client.id": "cep-con-notification-event",
"group.id": "notifier",
"group.id": "cep",
"metadata.broker.list": "$kafka_host:$kafka_port",
"socket.blocking.max.ms": 1,
"fetch.wait.max.ms": 1,
Expand Down Expand Up @@ -6445,20 +6441,20 @@ central:
## Enable authentication
## ref: https://docs.mongodb.com/manual/tutorial/enable-authentication/
#
usePassword: true
usePassword: false
# existingSecret: name-of-existing-secret

## MongoDB admin password
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#setting-the-root-password-on-first-run
##
mongodbRootPassword: adminpass
# mongodbRootPassword: adminpass

## MongoDB custom user and database
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#creating-a-user-and-database-on-first-run
##
mongodbUsername: mojaloop
mongodbPassword: password
mongodbDatabase: mojaloop
# mongodbUsername: mojaloop
# mongodbPassword: password
# mongodbDatabase: mojaloop


## Whether enable/disable IPv6 on MongoDB
Expand Down Expand Up @@ -6627,9 +6623,9 @@ central:
# setParameter:
# enableLocalhostAuthBypass: true
# # security options
# security:
# authorization: enabled
# #keyFile: /opt/bitnami/mongodb/conf/keyfile
# security:
# authorization: enabled
# keyFile: /opt/bitnami/mongodb/conf/keyfile

## Prometheus Exporter / Metrics
##
Expand Down

0 comments on commit 1153047

Please sign in to comment.