aws-quickstart/quickstart-mongodb

what is the purpose of orchestrator.sh when launching MongoDB to VPC

Jaspereclipse opened this issue · 1 comments

Hi,

A while ago I used your quick-start template to launch 3 MongoDB instances to a new VPC. Later on, I take a look at the scripts and find that the orchestrator.sh performs a lot of operations during stack creation to interact with DynamoDB. But after the creation, I did not see anything that has been created in DynamoDB in the same region.

So what's the purpose of using DynamoDB and when will the script be actually doing something?

Thanks!

vsnyc commented

Hi Juanyan,

The orchestrator.sh script is used to bootstrap the mongodb replica set. A new table is created at the beginning of installation. Mongodb nodes register their IP addresses in the table, the designated primary node uses that information to build the replica set. Once the replica setup is complete and tested, the primary mongodb node deletes the table by executing the following line in init_replica.sh:

./orchestrator.sh -d -n "${SHARD}_${UNIQUE_NAME}"

That is why you don't see any dynamodb table once the cluster is fully setup. The table exists for a few minutes while the cluster is being setup.

For further details, refer to the init_replica.sh script mentioned above.