Skip to content
ImagineWorld

Mastering GitLab 12

node_idnode-book_mastering-gitlab-12
node_typenode-book
schema_profileworld.node_book.v1
statusactive
orthogonal_scopemanifold, entropy, authority, state
manifoldworld
entropymedium
authorityinforms
stateexternal
domainimagineworld.net
node_interiorrosetta_contract
unisonone evidence claim read five ways: seated in the platforms field, the work masters GitLab — the DevOps platform from repositories to pipelines to deployment — its framework, regime, and stance agreeing on what it is
governed_byWORLD-MANIFOLD
constitutional_citationCONSTITUTION
peer_node_books
book_titleMastering GitLab 12
book_authorJoost Evertse
book_publisherPackt Publishing
book_year2019
total_chapters22
updated_at2026-10-14T05:45:17Z
book_copyrightCopyright © 2019 Packt Publishing
book_isbn9781789531282
local graph

node-book_mastering-gitlab-12_chapter-01-introducing-the-gitlab-architecture — Introducing the GitLab Architecture

node-book_mastering-gitlab-12_chapter-02-installing-gitlab — Installing GitLab

node-book_mastering-gitlab-12_chapter-03-configuring-gitlab-using-the-ui — Configuring GitLab Using the UI

node-book_mastering-gitlab-12_chapter-04-configuring-gitlab-from-the-terminal — Configuring GitLab from the Terminal

node-book_mastering-gitlab-12_chapter-05-importing-your-project-from-github-to-gitlab — Importing Your Project from GitHub to GitLab

node-book_mastering-gitlab-12_chapter-06-migrating-from-cvs — Migrating from CVS

node-book_mastering-gitlab-12_chapter-07-switching-from-svn — Switching from SVN

node-book_mastering-gitlab-12_chapter-08-moving-repositories-from-tfs — Moving Repositories from TFS

node-book_mastering-gitlab-12_chapter-09-gitlab-vision-the-whole-toolchain-in-one-application — GitLab Vision - the Whole Toolchain in One Application

node-book_mastering-gitlab-12_chapter-10-create-your-product-verify-it-and-package-it — Create Your Product, Verify It, and Package It

node-book_mastering-gitlab-12_chapter-11-the-release-and-configure-phase — The Release and Configure Phase

node-book_mastering-gitlab-12_chapter-12-monitoring-with-prometheus — Monitoring with Prometheus

node-book_mastering-gitlab-12_chapter-13-integrating-gitlab-with-ci-cd-tools — Integrating GitLab with CI/CD Tools

node-book_mastering-gitlab-12_chapter-14-setting-up-your-project-for-gitlab-continuous-integration — Setting Up Your Project for GitLab Continuous Integration

node-book_mastering-gitlab-12_chapter-15-installing-and-configuring-gitlab-runners — Installing and Configuring GitLab Runners

node-book_mastering-gitlab-12_chapter-16-using-gitlab-runners-with-docker-or-kubernetes — Using GitLab Runners with Docker or Kubernetes

node-book_mastering-gitlab-12_chapter-17-autoscaling-gitlab-ci-runners — Autoscaling GitLab CI Runners

node-book_mastering-gitlab-12_chapter-18-monitoring-ci-metrics — Monitoring CI Metrics

node-book_mastering-gitlab-12_chapter-19-creating-a-basic-ha-architecture-by-using-horizontal-scaling — Creating a Basic HA Architecture by Using Horizontal Scaling

node-book_mastering-gitlab-12_chapter-20-managing-a-hybrid-ha-environment — Managing a Hybrid HA Environment

node-book_mastering-gitlab-12_chapter-21-making-your-environment-fully-distributed — Making Your Environment Fully Distributed

node-book_mastering-gitlab-12_chapter-22-using-geo-to-create-distributed-read-only-copies-of-gitlab — Using Geo to Create Distributed Read-Only Copies of GitLab

GitLab is a tool to enhance the workflow of teams and enable parts of the DevOps life cycle. It started out as a tool only for source code management, but today, GitLab can offer help ranging from managing an initial idea to building and testing source code, all the way from development to production.

You’ll learn ways to use all of the features available in GitLab to enhance your business via the integration of all phases of the development process. You’ll benefit from lower friction by creating one platform on-premises or in the cloud, increase collaboration, and drive competitive advantage with more efficient operations.

This book is for developers and DevOps professionals who want to master the software development workflow in GitLab and boost their productivity by putting their teams to work on GitLab via an on-premise installation or cloud-based infrastructure.

Chapter 1, Introducing the GitLab Architecture, provides a short introduction to the company and the people that created the product, along with a high-level overview of GitLab and its components.

Chapter 2, Installing GitLab, shows you how to install and configure GitLab via several different methods. This can be done from scratch, or via the Omnibus installer. Special attention is given to Docker and Kubernetes when outlining containerized solutions. Finally, a cloud installation via the DigitalOcean infrastructure is taken as an example.

Chapter 3, Configuring GitLab Using the UI, explains the options in the GitLab web UI that can be configured after installation. This chapter also covers the administration pages where these instance-level options are situated.

Chapter 4, Configuring GitLab from the Terminal, looks at the different ways of configuring GitLab. The first approach is by using the Omnibus package installer provided by GitLab, which automates most of the installation. The chapter continues with configuring a source installation. Configuring Docker containers and managing a Kubernetes installation are also covered.

Chapter 5, Importing Your Project from GitHub to GitLab, outlines the process of migration from GitHub via a hands-on lab. It starts by exploring settings that should be altered in your GitHub project. After this, the settings necessary in GitLab to prepare an import are shown, and finally, the procedure for running the import is addressed.

Chapter 6, Migrating from CVS, begins with a comparison of the fundamentally different systems of CVS and Git. It then provides directions on preparing for migration. Actual conversion is addressed, as is the cleaning up of artifacts not needed anymore.

Chapter 7, Switching from SVN, begins by explaining the subtle and not-so-subtle differences between SVN and Git. The reader is shown how to migrate using two different methods: mirroring with SubGit and using the svn2git tool.

Chapter 8, Moving Repositories from TFS, first deals with the differences between TFS and Git. Subsequently, the act of migrating information from a TFS project to Git is shown via the use of the git-tfs tool.

Chapter 9, GitLab Vision - the Whole Toolchain in One Application, explains GitLab’s vision of providing the whole DevOps toolchain to the developer, looking at the origins of XP and the Agile manifesto. The emergence of the DevOps paradigm is also explored, and the toolchain that GitLab provides is summarized.

Chapter 10, Create Your Product, Verify It, and Package It, shows how the product vision for GitLab and its workflow is centered around the idea of providing a complete toolchain to create a product. This chapter focuses on the different phases and explains the relevant concepts with examples.

Chapter 11, The Release and Configure Phase, discusses one of the big features of GitLab: the ability to offer the complete journey to production with different, easy-to-design stages. This way, you can create different environments and, ultimately, automate the whole pipeline for a product.

Chapter 12, Monitoring with Prometheus, handles ways of monitoring your GitLab environment by using the built-in Prometheus feature and default scripting languages. The second part of this chapter explains the different security tests that are available.

Chapter 13, Integrating GitLab with CI/CD Tools, explains how, although GitLab aims to provide a complete toolchain in the real world, there will always be a need for integration. This chapter explains some of the bigger possible integrations that are configurable out of the box. It closes with a section on how webhooks provide a general way to consume information from GitLab.

Chapter 14, Setting Up Your Project for GitLab Continuous Integration, describes GitLab CI concepts that are present on the application server and can be fine-tuned and customized per project. The second part of the chapter mainly focuses on how to get your project ready to use these CI concepts and set up a runner for it to use.

Chapter 15, Installing and Configuring GitLab Runners, explains the way GitLab runners work, by installing them. The next step is creating an example project and building it with a shell executor.

Chapter 16, Using GitLab Runners with Docker or Kubernetes, examines the architecture of Docker-based runners and runners using the Kubernetes API, using the same examples as in earlier chapters.

Chapter 17, Autoscaling GitLab CI Runners, demonstrates the architecture of runners using autoscaling. The number of runners required will decrease and increase based on demand. The example shown uses VirtualBox and Amazon Web Services (AWS) to deploy instances.

Chapter 18, Monitoring CI Metrics, deals with monitoring specific GitLab runners. Using a lab, we demonstrate how to enable monitoring inside the runner. After this introduction, the specific functional and system metrics are explained.

Chapter 19, Creating a Basic HA Architecture by Using Horizontal Scaling, visualizes the way in which different components interact. Secondly, the preparation of databases is shown, as well as several all-in-one application servers. Finally, the shared filesystem for repositories and Redis caching in this high availability (HA) setup is explained. We will use Terraform and Ansible to create the demonstration environment.

Chapter 20, Managing a Hybrid HA Environment, builds on the earlier architecture of horizontal HA, but continues to grow in complexity. The main difference is that the application servers combined several components that are now split into new tiers.

Chapter 21, Making Your Environment Fully Distributed, builds on earlier chapters. A fully distributed architecture aims to create more fault tolerance by again splitting components into new tiers. There is now an SSH node and several sidekiq tiers.

Chapter 22, Using Geo to Create Distributed Read-Only Copies of GitLab, starts with an explanation of the GEO product, which is part of the Enterprise Edition license. Using the same tools as in earlier chapters from Section 5 of this book ‘Scale the Server Infrastructure (High Availability Setup)’, we will explain how to set up GEO to create replication between two different geographical locations.

To get the most out of this book, you should have access to a Linux or macOS machine, have an internet connection, and have Amazon AWS, Google, and Microsoft Azure accounts. These are all necessary to run the examples.

Some basic IT knowledge is necessary to read this book. The subjects you need experience in are as follows:

  • Linux
  • Shell scripting
  • Basic programming skills in Ruby and JavaScript
  • A basic understanding of Docker containers
  • A basic understanding of using Terraform to create infrastructure as code
  • A basic understanding of Ansible

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the Support tab.
  3. Click on Code Downloads.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Mastering-GitLab-12. In case there’s an update to the code, it will be updated on the existing GitHub repository.

Visit the following link to see the code being executed:

http://bit.ly/2KirIoO

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Let’s continue with installing web documents in /usr/local/www.”

A block of code is set as follows:

server {
listen 8080;
server_name localhost;

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

server {
listen 8080;
server_name localhost;

Any command-line input or output is written as follows:

$mkdir /usr/local/www
$chmod 755 /usr/local/www
$cd /usr/local/www

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: “You can do this by clicking the Choose File button near the Logo section.”

Warnings or important notes appear like this.

Tips and tricks appear like this.

Feedback from our readers is always welcome.

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packt.com.


Source: