https://github.com/bnorm/datasite-poc-garden
https://github.com/bnorm/datasite-poc-garden
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bnorm/datasite-poc-garden
- Owner: bnorm
- Created: 2020-10-28T03:37:25.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-12T22:49:24.000Z (over 5 years ago)
- Last Synced: 2025-02-10T23:57:14.324Z (over 1 year ago)
- Language: Kotlin
- Size: 739 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Architecture

# Port configuration
|application|port|
|---|---|
|gardening-service|9000|
|iot-gateway|9010|
|iot-simulator|9011|
|processor-service|9020|
|reporting-service|9030|
|reporting-ui|9031|
### MongoDB configuration
After starting the Docker compose file, run the following commands to
configuration the Debezium connection to MongoDB.
Configure the replication set in MongoDB:
```shell
docker-compose exec mongo /bin/bash -c 'mongo localhost:27017/datasite-poc <<-EOF
rs.initiate({
_id: "rs0",
"version" : 1,
members: [
{ _id: 0, host: "localhost:27017" }
]
});
EOF'
```
Connection Debezium to MongoDB.
```shell
curl -i -X POST \
-H "Accept:application/json" \
-H "Content-Type:application/json" \
http://localhost:8083/connectors/ \
-d '{
"name": "mongodb_connector",
"config": {
"connector.class" : "io.debezium.connector.mongodb.MongoDbConnector",
"tasks.max" : "1",
"mongodb.hosts" : "rs0/mongo:27017",
"mongodb.name" : "mongo",
"mongodb.members.auto.discover" : false,
"collection.whitelist" : "datasite-poc.*",
"provide.transaction.metadata" : true,
"database.history.kafka.bootstrap.servers" : "kafka:9092"
}
}'
```
### IntelliJ HTTP Requests
Create a `http-client-private.env.json` file in the project root directory with
the following template:
```json
{
"": {
"user_id": ""
}
}
```
Replace `` and the `` values with appropriate
values. For example, you could replace with `local` and `john` respectively.