- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Distributing a Build
In this hands-on lab, we will configure Maven to build a project pulled from SCM — but we will configure a slave node to build the project instead of building the project on the master node.

Lab Info
Table of Contents
-
Challenge
Configure the Slave Machine for Use with the Jenkins Master
- Modify the
/etc/passwd
file on the master to allow the Jenkins user a shell login. - Add a password to the
jenkins
user so you are able tosu
to that user. - Once this is done,
su
to thejenkins
user and runssh-keygen
. - Then, as the
jenkins
user,ssh
to the slave machine. - Create a
jenkins
user, add them tosudoers
, and create the entry withnopasswd
. - Exchange the
jenkins
user'sssh
keys with the slave server. - Verify key login is working on the slave server.
- Modify the
-
Challenge
Run the Maven Build on the Remote Agent
- Create a Maven installation named
M3
. - From Manage Jenkins > Manage Nodes, set up the remote node.
- Label the node
slave1
. - Create a freestyle project named
mavenproject
that is set to run only onslave1
. - Configure it to use
M3
maven install. - Create a shell build step to run
bin/makeindex
. - Archive the
index.jsp
and ensure it gets fingerprinted.
- Create a Maven installation named
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.