GitLab Quick Start
This Quick Start helps you to deploy a Highly Available GitLab cluster on on the Amazon Web Services (AWS) Cloud.
You can use the AWS CloudFormation templates included with the Quick Start to deploy GitLab in your AWS account in about 60-90 minutes. The Quick Start automates the following:
- Deploying GitLab into a new VPC
- Deploying GitLab into an existing VPC
- Deploying GitLab into an existing Amazon EKS cluster
You can also use the AWS CloudFormation templates as a starting point for your own implementation.
This Quick Start integrates GitLab with the following AWS services:
- AWS CloudFormation infrastructure as code GitLab deployment
- Amazon EKS HA kubernetes cluster
- Amazon RDS Postgres HA database cluster
- Amazon ElastiCache for Redis HA cache cluster
- Amazon S3 object storage
- Amazon CloudWatch integration for logs and metrics
- Amazon Route53 hosted zone for DNS configuration
- Amazon Simple Email Service for sending out email notifications
- AWS Certificate Manager integration for TLS certificates
For architectural details, best practices, step-by-step instructions, and customization options, see the deployment guide.
To post feedback, submit feature ideas, or report bugs, use the Issues section of this GitHub repo. If you'd like to submit code for this Quick Start, please review the AWS Quick Start Contributor's Kit.
General build sequence
-
Clone the repository and restore submodules:
# clone with submodules git clone --recurse-submodules https://github.com/aws-quickstart/quickstart-eks-gitlab.git # if repository is clonned already git submodule update --init --recursive
-
Build taskcat docker image with the following command:
docker build -t gitlab-taskcat .
-
In the folder with .tackcat.yml file:
docker run -it -v $(pwd):/src -v ${HOME}/.aws/credentials:/root/.aws/credentials:ro -v /var/run/docker.sock:/var/run/docker.sock gitlab-taskcat test run
Some comments about docker run parameters:
-
-v $(pwd):/src
– shares quickstart files with taskcat container -
-v ~/.aws:/root/.aws:ro
– pass AWS credentials to container, see below -
-v /var/run/docker.sock:/var/run/docker.sock
– to be able to build docker images used host DockerNOTE: In CI/CD environment you may want to use tools like dind or kaniko to build the images.
You have multiple options to share AWS credentials with the container:
-
Pass AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION as environment variables:
docker run -e AWS_ACCESS_KEY_ID=<access-key-id> -e AWS_SECRET_ACCESS_KEY=<secret-access-key> -e AWS_DEFAULT_REGION=<region> [rest of the parameters]
-
Mount your
.aws
folder and use profile name when you run taskcat:docker run -v ${HOME}/.aws/credentials:/root/.aws/credentials:ro [rest of the parameters] gitlab-taskcat –profile <my-profile> test run
Run docker image without parameters to get the help output. Some examples:
docker run gitlab-taskcat
docker run gitlab-taskcat test -h
docker run gitlab-taskcat test run -h