Deployment in AWS
Along with the Kubernetes cluster, the GoodData.CN requires the following AWS resources:
- ElastiCache cluster (with Redis interface)
- Aurora RDS (Postgres family)
Before you start deploying these services, ensure that you know the name of the CloudFormation stack
that was generated and deployed during the initial EKS deployment using eksctl
tool.
The name of the stack is usually eksctl-<name>-cluster
, where <name>
is the name that you gave to the EKS cluster when you created it.
If you are unsure about the stack name, you can get it from the AWS console or by using aws cloudformation describe-stacks --query 'Stacks[*].StackName'
.
ElastiCache Cluster
Use elasticache-redis.yaml
CloudFormation template to deploy ElastiCache.
You must add the following parameters to the template:
- ParentVPCStack (
eksctl-<name>-cluster
) - EngineVersion (Redis version, defaults to 5.0.4)
- CacheNodeType (one of the supported instance sizes, defaults to cache.t2.micro)
Use the following command to provision the service:
aws cloudformation create-stack --stack-name gooddata-cn-cache-redis \
--template-body file://elasticache-redis.yaml \
--parameters \
ParameterKey=ParentVPCStack,ParameterValue=eksctl-<name>-cluster \
ParameterKey=CacheNodeType,ParameterValue=cache.t2.small
Command returns the identifier of a created CloudFormation stack.
It takes about several minutes to create resources. You can watch progress in the AWS console, or by using aws-cli:
aws cloudformation wait stack-create-complete --stack-name gooddata-cn-cache-redis
And check that status is “CREATE_COMPLETE”.
aws cloudformation describe-stacks --stack-name gooddata-cn-cache-redis \
--query 'Stacks[0].StackStatus'
Note: Ensure that you note down the name of the CloudFormation stack for ElastiCache cluster
(gooddata-cn-cache-redis
in this example), you will need it later.
RDS Aurora
Use the rds-aurora.yaml
CloudFormation template to deploy RDS.
You must add following parameters to the template:
- ParentVPCStack (
eksctl-<name>-cluster
) - DBUsername (username for database access, defaults to
postgres
) - DBPassword (password of the DB user)
- DBInstanceType (one of the supported instance sizes, defaults to db.r4.large)
- DBEngineVersion (version of the PostgreSQL engine, defaults to 11.6)
Use the following command to provision the service:
aws cloudformation create-stack --stack-name gooddata-cn-md-aurora \
--template-body file://rds-aurora.yaml \
--parameters \
ParameterKey=ParentVPCStack,ParameterValue=eksctl-<name>-cluster \
ParameterKey=DBPassword,ParameterValue=secret123
Command returns the identifier of a created CloudFormation stack.
It takes about several minutes to create resources. You can watch progress in the AWS console, or by using aws-cli:
aws cloudformation wait stack-create-complete --stack-name gooddata-cn-md-aurora
And check that status is “CREATE_COMPLETE”.
aws cloudformation describe-stacks --stack-name gooddata-cn-md-aurora \
--query 'Stacks[0].StackStatus'
Note: Ensure that you note down the name of the RDS stack (gooddata-cn-md-aurora
in this example), you will need it later.