Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering Jenkins
Mastering Jenkins

Mastering Jenkins: Configure and extend Jenkins to architect, build, and automate efficient software delivery pipelines

Arrow left icon
Profile Icon jmcallister - Profile Icon McAllister
Arrow right icon
€8.99 €32.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7 (3 Ratings)
eBook Oct 2015 334 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon jmcallister - Profile Icon McAllister
Arrow right icon
€8.99 €32.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7 (3 Ratings)
eBook Oct 2015 334 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Mastering Jenkins

Chapter 2. Distributed Builds – Master/Slave Mode

A basic Jenkins installation operates as a standalone entity. A single Jenkins master can be responsible for source control polling, LDAP authentication, job execution, test report parsing, and more. As the role Jenkins plays in an organization expands, we may be asked to provide support for additional build environments, automated test execution solutions, configuration management solutions, and even deployments. To extend Jenkins and support these types of additional responsibilities, Jenkins features an elegant distributed build solution. This feature can be leveraged to help offload some of the work and to position Jenkins as a scalable, cross-platform solution.

 

"If you always give, you will always have."

 
 --Chinese proverb

Distributed builds in Jenkins are supported by slave agent services running on unique devices, which coins the term master and slave mode. The master/slave mode architecture...

Understanding the master and slave architecture

A standalone Jenkins instance can grow fairly quickly into a disk-munching, CPU-eating monster. To prevent this from happening, we can scale Jenkins by implementing a slave node architecture, which can help us offload some of the responsibilities of the master Jenkins instance. Let's clarify this concept. A Jenkins slave node is simply a device configured to act as an automation executor on behalf of the master. The Jenkins master simply represents the base installation of Jenkins. The master will continue to perform basic operations and serve the user interface, while the slaves do the heavy lifting.

This distributed computing model will allow the Jenkins master to remain responsive to users, while offloading automation execution to the connected slave(s). To illustrate the concept of a master, and slave mode architecture let's look at an example. Figure 2-1 shows a Jenkins master and three slave nodes of varying OS types:

Understanding the master and slave architecture

Figure...

Choosing a launch method

Jenkins true power lies in its ability to operate, and scale across OS platforms and architectures. Launching a slave node agent and attaching it to the Jenkins mater can be accomplished in a number of ways. Each method has its own use cases, benefits, and potential drawbacks. The one we select will be largely dependent on the target operating system, or environment. When creating a Jenkins slave node we will want to choose wisely. The Jenkins new slave node configuration screen provided us with the following available launch methods.

  • Launch slave agents via Java Web Start (preferred)
  • Launch slave agents on Unix machines via SSH
  • Let Jenkins control this Windows slave as a Windows service (using DCOM and WMI is sometimes error prone)
  • Launch slave via execution of command on the Master

Two of the most commonly used launch methods for slave nodes include SSH and Java Web Start. These two options are the least error-prone and offer the quickest implementation path. While...

Administering Jenkins slaves

As Jenkins administrators it is our responsibility to monitor, and maintain the Jenkins master and slave nodes in our build farm. Jenkins features a comprehensive set of tools, and services that takes most of the guesswork out of managing a distributed Jenkins implementation. In this section we will discuss the ins and outs of maintaining a healthy Jenkins master and slave architecture.

The node administration dashboard

The Jenkins node administration page allows us to add, remove, control, and monitor the Jenkins master and any attached slave devices. Figure 2-14 illustrates this Jenkins node administration page:

The node administration dashboard

Figure 2-14: Node administration dashboard

Also featured on the slave node administration page is a detailed status and configuration side panel. The configuration panel allows the Jenkins administrator to configure warning thresholds and define new slave nodes.

Non-administrative users can view the status of slave devices by looking at the Build Executor...

Labels, groups, and load balancing

When creating a new slave node, Jenkins allows us to tag a slave node with a label. Labels represent a way of naming one or more slaves. We leverage this labeling system to tie the execution of a job directly to one or more slave nodes.

By leveraging the labeling system described above we can begin to create very powerful load-balanced Jenkins solutions. When Jenkins discovers a job execution is pending, which is tied to a label, it will attempt to locate any available slave nodes tagged with that label that are not in use. If any nodes with that label are free Jenkins will run the job on the available node. If no nodes are available, Jenkins will queue the job for the next available node that has the specified label. Figure 2-18 illustrates a simple label containing two Microsoft Windows slaves tagged with the label Windows.

Labels, groups, and load balancing

Figure 2-18: A basic Windows build pool

Attaching a slave to a group by creating a label

By labeling multiple slave nodes with the...

Understanding the master and slave architecture


