Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering GitLab 12
Mastering GitLab 12

Mastering GitLab 12: Implement DevOps culture and repository management solutions

eBook
$24.99 $35.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Mastering GitLab 12

Introducing the GitLab Architecture

Understanding the context of the GitLab project will help us to appreciate the choices that were made with regard to the design of the GitLab workflow. The GitLab project started out as a small, open source project, and has grown to be an organization of 400 people and thousands of volunteers. It is currently available in two versions, a free Community Edition (CE) and an Enterprise Edition (EE) with a proprietary license. There are several tiers of support for the enterprise version. Although it is proprietary licensed, the source code for that version is publicly available from GitLab.

To master GitLab, it is necessary to have a solid understanding of its individual components. In this chapter, we will look at the basic components of a GitLab installation, paying special attention to GitLab Continuous Integration (CI) and the accompanying...

Technical requirements

To follow along with the instructions in this chapter, please download the Git repository with examples, commands and instructions, available at GitHub: https://github.com/PacktPublishing/Mastering-GitLab-12/tree/master/Chapter01. Look in the Readme.md file for a general explanation of the content of the directory.

To run or install software used in this chapter you need one of the following platforms:

  • Debian 10 Linux codename 'Buster'
  • CentOS 7.x or RHEL (Red Hat Enterprise Linux) 7.x
  • macOS Sierra or later

The origins of GitLab

The story began in 2011, when Dimitri Zaporozhets, a web programmer from Ukraine, was faced with a common problem. He wanted to switch to Git for version management and GitHub to collaborate, but that was not allowed in his company. He needed a tool that did not hinder him in developing code and was easy to use. Like many developers, he had issues with the collaboration tool that he was obliged to use. To get around those issues, he created his side project in Ruby on Rails: GitLab. Together with his colleague, Valery Sizov, he developed this project alongside his regular work.

After this initiative, the project grew enormously:

Date

Fact

2011

Sytze Sybrandij, the future CEO of GitLab, is impressed by the GitLab project and code, and offers Zaporozhets the opportunity to try to commercialize it via https://about.gitlab.com/.

2012

GitLab...

Exploring GitLab editions – CE and EE

The core of the GitLab software is called the CE. It is distributed under the MIT license, which is a permissive free software license created at the Massachusetts Institute of Technology. You are allowed to modify the software and use it in your creations.

No feature that ever made it to CE will ever be removed, or moved to a closed source version. When GitLab EE was created in 2013, it was, at its core, GitLab CE, but it had additional enterprise features, such as Lightweight Directory Access Protocol (LDAP) groups. Those features are not open source, per se, but can be added to the core version if they are perceived by the company as a core feature. The idea was that companies should also contribute as much as possible to solving problems and creating new features.

In 2016, the GitLab EE product was divided into three tiers: Starter...

The core system components of GitLab

GitLab is not a monolithic application. It tries to follow the Unix philosophy, which means that a software module should do only one particular thing, and do it well. The components that GitLab is made of are not as small and elegant as Unix's awk and sed, but each component has a single purpose. You can find a high-level overview of these components in the following diagram:

Gitlab started as a pure Ruby on Rails application, but some components were later redesigned using Go. Ruby on Rails is a development framework built on top of the Ruby programming language. It implements a model-view-controller pattern and offers methods to connect to different databases (for example, ActiveRecord). It values convention over configuration and don't-repeat-yourself (DRY) programming. It is very well suited to rapid development, and at the...

GitLab CI

GitLab CI is a feature that helps perform the Continuous Integration (CI) of software components. When several developers work together using a versioning system, problems can arise when changes made by one developer break the product as a whole. The best way to make sure this happens less often, or at least early in the process, is to use integration tests more frequently, hence the name continuous.

GitLab CI was launched as a standalone project in 2013, but was later integrated into the main GitLab package. Combined with the GitLab Runner software, this feature has been very popular with developers and is an important driver of the business. It also enabled GitLab to build their product into a solution that not only does CI, but even continuous delivery up to production environments. The current product vision for GitLab is to serve as a complete DevOps life cycle...

GitLab Runners

GitLab Runners were originally developed by Kamil Trzciński in 2015. They're now one of the most popular features of GitLab.

