- An AWS account
- the AWS CLI v2.7.0/v1.24.0 or newer, installed and configured
- AWS IAM Authenticator
Uncomment and replace variables in terraform.tfvars with the desired values. Check variables.tf for default values.
From inside the ./aws directory of this project:
- Run
terraform init. This will initialize the terraform project. - Run
terraform plan. This will perform a dry run and find any problems with your configuration. - Run
terraform apply. This will deploy the cluster to AWS. Type 'yes' at the prompt.
It will take a few minutes to deploy the cluster. When finished, you will be greeted with a success message. Next, deploy Sourcegraph.
To manage your cluster, you can use the kubectl command line tool, which you'll need to configure cluster access for.
- Set your env variables:
export REGION=<region code for your cluster> export CLUSTER_NAME=<the name of your cluster on GCP or AWS>
- Run the following command:
aws eks update-kubeconfig --region $REGION --name $CLUSTER_NAME
- Run
kubectl config current-contextto make surekubectlis pointing to your EKS cluster.
- Run
terraform destroy. Answer yes at the prompt.
!!!WARNING these rds instances are insecure and should not be used in production, or with sensitive data. Do not load private repo!!!
To provision seperate RDS databases for each DB run terraform apply -var='create_rds_dbs=true'. For a single RDS instance to be configured with all dbs run terraform apply -var='create_rds_single_db=true'.