Learn GitLab for Auto DevOps using GitLab CLI
3.8 (23 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
199 students enrolled

Learn GitLab for Auto DevOps using GitLab CLI

Learn what GitLab is and how to use all of its functions to optimize and automate the DevOps lifecycle
3.8 (23 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
199 students enrolled
Created by Packt Publishing
Last updated 4/2019
English
English [Auto-generated]
Current price: $129.99 Original price: $199.99 Discount: 35% off
3 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 7 hours on-demand video
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Discover how to organize new features and bugs with Issue Board
  • Use groups to control access to each project
  • Time each phase in your development cycle with Cycle Analytics
  • Implement Continuous Integration, and Continuous Deployment
  • Use GitLab Pages to create a site and publicize your project
  • Automate your application builds, tests, and deployments through a simple configuration of GitLab CI
  • Build confidence in your software by integrating test and quality checking into your development process
  • Deploy your application automatically to virtualized and containerized cloud environments so your software is always up-to-date
  • Integrate monitoring so you can be sure your application is working well in production
  • Create your own automated build infrastructure fully under your control
Course content
Expand all 51 lectures 07:02:16
+ Learning GitLab
24 lectures 03:23:49

This video will give you an overview about the course.

Preview 04:11

In this video, we will look at what is Gitlab, and the advantages of using it.

  • Learn about Gitlab

  • Know the stages that it can be used in a DevOps cycle

  • Understand its advantages

Why Should I Use GitLab?
04:35

This video aims to teach the viewer how to install Gitlab using Docker and Docker Compose, and the advantages in doing it.

  • Know the advantages of installing Gitlab with Docker

  • Prepare your environment

  • Use Docker and Docker Compose to install Gitlab

Installing GitLab with Docker
18:34

In this video, we will create our first user and add an SSH key to it, so that we can connect.

  • Create the first user

  • Learn the differences between HTTPS and SSH

  • Add an SSH key to it

Setting Up Your Environment
03:03

In this video, we will take a look at how to create a new group, how to create a new project, and how to make changes to it.

  • Create a new group

  • Create a new project

  • Make changes in the project and commit them

Create Your First Project
09:31

This video aims to teach how to add a user to an existing group.

  • Enter group page

  • Find the desired user

  • Add it to the group

Add Members to Your Group
02:11

In this video, we will take a look at what are Labels and how to define group and project Labels.

  • Learn what are Labels

  • Create group Labels

  • Create project Labels

Define Labels
03:35

This video aims to teach what are issues and milestones, how to create and use them, and how to define issues templates.

  • Learn what are issues and how to create them

  • Define issue templates

  • Learn what are milestones and how to create them

Templates for Your Issues and Using Milestones
15:26

In this video, we will take a look at what are issue boards, why they are important, and how to define and use them.

  • Learn about issue boards

  • Define an issue board

  • Filter issues in issue board

Configuring the Issue Board
11:44

In this video, we will get an introduction about DevOps and Continuous Integration (CI), and will learn what is, and how to define pipelines in Gitlab.

  • Learn about DevOps and CI

  • Learn what they are and the importance of pipelines

  • Create a pipeline

Create a Pipeline
15:54

In this video, we will learn the importance of using branches, how to create and accept merge requests, and how to configure pipelines to work with branches.

  • Learn about branches and their importance

  • Create and accept merge requests

  • Configure pipelines to work with branches

Work with Branches
24:58

This video aims to teach how to configure pipeline notifications and how to notify a group of people about the pipeline results.

  • Learn about pipeline notifications

  • Enable and disable pipeline notifications

  • Notify specific group of people about pipeline results

Configure Pipeline Notifications
04:45

In this video, we will look at what is Continuous Deployment, how to define environments in Gitlab, and how to use them in pipelines.

  • Learn about Continuous Deployment

  • Define environments

  • Use environments in pipelines

Define Environments
06:18

This video aims to teach how to make an application deploy using Gitlab CI. In order to do it, we will see how to define and use variables in Gitlab.

  • Define variables

  • Use variables in pipelines

  • Deploy your application using Gitlab CI

Deploy Your Application
12:19

In this video, we will take a look at how to use Gitlab to measure each development lifecycle stage, in two different types of repository organization: simple flow and environment flow.

  • Learn about the measured stages in Gitlab

  • Measure Times in simple flow

  • Measure Times in environment flow

Measure the Times of Each Stage and the Total Time
18:48

This video aims to teach what Prometheus is, its advantages, and how to install it with Docker and Docker Compose.

  • Learn about Prometheus advantages

  • Know Prometheus architecture

  • Install Prometheus with Docker and Docker Compose

Install Prometheus in Your Clusters
09:11

In this video, we will look at the Prometheus Query Language (PromQL), understand its concepts, and make queries using PromQL in Prometheus Web interface.

  • Learn about PromQL concepts

  • Learn how to use Prometheus Web interface

  • Execute some queries in Prometheus Web interface

Understanding Prometheus Query Language
06:51

In this video, we will get an overview about configuring Prometheus to monitor different applications in your environment.

  • Learn about the available exporters to Prometheus

  • Learn about applications that don’t need exporters

  • Understand how to configure Prometheus to your environment

Configure Prometheus to Monitor Your Environment
01:49

This video aims to teach you how to configure GitLab to receive the data collected from Prometheus, so that you can monitor your environments directly from GitLab.

  • Learn about job configurations in Prometheus

  • Set up Prometheus jobs to monitor specific environments

  • Configure GitLab to receive Prometheus data

Configure GitLab to Receive Prometheus Data
10:30

In this video, we are going to see the importance of analyzing our environment data, and how GitLab and other tools can help us in this mission.

  • Learn about the importance of analyzing your data

  • Understand how GitLab can help you analyze your data

  • Understand how can other tools help you analyze your data

Analyze Your Data
03:40

In this video, we will learn how to set up alerts in Prometheus. Doing this, we will receive alerts whenever a metric hit a predetermined condition.

  • Configure alerts for Prometheus metrics

  • Use Prometheus Alert interface to see the status of the alert

  • Use Alert Manager interface

Set Up Alerts for Prometheus Metrics
05:49

This video aims to demonstrate the advantages of using GitLab Pages, and create our first project with a static-site in GitLab.

  • Understand the advantages of using GitLab Pages

  • Learn tips to choose a static-site framework

  • Create a project in GitLab to hold your static-site

Create the First Page
05:19

In this video, we are going to see how to define pipelines to automatically publish our static-sites, and how we can access them.

  • Define a pipeline to your site

  • Access your site to see it working

  • See examples of static-sites with frameworks

Define Pipelines to Your Page
03:24

In this video, you are going to see that you can use HTTPS and subdomains. Also, you will have some tips about choosing your GitLab Pages domain.

  • Learn about using HTTPS in GitLab Pages

  • Learn about using subdomains in GitLab Pages

  • Get some tips about choosing GitLab Pages domain

Define a Domain
01:24
Test Your Knowledge
5 questions
+ Hands-On Auto DevOps with GitLab CI
27 lectures 03:38:27

This video will give you an overview about the course.

Preview 04:16

DevOps requires the ability to automatically build, test, and deploy code. GitLab CI integrates directly into GitLab to perform continuous integration.

  • Describe DevOps and Continuous Integration

  • Describe GitLab CI

  • Demonstrate building, testing, and deploying an application using GitLab CI

Automated DevOps with GitLab CI
09:55

To deploy our application, we need a reliable environment that supports updates with zero downtime. GitLab CI integrates well with Kubernetes to provide this environment.

  • Understand Docker and Kubernetes and how they work together

  • Use GitLab CI to create a Kubernetes cluster in Google Kubernetes Engine

  • Link the Kubernetes cluster to GitLab CI to deploy applications

Integrating Kubernetes and GitLab CI
07:53

GitLab CI provides sophisticated application build and deployment without requiring us to create any build configuration at all.

  • Enable Auto DevOps in GitLab CI

  • Push our code to create and run an Auto DevOps pipeline

  • Demonstrate how our Auto DevOps pipeline deploys our application to Kubernetes

DevOps with Zero Configuration
09:54

To completely control our GitLab CI jobs, we need to create a GitLab CI configuration file.

  • Understand the .gitlab-ci.yml file

  • Define a basic build script and customize the build environment

  • Understand how GitLab CI determines build success or failure

Creating GitLab CI Configuration
08:31

To build Docker images inside our GitLab CI Docker executor, we need to configure and use a Docker-in-Docker setup.

  • Define a Docker daemon as an extra service for our GitLab CI build

  • Use built-in variables to define the name and version ID of our Docker image

  • Build the Docker image and push to GitLab Container Registry

Building and Testing with Docker
09:53

To organize our build, test, and deployment configuration, we need to know how to place jobs into stages.

  • See the default build stages

  • Declare custom build stages and ordering

  • Assign a job to a stage

Preview 06:23

To speed up our build pipeline while still maintaining a high-quality test infrastructure, we need to know how to run multiple jobs in parallel.

  • Create multiple jobs in a single stage

  • Observe jobs running in parallel

  • Create multiple identical job instances and run them in parallel

Running Build Steps in Parallel
06:13

Downloading dependencies has the potential to slow down our build. If we use caching, it can speed things up.

  • Configure our build to cache downloaded dependencies

  • Configure our build to cache only certain directories

  • Create separate caches for separate builds and separate branches

Speeding Up Builds with Cache
08:51

We need to capture outputs from our build process so we can analyze the result of the build.

  • Declare artifacts in our build

  • Capture artifacts even from failed builds

  • Configure artifacts to expire after one week

Defining Artifacts
08:02

Artifacts can be used to pass data between jobs in different stages. This makes it easier to divide our build up into multiple jobs.

  • Create a build pipeline with multiple stages and artifacts defined

  • Customize which jobs receive which artifacts

  • Observe how artifacts are provided in default and customized cases

Using Artifacts in Future Stages
07:32

We need to provide private information to our jobs without exposing that information in our repository.

  • Declare variables at the project level

  • Declare variables at the group level

  • Consume project and group variables in the build

Passing Variables to Builds
07:58

To track deployments from our builds, we need to organize our deployments into environments.

  • Declare an environment for a build job

  • View an environment and its deployed application

  • View the deployment history for an environment

Declaring Deployment Environments
06:10

To deploy an application to Kubernetes, we need to understand core Kubernetes resources.

  • Create a service and deployment for our web application

  • Create a service and deployment for our database

  • Create persistent storage and web traffic routing resources

Kubernetes Application Resources
08:45

To deploy our application to Kubernetes, we need to pass Kubernetes configuration and authentication to our deployment job.

  • Associate a Kubernetes cluster with the environments in our project

  • Use passed through Kubernetes credentials

  • Deploy our application from our GitLab CI deployment job

Deploying an Application to Kubernetes
07:35

Kubernetes needs credentials to pull our custom Docker image from our project’s GitLab Container Registry.

  • Create a registry deploy token in GitLab

  • Create environment variables with our deploy token credentials

  • Create and use a Kubernetes image pull secret

Deploy Tokens and Image Pull Secrets
06:21

To review changes to our application before we deploy them to production, we need to be able to run multiple versions of our application in the same Kubernetes cluster.

  • Configure dynamic environments for non-production deployments

  • Use a unique naming convention for our Kubernetes resources

  • Create a feature branch change and use GitLab CI Review Apps to test it

Dynamic Environments and Review Apps
11:27

Integration tests have external service dependencies like databases that we need to have available during the build.

  • Declare a database service in our test job

  • Pass environment variables to our database service

  • Configure a service alias and use it to access the database from our test

Integration and Functional Testing
08:26

To keep our code quality high, we need to automatically monitor it for every potential change we review.

  • Create an automated code quality job

  • Create a code change and a merge request

  • Observe the code quality results for the code change in the merge request

Analysing 4.6 Code Quality
07:55

Some security testing can only be accomplished when our application is deployed. We can use GitLab Review Apps to perform dynamic security scanning.

  • Add a security scanning job for feature branches

  • Create a feature branch and merge request

  • Use the security scan detailed report and summary

Dynamic Application Security Testing
06:34

To monitor our application, we need it to continually produce metrics that can be collected by a monitoring application.

  • Add a Prometheus client library to our Node.js application

  • Configure a metrics endpoint that reports current data

  • Run our application and see the raw metrics from the endpoint

Application Metrics Collection
06:00

Prometheus is a popular monitoring application that integrates well with Kubernetes. GitLab can install it into our Kubernetes cluster automatically.

  • Configure our application’s service for scraping by Prometheus

  • Deploy our application and observe its metrics in the Prometheus dashboard

  • See application metrics from Prometheus right in our GitLab project website

Application Monitoring with Prometheus
08:19

If we need custom tools or configuration for an automated build, we need to create a dedicated runner for our project.

  • Install GitLab Runner

  • Register our runner with our GitLab project

  • Use our dedicated runner to run a build

Launching Dedicated Runners
09:24

To have proper control over our custom CI infrastructure, we need deployment automation so we can create CI infrastructure automatically.

  • Provision virtual machines in AWS using Ansible

  • Install and configure GitLab Runner automatically using Ansible

  • Use our new runner to run a build in our GitLab CI project

Automating Runner Deployment
12:36

To support many projects and builds in our custom CI infrastructure, we need a way to scale runners up or down automatically.

  • Use Ansible to provision a Docker Machine runner

  • Configure our Docker Machine runner with AWS credentials

  • Run a build and observe our build environment scale to execute it

Autoscaling Runners Using Cloud Resources
10:20

Because we have a Kubernetes cluster already configured for deploying our application, we can also use it to run builds.

  • Install GitLab Runner on our Kubernetes cluster

  • Observe the GitLab Runner in our Kubernetes cluster

  • Start a build and observe it running in Kubernetes

Custom Kubernetes Runners
05:37

To fully move to custom CI infrastructure, we need to run our own instance of GitLab Server.

  • Install and configure GitLab Server using Ansible

  • Configure Ansible variables to allow a dedicated runner to attach to our GitLab server

  • Install and configure GitLab Runner using Ansible and see it in our private GitLab server

Private GitLab Server Install
07:37
Test Your Knowledge
5 questions
Requirements
  • Prior experience with version control systems and basic knowledge of the software development process is required.
Description

GitLab is a single application for the entire software development lifecycle. From project planning and source code management to CI/CD, monitoring, and security. With GitLab CI, it is easy to add build and deployment automation that triggers on every code change, helping you build high-quality, reliable software and deploy it to production at speed.

In this well thought out course, you will learn to use GitLab for implementing the DevOps lifecycle. You will begin with learning how to plan and organize new features, develop them and the application code in an automatic way, deploy and monitor the application in different environments, and refactor your application using GitLab. You will then learn to create a DevOps pipeline to automatically build, test, and deploy software to virtual machines and container environments.

Contents and Overview

This training program includes 2 complete courses, carefully chosen to give you the most comprehensive training possible.

In the first course, Learning GitLab, you will learn how to use GitLab to implement the DevOps culture. GitLab is a very famous tool that lets you cover the entire application development cycle. You will learn how to plan and organize new features, develop them, the application code in an automatic way, deploy and monitor the application in different environments, and refactor your application using only one tool GitLab.

The second course, Hands-On Auto DevOps with GitLab CI, will give you a hands-on tutorial on GitLab CI. You will use GitLab CI to create a DevOps pipeline to automatically build, test, and deploy software to virtual machines and container environments. You will explore the features of GitLab CI, including using runners to execute build jobs, creating multi-stage builds, and deploying to virtualized and containerized environments. You will see how easy it is to get started with GitLab CI by deploying your own runners in cloud environments or on your own servers, using Docker and Kubernetes or ordinary scripting.

By the end of this course, you'll be able to perform all from project planning and source code management to CI/CD, monitoring, and security for your projects.
Meet Your Expert(s):

We have the best work of the following esteemed author(s) to ensure that your learning journey is smooth:

  • Bruno Lorenco Lopes graduated in Computing Engineering at the University of São Paulo (USP), with an M.Sc in Computer Science and Computational Mathematics at the same university. As a systems analyst, he has broad experience in software development, using Java, Groovy, and C/C++, and has automatized tests using Spock and JUnit. He is also an enthusiast of the DevOps culture and has been working with it since 2014, using tools such as GitLab, Gitflow, Jenkins, and Docker. He is very passionate about software development and tries to stay updated about the latest tools and technologies that may help to boost the productivity of his team and increase software quality. Currently, he also works as a specialization teacher at Federal University of São Carlos (UFSCar), teaching Docker.

  • Alan Hohn is a Lockheed Martin Fellow who specializes in DevOps, microservice architecture, and agile. He is experienced at deploying and configuring GitLab CI and in helping, teams take advantage of its ability to automate application builds, tests, and deployments. He has extensive experience teaching technical topics and loves to combine examples and explanation to make any technology clearer.

Who this course is for:
  • This course is for developers and DevOps professionals who want to master software development workflows in GitLab and boost their productivity by getting their teams to work together.