A standalone Jenkins instance can grow fairly quickly into a disk-munching, CPU-eating monster. To prevent this from happening, we can scale Jenkins by implementing a slave node architecture, which can help us offload some of the responsibilities of the master Jenkins instance. Let's clarify this concept. A Jenkins slave node is simply a device configured to act as an automation executor on behalf of the master. The Jenkins master simply represents the base installation of Jenkins. The master will continue to perform basic operations and serve the user interface, while the slaves do the heavy lifting.

This distributed computing model will allow the Jenkins master to remain responsive to users, while offloading automation execution to the connected slave(s). To illustrate the concept of a master, and slave mode architecture let's look at an example. Figure 2-1 shows a Jenkins master and three slave nodes of varying OS types:

Figure 2-1: A Jenkins...

Left arrow icon Right arrow icon
Download code icon Download Code

Description

With the software industry becoming more and more competitive, organizations are now integrating delivery automation and automated quality assurance practices into their business model. Jenkins represents a complete automation orchestration system, and can help converge once segregated groups into a cohesive product development and delivery team. By mastering the Jenkins platform and learning to architect and implement Continuous Integration, Continuous Delivery, and Continuous Deployment solutions, your organization can learn to outmanoeuvre and outpace the competition. This book will equip you with the best practices to implement advanced continuous delivery and deployment systems in Jenkins. The book begins with giving you high-level architectural fundamentals surrounding Jenkins and Continuous Integration. You will cover the different installation scenarios for Jenkins, and see how to install it as a service, as well as the advanced XML configurations. Then, you will proceed to learn more about the architecture and implementation of the Jenkins Master/Save node system, followed by creating and managing Jenkins build jobs effectively. Furthermore, you'll explore Jenkins as an automation orchestration system, followed by implementing advanced automated testing techniques. The final chapters describe in depth the common integrations to Jenkins from third-party tools such as Jira, Artifactory, Amazon EC2, and getting the most out of the Jenkins REST-based API. By the end of this book, you will have all the knowledge necessary to be the definitive resource for managing and implementing advanced Jenkins automation solutions for your organization.

Who is this book for?

If you are a novice or intermediate-level Jenkins user who has used Jenkins before but are not familiar with architecting solutions and implementing it in your organization, then this is the book for you. A basic understanding of the core elements of Jenkins is required to make the best use of this book.

What you will learn

  • Create and manage various types of build jobs, and implement automation tasks to support a software project of any kind
  • Get to grips with the automated testing architecture, and scalable automated testing techniques
  • Facilitate the delivery of software across the SDLC by creating scalable automated deployment solutions
  • Manage scalable automation pipelines in Jenkins using the latest build, test, and deployment strategies
  • Implement a scalable master / slave build automation platform, which can support Windows, Mac OSX, and Linux software solutions
  • Cover troubleshooting and advanced configuration techniques for Jenkins slave nodes
  • Support a robust build and delivery system by implementing basic infrastructure as code solutions in configuration management tools such as Ansible

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 27, 2015
Length: 334 pages
Edition : 1st
Language : English
ISBN-13 : 9781784392833
Category :
Languages :
Tools :

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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Oct 27, 2015
Length: 334 pages
Edition : 1st
Language : English
ISBN-13 : 9781784392833
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 121.97
Learning Continuous Integration with Jenkins
€49.99
Mastering Jenkins
€41.99
Extending Jenkins
€29.99
Total 121.97 Stars icon
Banner background image

Table of Contents

11 Chapters
1. Setup and Configuration of Jenkins Chevron down icon Chevron up icon
2. Distributed Builds – Master/Slave Mode Chevron down icon Chevron up icon
3. Creating Views and Jobs in Jenkins Chevron down icon Chevron up icon
4. Managing Views and Jobs in Jenkins Chevron down icon Chevron up icon
5. Advanced Automated Testing Chevron down icon Chevron up icon
6. Software Deployments and Delivery Chevron down icon Chevron up icon
7. Build Pipelines Chevron down icon Chevron up icon
8. Continuous Practices Chevron down icon Chevron up icon
9. Integrating Jenkins with Other Technologies Chevron down icon Chevron up icon
10. Extending Jenkins Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7
(3 Ratings)
5 star 66.7%
4 star 33.3%
3 star 0%
2 star 0%
1 star 0%
Arunangshu Sahu Jul 08, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent Delivery.Good Behaviour. Good Payment Process
Amazon Verified review Amazon
Vj Oct 31, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good book
Amazon Verified review Amazon
Sripathi Jan 25, 2017
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Good book. Has the right set of information required for someone to master Jenkins.
Amazon Verified review Amazon
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.