datasite-poc-garden

Stars
2

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:

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.

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:

{
  "<environment name>": {
    "user_id": "<user name>"
  }
}

Replace <environment name> and the <user name> values with appropriate values. For example, you could replace with local and john respectively.