Deploy a DSS instance on Amazon Web Services via terraform¶
This terraform module creates a Kubernetes cluster in Amazon Web Services using the Elastic Kubernetes Service (EKS) and generates the tanka files to deploy a DSS instance.
Getting started¶
Prerequisites¶
Download & install the following tools to your workstation:
- Install terraform.
- Install tools from Prerequisites
- Install AWS specific tools:
- Install and initialize AWS CLI.
- Confirm successful installation with
aws --version.
- Confirm successful installation with
- If you don't have an account, sign-up: https://aws.amazon.com/free/
- Configure terraform to connect to AWS using your account.
- We recommend to create an AWS_PROFILE using for instance
aws configure --profile aws-interuss-dssBefore runningterraformcommands, run once in your shell:export AWS_PROFILE=aws-interuss-dssOther methods are described here: https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication-and-configuration
- We recommend to create an AWS_PROFILE using for instance
Deployment of the Kubernetes cluster¶
Paths in the documentation
In the documentation, we often refer to path starting from the root (prefixed with /). This is to indicate that the path is relative to the root of the repository.
- Create a new folder in
/deploy/infrastructure/personal/for the deployment named for example:terraform-aws-dss-dev - From
/deploy/infrastructure/modules/terraform-aws-dss, copymain.tf,output.tf,variables.gen.tfandterraform.dev.example.tfvarsto the infrastructure personal folder. - In the infrastructure personal folder (eg /deploy/infrastructure/personal/terraform-aws-dss-dev):
- Rename
terraform.dev.example.tfvarstoterraform.tfvars. - Check that the directory contains the following files:
- main.tf
- output.tf
- terraform.tfvars
- variables.gen.tf
- Set the variables in
terraform.tfvarsaccording to your environment.- See TFVARS.gen.md for variables descriptions.
- See authentication documentation for additional information.
- Initialize terraform:
terraform init. - Run
terraform planto check that the configuration is valid. It will display the resources which will be provisioned. - Run
terraform applyto deploy the cluster. (This operation may take up to 15 min.)
- Rename
- Configure the DNS resolution according to these instructions:
If your DNS zone is managed on the same account, it is possible to instruct terraform to create and manage it with the rest of the infrastructure.
For Elastic Kubernetes Service (AWS), create the zone in your aws account and set the aws_route53_zone_id
variable with the zone id. Entries will be automatically created by terraform.
Note that the domain or the sub-domain managed by the zone must be properly delegated by the parent domain.
See instructions for subdomains delegation
If DNS entries are managed manually, set them up manually using the following steps:
1. Retrieve IP addresses and expected hostnames: terraform output
Example of expected output:
crdb_addresses[*].expected_dns
- gateway_address.expected_dns
3. Create the entries for SSL certificate validation according to the information provided
in gateway_address.certificate_validation_dns.
Next steps¶
Proceed to pooling configuration.