Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
GitLab Quick Start Guide
GitLab Quick Start Guide

GitLab Quick Start Guide: Migrate to GitLab for all your repository management solutions

By Adam O'Grady
$25.99 $17.99
Book Nov 2018 180 pages 1st Edition
eBook
$25.99 $17.99
Print
$32.99
Subscription
$15.99 Monthly
eBook
$25.99 $17.99
Print
$32.99
Subscription
$15.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Nov 30, 2018
Length 180 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781789534344
Concepts :
Table of content icon View table of contents Preview book icon Preview Book

GitLab Quick Start Guide

Introducing GitLab

GitLab is a code hosting and issue tracking web platform based around the Git version control system. First released in 2011, it has continued to grow and evolve over the years, adding new features and capabilities, and has turned into a one-stop tool for an agile workforce. While it is owned and managed by GitLab Inc., who steer the direction of the project, the core of GitLab is open source software with over 2,000 separate contributors to date.

In this chapter, we'll explore the following topics:

  • An overview of version control
  • The main features of GitLab
  • Self-managed versus SaaS
  • Free versus paid
  • A brief history of GitLab

Version control systems and Git

Let's say you write code, or work on a book, or even just want to collect and update a set of text-based documents. You need some method of keeping track of changes, of being able to revert mistakes in the work, or branch in new directions; and you'll probably want some way of remotely backing up your work in case of fire, theft, or acts of a misbehaving computer. This is where version control systems (also known as VCS) come in handy. They save your work at certain points (commits) and can be reverted to earlier states; many VCS offer methods of branching so that you can for example work on a specific feature without interrupting someone else's work on another component. There are many version control systems on the market, but the most prominent in the public eye would be Git. Git is a distributed version control system, which means that it has a full copy of all of the code that exists on each user's computer, and users can pass patches and changes directly between each other rather than entirely relying on a centralized server.

Behind the scenes, git is an advanced program that is lightning fast when it comes to performing operations like staging work, committing changes, or swapping between branches. It's efficient at fetching information from remote repositories to help speed up a user's workflow. Unlike most VCS, git doesn't work by storing the changes that happen to each file. Instead, on every commit, git stores a snapshot of the current state of all files. If a file hasn't changed, rather than storing it again, it simply stores a reference to the last saved version of the file.

When you make a commit, git captures the snapshot and also takes a cryptographic hash a series of complex mathematical operations on the data that produces a unique value and uses the output of that as a reference to the commit, along with some metadata, such as the author. This snapshot sits on top of the rest of the snapshots/commits that you've taken, and in this way you can think of git snapshots as a series of changesets operations that add or remove lines that can be performed on your files to get them to an older or newer state.

We'll cover more on the higher-level use and commands of Git in Chapter 3, GitLab Flow, when we explore the GitLab flow for branching and merging.

GitLab and Git

GitLab is built on top of git so that users who are contributing work (editing code, writing chapters, and so on) to a project will have a copy of the project downloaded/checked out/cloned on their local computer. It provides a web interface for handling many of git's more advanced workflows, and recommends a workflow for interacting with git for the best in productivity, efficiency, and ease of use. We'll cover this workflow in a lot more detail in Chapter 3, GitLab Flow, and in Chapter 4, Issues to Merge Requests, where we'll explore the merging of branches in the GitLab user interface.

By acting as a single source of truth for your developers, GitLab can help you avoid conflicts and the double handling of work while maintaining uptime by relying on the battle-tested GitLab.com platform or your own installation of it, working with tools including geographic replication, disaster recovery, and automated failover.

Features

GitLab provides a number of ways to view and interact with a git repository. There is the classic file browser that lets you explore the files in your repository:

There's also a branch viewer, which lets you see variations of your work under active development, as well as branches that are considered stale and no longer developed:

Alongside this is a tag viewer that lets you explore specific releases of your work:

There are tools that can be used to analyze and view the commit graph:

Among these tools are charting tools, which are used to get a better understanding of the composition of the repository:

Alongside this is a breakdown of the frequencies of commits and activity:

For users who are not familiar with git commands or those away from their work computer, GitLab also provides a web interface where you can make changes to code and commit it straight from the browser:

Aside from being a web interface for git, GitLab also provides tools for a variety of purposes, including powerful feature planning and issue management tools:

These tools help keep everyone in sync, allowing them to understand the current workload and roadmap and making sure that work isn't double-handled and is correctly prioritized. With things like epics, milestones, and cycle analytics, GitLab can help measure the effectiveness of your development process.

It also includes the necessary tools for code review prior to merging branches to ensure that all work is up to scratch:

