- 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/passwdfile on the master to allow the Jenkins user a shell login. - Add a password to the
jenkinsuser so you are able tosuto that user. - Once this is done,
suto thejenkinsuser and runssh-keygen. - Then, as the
jenkinsuser,sshto the slave machine. - Create a
jenkinsuser, add them tosudoers, and create the entry withnopasswd. - Exchange the
jenkinsuser'ssshkeys 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
mavenprojectthat is set to run only onslave1. - Configure it to use
M3maven install. - Create a shell build step to run
bin/makeindex. - Archive the
index.jspand 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.