AWS Terraform
The deployment consists of a few docker containers, database for storing metadata, and persistent file storage for storing files
This document contains instructions to deploy Datagrok using Terraform on AWS ECS cluster with AWS RDS and AWS S3.
We considered a lot of typical security nuances during the Terraform code development. As a result, you will create a Datagrok infrastructure in AWS that applies to all standard security policies.
More information about Datagrok design and components:
Basic usage
Prerequisites
-
Check that you have required permissions on AWS account to perform Terraform deployment to ECS. The
cloudformation
permissions are optional. -
Check that you have required S3 permissions and DynamoDB permissions
-
Come up with two endpoints:
DATAGROK_DNS
,CVM_DNS
. Datagrok requires two endpoints:DATAGROK_DNS
andCVM_DNS
. Users will useDATAGROK_DNS
to access Datagrok Web UI, and requestsCVM_DNS
will be sent automatically by Datagrok Client.
Deploy Datagrok components
-
Download Terraform Template: link .
-
Replace the placeholders in the template with the actual values
- SET_YOUR_S3_BUCKET_FOR_TERRAFORM_STATE - the unique S3 bucket name to store Terraform state
- SET_YOUR_REGION - target region to create Datagrok Infrastructure
-
Apply Terraform code
terraform init --upgrade
terraform apply -target module.datagrok_core
terraform apply -target module.datagrok_cvm -
After the Datagrok container starts, the Datagrok server will deploy the database. You can check the status by checking the running task log in CloudWatch
Configure Datagrok settings
-
Go into the web browser to
DATAGROK_DNS
, login to Datagrok using usernameadmin
and unique password, which was generated during terraform run. You can find it in theGROK_PARAMETERS
environment variable in the datagrok task definition. -
Edit settings in the Datagrok (Tools | Settings...). Remember to click Apply to save new settings.
- Scripting:
- CVM URL Client:
https://<CVM_DNS>
- CVM URL Client:
- Dev:
- CVM Url:
https://<CVM_DNS>
- CVM Url:
- Scripting:
Advanced usage
The Terraform code is highly configurable. Feel free to adapt the code and variables to meet your needs and requirements. Terraform modules documentation: