- Lab
- A Cloud Guru
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.
Path 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
What's a lab?
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.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.