Self-Hosting GitLab
In this guide, we’ll go through a single-node setup of GiLab on AWS.
AWS Services Needed
- Virtual Private Cloud (VPC)
- Elastic Cloud Compute (EC2)
- Simple Storage Service (S3)
- Redis Cache
- Relational Database Service (RDS)
- Elastic Load Balancer (ELB)
- Route 53
- Certificate Manager
‼️ make sure you have admin privileges for these services ‼️
Let's get started
Follow this 👉 Guide and refer this doc for minor changes that have been used for out particular deployment.
Changes
Bastion Host
We do not need to create two bastion hosts for our purpose. Only one will suffice.
Install GitLab
- During the EC2 instance creation, allocate
100 GB
storage. - Create a new security group
gitlab-instance
. AllowHTTP
,HTTPS
andSSH
from the load balancer. Also allowSSH
from the bastion host.
RDS Security Group
Allow connections from gitlab-instance
security group only.
Redis Security Group
Allow connections from gitlab-instance
security group only.
Gitaly Setup
❌ Skip this step
Auto Scaling Setup
❌ Skip this step
Gitlab Runner
Deploy gitlab runner within the GitLab EC2 instance only.