Giter Club home page Giter Club logo

aws-gitlab-docker-compose's Introduction

AWS GitLab Docker Compose Setup

Provides an overview and instructions for deploying GitLab and GitLab Runner using Docker Compose. This setup includes GitLab for hosting your repositories and GitLab Runner for running your CI/CD pipelines.

Overview

The Docker Compose file contains two services:

  1. web: This service runs GitLab Community Edition (CE) and is configured to use an external URL with SSL termination handled externally (e.g., by a load balancer).
  2. gitlab-runner: This service runs GitLab Runner, which is used to execute your CI/CD jobs.

This setup is suitable for small to medium-sized teams that operates Gitlab behind an ELB load balancer.

Prerequisites

  • Docker and Docker Compose installed on your host machine.
  • AWS Application Load Balancer configured to handle SSL termination.
  • AWS Network Load Balancer configured to handle SSH traffic.
  • Domain name (gitlab.mydomain.com for GitLab and git.mydomain.com for SSH access).

Configuration

Before starting, ensure the following configurations are adjusted to fit your environment:

  • External URL: Set to your GitLab instance's domain (https://gitlab.mydomain.com).
  • GitLab SSH Host: Configured for SSH access (git.mydomain.com), ensure DNS is pointing to the same host.
  • Ports: 8088 is mapped to GitLab's internal port 80, and 2222 for GitLab SSH (make sure your external SSH setup points here if using a custom port).

Deployment

To deploy GitLab and GitLab Runner:

  1. Clone the Repository (if provided) or create a docker-compose.yml file with the content provided above.

  2. Start Services:

    Run the following command in the directory where your docker-compose.yml is located:

    docker-compose up -d
  3. Verify Deployment:

    After a few minutes, access GitLab by navigating to https://gitlab.mydomain.com. The first visit will prompt you to set up an admin password.

Registering GitLab Runner

To register the GitLab Runner with your GitLab instance:

  1. Obtain a registration token from GitLab:

    • Navigate to Admin Area > Overview > Runners in your GitLab instance.
  2. Register the runner:

Execute the following command, replacing YOUR_TOKEN_HERE with your registration token:

docker exec -it gitlab-runner gitlab-runner register \
   --url "http://web" \
   --token "glrt-qn8zVF-q_eg51xnY8PxC" \
   --executor "docker" \
   --docker-image "docker:20.10.7"

Notie that the --url parameter is set to http://web, which is the name of the GitLab service in the Docker Compose file.

Backup and Restore

Ensure regular backups, especially for production environments. Refer to GitLab's documentation for backup and restore procedures.

Maintenance

Regularly update your Docker images to the latest versions to receive security updates and new features:

docker-compose pull
docker-compose up -d

Troubleshooting

  • For issues related to GitLab, check the logs using docker logs gitlab-ce.
  • For runner-specific issues, use docker logs gitlab-runner.

Support

For additional help, refer to the GitLab official documentation or post questions on GitLab Forum.


This README provides a basic starting point. Adjust the content to match your specific setup, security practices, and operational procedures.

aws-gitlab-docker-compose's People

Contributors

vicenterusso avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.