Learn DevOps
Free!
With Membership
$33.33
Suggested price

Learn DevOps

This book is your easy way to start learn famous DevOps tools and describe why you should choose it and how you can use it together. We are positive that this book helps to make the first step for engineers who think about changing their career as a lot of our students did.

About the Book

This book is your easy way to start learn famous DevOps tools, explains why you should choose it and how you can use all the tools together. The main focus is GitLab and Jenkins. We are positive that this book helps to make the first step for engineers who think about changing their career as a lot of our students did.

About the Authors

Denis Zuev
Denis Zuev

Denis Zuev is a worldwide IT expert with 15+ yrs of experience. Some people in the industry think that he is not a human, and not without a reason. His areas of expertise are Networks, Servers, Storage, Cloud, Containers, DevOps, SDN/NFV, Automation, Programming, and WebDev, you name it. Denis is also known for his certification achievements. At the very moment, he holds following industry expert level certifications: RHCI, RHCA.VI, 6xCCIE, 4xJNCIE, CCDE, HCIE, VCIX-NV. Denis is a contractor and an instructor who works with top tech companies like Cisco, Juniper, Red Hat, ATT, etc.

Artemii Kropachev
Artemii Kropachev

Artemii Kropachev is a worldwide IT expert and international consultant with more than 15 years of experience. He has trained, guided and consulted hundreds of architects, engineer, developers, and IT experts around the world since 2001. Artemii’s architect-level experience covers Solutions development, Data Centers, Clouds, DevOps and automation, Middleware and SDN/NFV solutions built on top of any Red Hat or Open Source technologies. I also possess one of the highest Red Hat Certification level in the world - Red Hat Certified Architect in Infrastructure Level XX. Artemii’s life principles can be defined as “never stop learning” and “never stop knowledge sharing”. Artemii would love to share some of his experience and knowledge via this book.

Aleksandr Varlamov
Aleksandr Varlamov

Aleksandr Varlamov is an IT expert that stood at the origins of many public cloud platforms, high-load platforms, and challenging solutions. He is the mentor and lead of powerful and talented engineers, designed and implemented large-scale country-level projects, lead them to success. Aleksandr is the co-founder of technology solutions and start-ups. Evangelist of the most exciting technological solutions, author of a Russian translation of Nutanix Bible. His expertise covers Enterprise level architecture, Data Centers design, Public and Private Clouds, IaaS/PaaS/SaaS services. He appreciates and enjoys solving complex issues and challenges. Aleksandr says - every architecture solution should be stable, simple, and powerful.

Table of Contents

Table of contents 2

Intro 6

Authors 6

What is this book about? 6

Why Jenkins and GitLab 8

Structure of this book 8

About DevOps 9

Business challenges 9

Waterfall, Agile, DevOps 9

CI/CD 10

DevOps tools 11

Requirements 12

You as a reader 12

Hardware requirements 12

Software requirements 12

VirtualBox installation 13

Vagrant installation 14

Installing Git client 14

Verification 14

Lab environment overview 15

Getting started with GitLab 20

Git repository management 20

GitHub 20

GitLab 21

BitBucket 21

GitLab, GitHub, and BitBucket comparison 22

Git 22

GitLab installation 23

Connecting to GitLab 25

Git basics 33

Using Git help 34

Working with Git 35

Sharing git projects 41

Working with merge requests 50

Getting started with Jenkins 59

About Jenkins 59

Installing Jenkins 59

Pipelines overview 66

Creating Jenkins Pipeline 67

Groovy - Basics 70

Node 71

Stage 72

Step 73

Input 76

Pipelines - advanced syntax 80

Variables 80

Functions 82

Variable + Function() == LOVE 92

For loops 93

Try, catch, finally 96

If, else if, else 98

Switch case 102

Retry 105

Parallel 108

Configuring Jenkins 109

Installing plugins 110

Updates 111

Available 112

Installed 115

Adding new users 116

Jenkins and GitLab API 120

Why API? 120

API access tools 120

Using curl to access APIs 120

Formatting output using jq 122

Using GitLab API 124

GitLab API 124

Authentication 124

API Status codes 127

Managing GitLab projects 127

List projects 127

Get single project 130

Create a project 131

Update project settings 133

Delete project 134

Other project-related activities 135

Managing GitLab users 135

Managing branches 139

Managing merge requests 141

Managing other GitLab entities 146

Using Jenkins API 147

Jenkins API 147

Authentication 149

List jobs 152

Create a Job 153

Trigger a build 156

Making GitLab and Jenkins to work together 157

Why we need it 157

What we want to achieve 157

Moving Jenkins pipelines to GitLab 157

Create a GitLab repo with pipeline script 158

Install git on Jenkins 160

Create Jenkins job 161

Triggering Jenkins job automatically 168

Configuring Jenkins build triggers 168

Using GitLab Jenkins plugin 171

Install GitLab Jenkins plugin 171

Configuring Jenkins to GitLab authentication 173

Configuring GitLab to Jenkins authentication 174

Automatic job triggering via GitLab 177

Allowing remote API calls to Jenkins 177

Configuring GitLab Webhooks 178

Update repository files 181

Updating GitLab progress from Jenkins 182

gitlabBuilds 182

gitlabCommitStatus 183

Integrating Jenkins pipelines with merge requests 186

Application 186

Configure GitLab WebHook 186

Configure GitLab merge settings 187

Configure Jenkins job parameters 188

Creating a merge request 189

More options of integration 194

Conclusions 195

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub