Mastering GitLab 12
eBook - ePub

Mastering GitLab 12

Implement DevOps culture and repository management solutions

  1. 608 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Mastering GitLab 12

Implement DevOps culture and repository management solutions

About this book

An expert guide to helping you use DevOps techniques with the latest GitLab version to optimize and manage your software workflow

Key Features

  • 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

Book 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.

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

Who this book is 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.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

Section 1: Install and Set Up GitLab On-Premises or in the Cloud

This section will give you a solid understanding of GitLab deployment options and GitLab component architecture, leaving you able to install and configure GitLab on-premises and in the cloud.
This section comprises the following chapters:
  • Chapter 1, Introducing the GitLab Architecture
  • Chapter 2, Installing GitLab
  • Chapter 3, Configuring GitLab Using the Web UI
  • Chapter 4, Configuring GitLab from the Terminal

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 runners. As the different components can be distributed across servers or even cloud providers, we will also provide an overview of those providers and how GitLab views them.
In this chapter, we will be covering the following topics:
  • The origins of GitLab
  • GitLab CE or EE
  • The core components of GitLab
  • GitLab CI
  • GitLab Runners
  • Cloud native

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 was announced to a broader audience via Hacker News (https://news.ycombinator.com/item?id=4428278).
2013
Dimitri Zaporozhets decides to work full-time on GitLab and joins the company.
2015
GitLab becomes part of the Y Combinator class and received VC funding that year.
2018
GitLab receives another $100 million of VC funding and is valued at $1 billion.
2019
The GitLab company employs over 600 employees.
The initial idea of GitLab was to earn money from open source technology by offering support services. However, what happened was that companies started to bring in consultants only to upgrade GitLab, and then they would stop the service contract. It became clear that going for a 100% open source was not going to be competitive. Instead of this, therefore, they chose open core. Under open core, a company releases a core software system under an open source license. A different version of the software is sold under a commercial license and contains more features.
So, GitLab was split up into two editions: an open source version, and an enterprise version.

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, Premium, and Ultimate. Each tier is about five times more expensive than the previous one and contains more features and support options, as mentioned in the following table:
Version
Features (short list)
Starter
Everything on core GitLab CE:
  • CI/CD
  • Project Issue Board
  • Mattermost integrations
  • Time tracking
  • GitLab pages
Premium
More enterprise features such as the following:
  • Maven and NPM repository functionality
  • Protected environments
  • Burndown charts
  • Multiple LDAP servers and Active Directory support
Ultimate
All options, including the following:
  • All security scanning tools
  • Epics
  • Free guest users
  • Web terminal for the web IDE
GitLab has a lot of features, but let's concentrate first on the basic building blocks.

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...

Table of contents

  1. Title Page
  2. Copyright and Credits
  3. Dedication
  4. About Packt
  5. Contributors
  6. Preface
  7. Section 1: Install and Set Up GitLab On-Premises or in the Cloud
  8. Introducing the GitLab Architecture
  9. Installing GitLab
  10. Configuring GitLab Using the Web UI
  11. Configuring GitLab from the Terminal
  12. Section 2: Migrating Data from Different Locations
  13. Importing Your Project from GitHub to GitLab
  14. Migrating from CVS
  15. Switching from SVN
  16. Moving Repositories from TFS
  17. Section 3: Implement the GitLab DevOps Workflow
  18. GitLab Vision - the Whole Toolchain in One Application
  19. Create Your Product, Verify, and Package it
  20. The Release and Configure Phase
  21. Monitoring with Prometheus
  22. Integrating GitLab with CI/CD Tools
  23. Section 4: Utilize GitLab CI and CI Runners
  24. Setting Up Your Project for GitLab Continuous Integration
  25. Installing and Configuring GitLab Runners
  26. Using GitLab Runners with Docker or Kubernetes
  27. Autoscaling GitLab CI Runners
  28. Monitoring CI Metrics
  29. Section 5: Scale the Server Infrastructure (High Availability Setup)
  30. Creating a Basic HA Architecture Using Horizontal Scaling
  31. Managing a Hybrid HA Environment
  32. Making Your Environment Fully Distributed
  33. Using Geo to Create Distributed Read-Only Copies of GitLab
  34. Assessments
  35. Other Books You May Enjoy

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Mastering GitLab 12 by Joost Evertse in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Ruby. We have over one million books available in our catalogue for you to explore.