Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mojaloop/#3129)!: seperate mongodb uri config #945

Merged
merged 11 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ jobs:
echo $! > /tmp/int-test-service.pid
PID=$(cat /tmp/int-test-service.pid)
echo "Service started with Process ID=$PID"

## Check Service Health
echo "Waiting for Service to be healthy"
bash .circleci/curl-retry-cl-health.sh

## Lets wait a few seconds to ensure that Kafka handlers are rebalanced
echo "Waiting ${WAIT_FOR_REBALANCE}s for Kafka Re-balancing..." && sleep $WAIT_FOR_REBALANCE

Expand Down Expand Up @@ -290,10 +290,11 @@ jobs:
- run:
name: Download the mojaloop/ml-core-test-harness repo
command: |
git clone --depth 1 --branch v0.0.2 https://github.com/mojaloop/ml-core-test-harness.git /tmp/ml-core-test-harness
git clone --depth 1 --branch v0.0.3 https://github.com/mojaloop/ml-core-test-harness.git /tmp/ml-core-test-harness
- run:
name: Execute TTK functional tests
command: |
cp ./docker/config-modifier/configs/central-ledger.js /tmp/ml-core-test-harness/docker/config-modifier/configs/central-ledger.js
cd /tmp/ml-core-test-harness
export CENTRAL_LEDGER_VERSION=local
docker-compose --project-name ttk-func --ansi never --profile all-services --profile ttk-provisioning --profile ttk-tests up -d
Expand Down
6 changes: 5 additions & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
"MONGODB": {
"DISABLED": true,
"DEBUG": false,
"URI": "mongodb://localhost:27017/mlos"
"HOST": "localhost",
"PORT": 27017,
"USER": "",
"PASSWORD": "",
"DATABASE": "mlos"
},
"ERROR_HANDLING": {
"includeCauseExtension": true,
Expand Down
7 changes: 6 additions & 1 deletion docker/central-ledger/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
},
"MONGODB": {
"DISABLED": false,
"URI": "mongodb://objstore:27017/mlos"
"DEBUG": false,
"HOST": "objstore",
"PORT": 27017,
"USER": "",
"PASSWORD": "",
"DATABASE": "mlos"
},
"ERROR_HANDLING": {
"includeCauseExtension": true,
Expand Down
140 changes: 140 additions & 0 deletions docker/config-modifier/configs/central-ledger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
module.exports = {
HOSTNAME: 'http://central-ledger',
DATABASE: {
HOST: 'mysql'
},
MONGODB: {
DISABLED: false,
DEBUG: false,
HOST: 'objstore',
PORT: 27017,
USER: '',
PASSWORD: '',
DATABASE: 'mlos'
},
KAFKA: {
CONSUMER: {
BULK: {
PREPARE: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
PROCESSING: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
FULFIL: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
GET: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
},
TRANSFER: {
PREPARE: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
GET: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
FULFIL: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
POSITION: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
},
ADMIN: {
TRANSFER: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
}
},
PRODUCER: {
BULK: {
PROCESSING: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
},
TRANSFER: {
PREPARE: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
FULFIL: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
POSITION: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
},
NOTIFICATION: {
EVENT: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
},
ADMIN: {
TRANSFER: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
}
}
}
}
Loading