Deployment in AWS
Along with the Kubernetes cluster, 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 the 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 the 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.smallThe command returns the identifier of a created CloudFormation stack.
It takes 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-redisWhen the status is “CREATE_COMPLETE”, the resource is created.
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=secret123The command returns the identifier of a created CloudFormation stack.
It takes 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-auroraWhen the status is “CREATE_COMPLETE”, the resource is created.
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.