#moveToGitLab

There’s been a lot of hub-bub about GitLab lately.  They’ve really set the bar recently and have been pumping out quality, best-of-breed features out the doors with their latest releases.  You might notice a monthly regularity to their releases…yes, that’s agile DevOps by a DevOps company!  Talk about doing what you preach!  Another exciting development is that GitLab has recently announced that GitLab Ultimate and Gold now free for education and open source in order to deliver additional flexibility.

Outside of their last few exciting releases, you might have heard something in the news about Microsoft buying a little start-up called GitHub.  That purchase certainly caused a stir in the open-source and development communities, and there’s a lot of momentum behind the #moveToGitLab, with plenty of good reason…

Commitment to Open-Source

We at Fierce SoftwareTM take great pride in supporting open-source.  We contribute to the community and even operate our own GitLab Enterprise Edition environment!  As open-source software becomes a larger part of our everyday lives, many developers find comfort in relying on an open-core platform like GitLab.

Vertically Integrated DevOps

Ever find yourself managing your repository environment, issue tracker, documentation and wiki, and continuous integration environments separately?  Now you don’t have to with GitLab, and you can cover all stages of the DevOps lifecycle from a centralized, enterprise-ready platform.  The integration between code repository, documentation management, issue tracking, and CI/CD is seamless with GitLab.

Ease of Use

You’ve got your development workflow already setup, migrating to another platform will take too long, cause too much disruption to development, there’ll be data loss, and a slew of other headaches, right?  Right?

Not with GitLab.  You can install GitLab into almost any environment within a matter of minutes and start collaborating in no time.  Since GitLab uses the same standardized Git SCM, you can use all the same tools, without changing your workflow.  Swap out a few git remote URLs and you’re done.

Importing your GitHub repositories?  That simply takes a few clicks and your files, changes, issues, history, and everything in between is imported.  There’s even a video showing how to migrate from GitHub to GitLab!

I like to move it, move it

Alright, so you’ve done your research, contacted and talked with your Partner Account Manager, read the text, watched the videos, done the dance, and now you’re ready to take the plunge!  Well, we recently have helped a customer do exactly that, and here’s how you can too…

Installing GitLab

There are a few different options to installing GitLab, be that in a container, from source, or with the OmniBus package.  For these purposes, we’re going to deploy to an AWS EC2 instance running Red Hat Enterprise Linux 7 with the OmniBus package.  There are a few steps that are important to remember…

  1. Provision Infrastructure
    1. Spin up an EC2 instance
    2. Setup FQDN with proper A records and with reverse DNS PTR records
    3. Set hostname on server
  2. Update server, setup firewall rules
  3. Install GitLab via OmniBus
  4. Reconfigure GitLab for Let’s Encrypt SSL

Now, it’s important to create the FQDN and to set the hostname on the server BEFORE installing GitLab via OmniBus as it will configure the web interface to the set hostname.  Once that is set, we can install GitLab via the OmniBus which will take just a few minutes.  Once the installer is complete and before we load the GitLab web panel, let’s enable HTTPS support for some added security.  To do so, we’ll modify the GitLab configuration file and run a reconfigure command…

$ sudo nano /etc/gitlab/gitlab.rb

In that file, you’ll find a section for Let’s Encrypt and we need to set two variables…

################################################################################
# Let's Encrypt integration
################################################################################
letsencrypt['enable'] = true
letsencrypt['contact_emails'] = ['your_email@example.com'] # This should be an array of email addresses to add as contacts

Then we’ll just run…

$ sudo gitlab-ctl reconfigure

It might fail on the first pass of the Lets Encrypt provisioning…just come back a while later and try again.  It will request the secured domain in a challenge and if you just recently set up that DNS entry for the FQDN, it might just need a few minutes to propagate.

Configuring GitLab, Users, and Groups

Now that we’ve got this shiny new GitLab server up and running, let’s get some things set up.  Of course, there are projects to create, groups to set up, and users to provision but aside from that a few notable things to set up are…

  • Sign-up restrictions – In case this is more of a private party
  • Terms of Service & Privacy Policy – Cross your eyes and dot your tees on the whole GDPR bit
  • Continuous Integration and Deployment – Get your AutoDevOps on

Importing from GitHub + Others

Now that we’ve got things up and running, our teams and new projects are now living happily under one roof with GitLab.  What about importing existing code repositories, issues, wiki pages, and all of the other components involved?

All you have to do is Create a New Project, and within a few clicks, everything is imported.  You can see a few of the current import options below.

GitLab - Create Project & Import

Create a project in GitLab and import your current work

Conclusion

So now we’ve got GitLab installed, configured, and imported all our data, we have officially completed our #moveToGitLab.

This isn’t the only way to go about provisioning a GitLab environment.  There are many other ways of deploying GitLab, be that with containers on-premise, installed via OmniBus on a cloud server like we did, or even maybe via the PaaS offered at GitLab.com.   That’s all before even getting into the integrations and using it as a complete DevOps CI/CD platform!

As confusing as it may be, our account teams and engineers, along with our partners at GitLab, can find you the right solution to meet your development needs.  Simply need a centralized repository management platform?  No problem.  Want a fully vertically integrated DevOps CI/CD powerhouse?  We can do that too.

We’ll be more than happy to get you started on your digital transformation with an enterprise DevOps platform like GitLab.  Simply drop us a line and contact us for the fastest response in the land!