Automated testing tools and pipelines are also included to help make sure that code is working perfectly before it's merged back in or released:

Thanks to the powerful, built-in, continuous integration/continuous deployment (CI/CD) platform (explored further in Chapter 5, Continuous Integration And Continuous Deployment), GitLab can not only test your code, but also build and deploy/release it under circumstances that you control.

Self-managed versus Software as a Service (SaaS)

GitLab can be used in one of two ways: either self-managed, where you host your own instance of GitLab Community Edition/Enterprise Edition, or using the online platform GitLab.com, which comes as a paid or free Software as a Service (SaaS) model.

Using GitLab.com comes with the benefits of no maintenance or infrastructure costs and regular automatic updates without any manual labour. They have an amazing setup with multiple backup strategies, redundancies, and failovers to ensure high uptime and no loss of data in the event of a major incident.

On the other hand, you might not feel comfortable putting all of your work on someone else's infrastructure, which is why GitLab provides an easy-to-install omnibus package that can be installed on your own computer or a server that you host. This can also be handy if you have strict security and firewall requirements that don't allow for externally hosted code. There's also the benefit of easy integration with your own LDAP or Active Directory services for user management, and potential performance gains in larger repositories from not having to shift large amounts of data over external network links.

Free versus paid

Lastly, there are multiple tiers of GitLab for both the self-managed and SaaS versions. Please note that both versions can be used for free and provide all of the main features that you'd expect (git hosting, code review, issue management, testing, and deployment). The added tiers provide extra features that are available at different levels of pricing on a per-user, per-month basis. For example, at the lowest paid tier, you get priority and next-business-day support, and with the SaaS version, you also get burndown charts, multiple approval requirements on merge requests, and issue weighting. At the higher levels, more features get added, including the following:

  • Service desk mode
  • Canary deployments
  • Support for multiple Kubernetes clusters
  • CI/CD for external repositories
  • Disaster recovery
  • Epics
  • Roadmaps, and much more

We'll cover more of these paid features in Chapter 7, Advanced and Paid Features.

Summary

So far, we've discovered what version control is: a method of tracking revisions of work, of creating alternate test branches, and working collaboratively. We know that git is a form of version control system that specializes in working in a distributed network and that GitLab is a platform that is based on git but with a lot of powerful features.

We discussed the features of GitLab, including issue and project management, continuous integration and continuous deployment, code review, and even online code editing. We also looked at self-managed GitLab versus using the online GitLab.com platform. You should also have an idea of the benefits of moving to a paid GitLab subscription.

In the next chapter, we'll discuss setting up GitLab for self-managed users, and go over both the quick omnibus installation and the manual installation method. We'll also look into how to create an account on a GitLab instance, whether a self-managed one or on GitLab.com.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Effective guide for GitLab migration from GitHub and SVN
  • Learn to implement DevOps with GitLab 11
  • Manage projects with issue boards and time tracking

Description

Gitlab is an open source repository management and version control toolkit with an enterprise offering. This book is the ideal guide to GitLab as a version control system (VCS), issue management tool, and a continuous integration platform. The book starts with an introduction to GitLab, a walkthrough of its features, and explores concepts such as version control systems, continuous integration, and continuous deployment. It then takes you through the process of downloading and installing a local copy of the on-premise version of GitLab in Ubuntu and/or CentOS. You will look at some common work?ows associated with GitLab work?ow and learn about project management in GitLab. You will see tools and techniques for migrating your code base from various version control systems such as GitHub and SVN to GitLab. By the end of the book, you will be using Gitlab for repository management, and be able to migrate projects from other VCSs to GitLab.

What you will learn

Set up CI and test builds for your projects Understand the benefits and limitations of GitLab work?ow Migrate from other common VCS platforms to Gitlab Create, review, and merge code changes Learn to branch local code and create a new branch in GitLab Configure sequential stages and simultaneous stages for CI/CD Access Mattermost for on-premise GitLab Discover the issue tracking features of GitLab

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Nov 30, 2018
Length 180 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781789534344
Concepts :

Table of Contents

10 Chapters
Preface Chevron down icon Chevron up icon
Introducing GitLab Chevron down icon Chevron up icon
Setting Up GitLab Chevron down icon Chevron up icon
GitLab Flow Chevron down icon Chevron up icon
Issues to Merge Requests Chevron down icon Chevron up icon
Continuous Integration and Continuous Deployment Chevron down icon Chevron up icon
Porting from GitHub or Subversion (SVN) Chevron down icon Chevron up icon
Advanced and Paid Features Chevron down icon Chevron up icon
Introduction To Markdown Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.