The initial GitLab-CI-Runner was a very simple application written in Ruby, but worked well in quite basic setups. You can think of it as a reference implementation of what a bare runner could look like.

Issues with the old runner

The main problem with the old runner is that it could only run one concurrent job at a time. If you wanted to run more, you could either set up a new server or create an additional user to build jobs.

Secondly, it always ran projects on the server shell. This made it really hard to test projects using different versions of Ruby or any other dependencies...

Cloud native

Toward the end of 2016 and at the start of 2017, there was a public debate in the GitLab community about whether reverting back from the cloud to bare metal would be cost-effective for GitLab.com. At the time, the filesystem used for repositories was Ceph. The performance of that distributed filesystem was not good enough to handle GitLab.com. They asked the community for advice and received a lot of feedback from people who experienced similar moves firsthand. In the end, the decision was made to stay in the cloud (https://about.gitlab.com/2017/03/02/why-we-are-not-leaving-the-cloud/). Instead, GitLab would focus on creating a solution, not on the filesystem level, but making sure that Git input/output (I/O) behavior is better managed at the application level. This can be seen as the birth of the Gitaly component. Sid Sijbrandij emphasized the importance of being...

Summary

In this chapter, we have learned about the people and the organization behind GitLab. Starting from the beginning, we have shown you how the project has developed over the years. We went through the core components of GitLab and how to install them. For some components, we included ways to debug the installation.

We also gave a brief introduction to GitLab CI and the client programs that interact with it, such as GitLab Runner. We showed you why this feature is so important and how it is perceived by the IT industry.

In the next chapter, we will install and configure GitLab on different kinds of systems. If you're new to the product, prepare to be amazed!

Questions

  1. When and by whom was GitLab initially developed?
  2. How is GitLab funded?
  3. Name all the programming languages that are used in the GitLab software.
  4. Which licenses are used by GitLab?
  5. Why are they using these licenses?
  6. Name the core components of GitLab.
  7. How many offices does GitLab have?
  8. What is stored in Redis?
  9. What has Gitaly replaced?
  10. Which cloud service was chosen by GitLab to focus on in 2018?

Further reading

...
Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Delve into GitLab's architecture, and install and configure it to fit your environment
  • Learn about the underlying principles of Agile software development and DevOps
  • Explore Gitlab's features to manage enterprise cloud-native applications and services

Description

GitLab is an open source repository management and version control toolkit with functions for enterprises and personal software projects. It offers configurability options, extensions, and APIs that make it an ideal tool for enterprises to manage the software development life cycle. This book begins by explaining GitLab options and the components of the GitLab architecture. You will learn how to install and set up GitLab on-premises and in the cloud, along with understanding how to migrate code bases from different systems, such as GitHub, Concurrent Versions System, Team Foundation Version Control, and Subversion. Later chapters will help you implement DevOps culture by introducing the workflow management tools in GitLab and continuous integration/continuous deployment (CI/CD). In addition to this, the book will guide you through installing GitLab on a range of cloud platforms, monitoring with Prometheus, and deploying an environment with GitLab. You'll also focus on the GitLab CI component to assist you with creating development pipelines and jobs, along with helping you set up GitLab runners for your own project. Finally, you will be able to choose a high availability setup that fits your needs and helps you monitor and act on results obtained after testing. By the end of this book, you will have gained the expertise you need to use GitLab features effectively, and be able to integrate all phases in the development process.

Who is this book for?

If you are a software developer, DevOps professional, or any developer who wants to master GitLab for productive repository management in your day-to-day tasks, this book is for you. Basic understanding of the software development workflow is assumed.

What you will learn

  • Install GitLab on premises and in the cloud using a variety of configurations
  • Conduct data migration from the SVN, TFS, CVS, and GitHub platforms to GitLab
  • Use GitLab runners to develop different types of configurations in software development
  • Plan and perform CI/CD by using GitLab features
  • Monitor and secure your software architecture using Prometheus and Grafana
  • Implement DevOps culture by introducing workflow management tools in GitLab

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 02, 2019
Length: 608 pages
Edition : 1st
Language : English
ISBN-13 : 9781789531282
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Aug 02, 2019
Length: 608 pages
Edition : 1st
Language : English
ISBN-13 : 9781789531282
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 219.97
Mastering GitLab 12
$48.99
GitLab Quick Start Guide
$32.99
Hands-On Auto DevOps with GitLab CI
$137.99
Total $ 219.97 Stars icon

Table of Contents

29 Chapters
Section 1: Install and Set Up GitLab On-Premises or in the Cloud Chevron down icon Chevron up icon
Introducing the GitLab Architecture Chevron down icon Chevron up icon
Installing GitLab Chevron down icon Chevron up icon
Configuring GitLab Using the Web UI Chevron down icon Chevron up icon
Configuring GitLab from the Terminal Chevron down icon Chevron up icon
Section 2: Migrating Data from Different Locations Chevron down icon Chevron up icon
Importing Your Project from GitHub to GitLab Chevron down icon Chevron up icon
Migrating from CVS Chevron down icon Chevron up icon
Switching from SVN Chevron down icon Chevron up icon
Moving Repositories from TFS Chevron down icon Chevron up icon
Section 3: Implement the GitLab DevOps Workflow Chevron down icon Chevron up icon
GitLab Vision - the Whole Toolchain in One Application Chevron down icon Chevron up icon
Create Your Product, Verify, and Package it Chevron down icon Chevron up icon
The Release and Configure Phase Chevron down icon Chevron up icon
Monitoring with Prometheus Chevron down icon Chevron up icon
Integrating GitLab with CI/CD Tools Chevron down icon Chevron up icon
Section 4: Utilize GitLab CI and CI Runners Chevron down icon Chevron up icon
Setting Up Your Project for GitLab Continuous Integration Chevron down icon Chevron up icon
Installing and Configuring GitLab Runners Chevron down icon Chevron up icon
Using GitLab Runners with Docker or Kubernetes Chevron down icon Chevron up icon
Autoscaling GitLab CI Runners Chevron down icon Chevron up icon
Monitoring CI Metrics Chevron down icon Chevron up icon
Section 5: Scale the Server Infrastructure (High Availability Setup) Chevron down icon Chevron up icon
Creating a Basic HA Architecture Using Horizontal Scaling Chevron down icon Chevron up icon
Managing a Hybrid HA Environment Chevron down icon Chevron up icon
Making Your Environment Fully Distributed Chevron down icon Chevron up icon
Using Geo to Create Distributed Read-Only Copies of GitLab Chevron down icon Chevron up icon
Assessments Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.1
(7 Ratings)
5 star 28.6%
4 star 0%
3 star 0%
2 star 0%
1 star 71.4%
Filter icon Filter
Top Reviews

Filter reviews by




Maanas baijal Nov 05, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great Book with tons of details.
Amazon Verified review Amazon
Merrill Indeck Oct 23, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Well written to enable the reader to understand and educate oneself . Increased my knowledge tremendously.
Amazon Verified review Amazon
Dewey Marx Feb 04, 2020
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
You will spend hours setting up configuration before you get to the learning section of this book. There are all kinds of uncertainties when you get to the unicorn section of this book. The author never tells you which files to configure or edit, where to run your commands, how to setup on different operating systems other than the basic install commands.Here's an example of how inconsistent this is. In the unicorn section, the writer tells you to wget a unicorn.conf.rb file and then edit it. Yet he doesn't even tell you that you have to edit the file which you just downloaded to your gitlabb-app directory. He just writes, let's start by making a variable which happens to look like a bash variable. Then when you figure out that you're editing the conf file you just downloaded, you see that he has inconsistent casing for the APP_PATH var. Then he has you run a unicorn command for which you have no idea where it should be ran from. This is just lazy technical writing. I wish i hadn't spent my money on this lousy book.
Amazon Verified review Amazon
A. J. Firmin Dec 18, 2021
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
I returned it, it should have been called “Very Basic Gitlab”.
Amazon Verified review Amazon
dave_g22 Mar 12, 2020
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Kein roter Faden. Alles wirkt sinnlos zusammenkopiert. Tiefer gehende Informationen oder allg. mal eine Erläuterung zu auch nur irgend etwas in dem Buch sucht man vergebens. Hab das Buch zurück geschickt. Das schlechteste Computerbuch, dass ich in der letzten Dekade gelesen habe!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.