Ryan

What is Gitlab and Why Do I Love it as a Sys Admin?

Author: Ryan Jones on 04/22/2015

The character of an effective Systems Administrator requires adaptability, patience, and the willingness to continuously learn. We combine multiple skillsets to perform varied, never-ending, and ever-changing tasks. The tools at our disposal are in a constant state of flux, and we use everything available, to create the most stable, secure, and productive environments possible, for our coworkers, developers, and clients.

One recently adopted tool (whose use was spearheaded by our back-end developer Sean) is the Community Edition of Gitlab, a web-based Git repository manager, for our version control system. Up until this point, we had used Subversion for source control, which is much more monolithic, centralized, and (overall) easy to use and manage. This is especially true in a mixed Operating System environment. There are many contextual menus, and gui options for SVN on Windows platforms, in addition to this, installation and integration of the server is simple.
 
I assumed Git was like any other source-control system in functionality, however, I was attracted to its speed and performance. While its purpose is the same, the implementation is vastly different. The more I have learned about Git, the more I’ve learned to love it. It's decentralized by design, meaning each developer has the full repository and history at their disposal. Branching code is encouraged. If something works, it can be easily merged into production. If it doesn't work, it's just as easily discarded. The whole approach to development with Git version control is more flexible, collaborative, and robust. 
 
The Gitlab stack is bundled with several applications, but installation is simple. It has local users, but also integrates with LDAP, or Active Directory for centralized user management. 

The following is a quick guide to installing Gitlab, please note though that if this seems confusing, it's best to ask a professional System Administrator to help you out. 
 
Installation:
 
I chose Ubuntu to host Gitlab. There is a newer version, but these are the steps I followed at the time of install.
 
Download the Omnibus package:

wget https://downloads-packages.s3.amazonaws.com/ubuntu/gitlab_[version]
dpkg -i gitlab_[version]     
Use gitlab-ctl to configure, and check status.

gitlab-ctl reconfigure
gitlab-ctl status
run: logrotate: (pid 23785) 2078s; 
run: nginx: (pid 1066) 498997s;jk 
run: postgresql: (pid 1074) 498996s; 
run: redis: (pid 1077) 498996s; 
run: sidekiq: (pid 1067) 498997s; 
run: unicorn: (pid 1078) 498996s; 

 
Edit /etc/gitlab/gitlab.rb to configure LDAP, Active Directory, and email, and a host of other options. If you get stuck, gitlab maintains good documentation, so rtfm.

After that it's mostly configuration of repositories, which can be done through the web interface.