GitLab

GitLab is a database-backed web application to manage Git repositories on-premises.

  • Manage Git repositories with fine grained access controls
  • Perform code reviews and enhance collaboration with merge requests
  • Activity feeds
  • Issue tracking
  • Wiki
  • LDAP/AD integration
  • Completely free and open source

Gitlab comes in three variations (compare them here)

  • Community Edition (own server)
  • Enterprise Edition (own server)
  • Hosted GitLab

GitLab comes with GitLab CI, an easy to use continuous integration and deployment tool. GitLab CI is a web application with an API that stores its state in a database. It manages projects/builds and provides a nice user interface. It uses the GitLab application API to authenticate its users.

GitLab Runner is an application which processes builds. It can be deployed separately and works with GitLab CI through an API.

Community installation method

We are going to install the image made by Sameer Naik based on the source installation method. Pull the image from the docker index. This is the recommended method of installation as it is easier to update image. These builds are performed by the Docker Trusted Build service.

docker pull sameersbn/gitlab:7.10.4

The quickest way to get started is using docker-compose.

# Install Compose
curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
 
# Download needed docker-compose file
wget https://raw.githubusercontent.com/sameersbn/docker-gitlab/master/docker-compose.yml
 
# Please allow a couple of minutes for the GitLab application to start
docker-compose up

Point your browser to http://localhost:10080 and login using the default username and password:

  • username: root
  • password: 5iveL!fe

You should now have the GitLab application up and ready for testing.

Import existing repositories

GitLab can create projects for your repos automatically:

Copy bare repositories to /home/git/repositories
Run bundle exec rake gitlab:import:repos RAILS_ENV=production

More info can be found here.


Leave a Reply