https://github.com/rnzsgh/fargate-documentdb-compute-poc
Simple example using Fargate and DocumentDB for batch compute
https://github.com/rnzsgh/fargate-documentdb-compute-poc
batch cloudformation compute documentdb fargate go
Last synced: 5 months ago
JSON representation
Simple example using Fargate and DocumentDB for batch compute
- Host: GitHub
- URL: https://github.com/rnzsgh/fargate-documentdb-compute-poc
- Owner: rnzsgh
- Created: 2019-01-10T20:24:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-02T13:19:45.000Z (about 7 years ago)
- Last Synced: 2024-06-21T02:15:59.338Z (almost 2 years ago)
- Topics: batch, cloudformation, compute, documentdb, fargate, go
- Language: Go
- Homepage:
- Size: 206 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Overview
The purpose of this [POC](https://en.wikipedia.org/wiki/Proof_of_concept) is to showcase using [Amazon DocumentDB (with MongoDB compatibility)](https://aws.amazon.com/documentdb/) with [AWS Fargate](https://aws.amazon.com/fargate/) to perform batch compute operations on data persisted in the database.
**Note:** You must have the new [ARN format and resource ID format](https://aws.amazon.com/ecs/faqs/#Transition_to_new_ARN_and_ID_format) enabled before launching the [AWS CloudFormation](https://aws.amazon.com/cloudformation/) template in order to support tags ([blog post](https://aws.amazon.com/blogs/compute/migrating-your-amazon-ecs-deployment-to-the-new-arn-and-resource-id-format-2/)).
To test the job manager locally (this repo), set the following environment variables (must match your deployed cluster):
```
export DOCUMENT_DB_ENDPOINT=localhost
export DOCUMENT_DB_PORT=27017
export DOCUMENT_DB_USER=test
export DOCUMENT_DB_PASSWORD=test
export DOCUMENT_DB_PEM=/FULL_PATH/fargate-documentdb-compute-poc/local.pem
export LOCAL=true
```
To test locally with MongoDB 3.6.9, you can use the following commands:
Run the database:
```
mongod --sslMode requireSSL --sslPEMKeyFile /FULL_PATH/fargate-documentdb-compute-poc/local.pem
```
Access the database locally via the shell:
```
mongo --host localhost --port 27017 --ssl --sslPEMKeyFile=/FULL_PATH/fargate-documentdb-compute-poc/local.pem --sslAllowInvalidCertificates --sslAllowInvalidHostnames
```