{"id":5823,"date":"2018-07-30T19:38:08","date_gmt":"2018-07-30T15:38:08","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/ubuntu-jenkins-master-slave\/"},"modified":"2018-07-30T19:38:08","modified_gmt":"2018-07-30T15:38:08","slug":"how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts\/","title":{"rendered":"How to Setup Jenkins Master and Slave on Ubuntu 18.04 LTS"},"content":{"rendered":"<p><strong>Jenkins<\/strong> is an automation server forked from the Hudson project, it has support for many SCM (Source Control Management) software systems including Git, SVN, and Mercurial. Jenkins provides hundreds of plugins to automate your project. Jenkins offers support for a&#8217;master\/slave&#8217; architecture, allowing it to host a large number of project builds.<\/p>\n<h2 id=\"how-jenkins-masterslave-works\">How Jenkins &#8216;master\/slave&#8217; works?<\/h2>\n<p>Jenkins master\/slave architecture is used for distributed build environments, where the workload of building projects is distributed to multiple agent nodes, and we can use different environments for each build.<\/p>\n<p>In the Jenkins &#8216;master\/slave&#8217; architecture, a master represents itself as a basic Jenkins installation, and handles all tasks for build system. Jenkins master node will be used for scheduling jobs, monitoring slave nodes, dispatching builds to slave nodes, recording and representing the build result, and also executing build jobs directly.<\/p>\n<p>The Jenkins slave nodes set up for offload build projects from the master, and it&#8217;s required an establish connection between the master and slaves. Jenkins slave nodes can run on a variety operating systems like Windows and Linux, and there is no need to install full Jenkins packages on it.<\/p>\n<p>In this tutorial, we will learn how to set up Jenkins master-slave architecture using the latest Ubuntu version Ubuntu 18.04 LTS. We will learn to set up the Jenkins master server, and then add other Ubuntu nodes as a Jenkins slaves.<\/p>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>Ubuntu 18.04<\/li>\n<ul>\n<li>master &#8211; 10.0.15.10<\/li>\n<li>slave01 &#8211; 10.0.15.21<\/li>\n<li>slave02 &#8211; 10.0.15.22<\/li>\n<\/ul>\n<li>Root privileges<\/li>\n<\/ul>\n<h2 id=\"what-we-will-do\">What we will do?<\/h2>\n<ol>\n<li>Install Jenkins Master<\/li>\n<li>Configure Jenkins Master Credentials<\/li>\n<li>Configure Slave Agent Nodes<\/li>\n<li>Add New Slave Nodes<\/li>\n<li>Prepare Slave Agent Nodes to Execute Build<\/li>\n<li>Testing<\/li>\n<\/ol>\n<h2 id=\"step-install-jenkins-master\">Step 1 &#8211; Install Jenkins Master<\/h2>\n<p>In this tutorial, we will not cover the basic Jenkins installation. There are a number of articles on\u00a0HowtoForge that cover the Jenkins installation.<\/p>\n<p>Following is our Ubuntu 18.04 master server with Jenkins installed on it.<\/p>\n<p><a class=\"fancybox\" id=\"img-01-Jenkins_Dashboard\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/01-Jenkins_Dashboard.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts.png\" alt=\"Install Jenkins Master\" width=\"500\" height=\"290\" title=\"\"><\/a><\/p>\n<h2 id=\"step-configure-jenkins-master-credentials\">Step 2 &#8211; Configure Jenkins Master Credentials<\/h2>\n<p>When you got the master server Jenkins installed, we need to configure the master server itself. By default, there are different ways to start Jenkins agent nodes, we can launch the agent nodes through SSH, windows administrative account, and via Java Web Start (JNLP), pick the best way depending on your environment setup and operating system.<\/p>\n<p>For this guide, we will launch the agent nodes through ssh, and we need to setup Jenkins credentials on our master server.<\/p>\n<h3 id=\"generate-ssh-key\">Generate SSH Key<\/h3>\n<p>We will be using the ssh key authentication to setup our agent nodes, so we need to generate the ssh key for the Jenkins user and then upload the key to each server node manually using &#8216;ssh-copy-id&#8217;.<\/p>\n<p>On the Jenkins master server, login to the Jenkins user and generate the ssh key.<\/p>\n<p class=\"command\">su &#8211; jenkins<br \/>ssh-keygen<\/p>\n<p>And you will get the &#8216;id_rsa&#8217; private and &#8216;id_rsa.pub&#8217; public key in the &#8216;.ssh&#8217; directory.<\/p>\n<p><a class=\"fancybox\" id=\"img-02-Jenkins_Generate_SSH_Key\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/02-Jenkins_Generate_SSH_Key.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-1.png\" alt=\"Generate SSH Key\" width=\"500\" height=\"503\" title=\"\"><\/a><\/p>\n<h3 id=\"setup-credentials-on-jenkins\">Setup Credentials on Jenkins<\/h3>\n<p>Open your Jenkins dashboard and click on the &#8216;Credentials&#8217; menu on the left.<\/p>\n<p><a class=\"fancybox\" id=\"img-03-Jenkins_Setup_Credentials\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/03-Jenkins_Setup_Credentials.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-2.png\" alt=\"Setup Credentials on Jenkins\" width=\"500\" height=\"234\" title=\"\"><\/a><\/p>\n<p>And click the &#8216;global&#8217; domain link.<\/p>\n<p>Now click &#8216;Add Credentials&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-04-Jenkins_Add_Global_Credentials\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/04-Jenkins_Add_Global_Credentials.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-3.png\" alt=\"Add Credentials\" width=\"500\" height=\"181\" title=\"\"><\/a><\/p>\n<p>Now choose the authentication method.<\/p>\n<ul>\n<li>Kind: SSH Username with private key<\/li>\n<li>Scope: Global<\/li>\n<li>Username: jenkins<\/li>\n<li>Private key: Enter directly and paste the &#8216;id_rsa&#8217; private key of Jenkins user from the master server.<\/li>\n<\/ul>\n<p>Click &#8216;OK&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-05-Jenkins_Add_SSH_User_and_Private_Key\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/05-Jenkins_Add_SSH_User_and_Private_Key.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-4.png\" alt=\"choose the authentication method\" width=\"500\" height=\"291\" title=\"\"><\/a><\/p>\n<p>And the Jenkins credential with ssh auth key method have been created.<\/p>\n<p><a class=\"fancybox\" id=\"img-06-Jenkins_SSH_Credentials\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/06-Jenkins_SSH_Credentials.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-5.png\" alt=\"Jenkins credential with ssh auth key method have been created\" width=\"500\" height=\"167\" title=\"\"><\/a><\/p>\n<h2 id=\"step-set-up-slave-nodes\">Step 3 &#8211; Set up Slave Nodes<\/h2>\n<p>Now we will setup slave nodes server by installing java on those server, and create a new Jenkins user.<\/p>\n<h3 id=\"install-java\">Install Java<\/h3>\n<p>Install the &#8216;software-properties-common&#8217; packages and add the java PPA repository.<\/p>\n<p class=\"command\">sudo apt install software-properties-common apt-transport-https -y<br \/>sudo add-apt-repository ppa:openjdk-r\/ppa -y<\/p>\n<p>Now install java OpenJDK using apt command below.<\/p>\n<p class=\"command\">sudo apt install openjdk-8-jdk -y<\/p>\n<p>After the installation is complete, check the installed java version.<\/p>\n<p class=\"command\">java -version<\/p>\n<p>And you will get Java OpenJDK 1.8 installed on the system.<\/p>\n<p><a class=\"fancybox\" id=\"img-07-Install_Java_on_Jenkins_Slave\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/07-Install_Java_on_Jenkins_Slave.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-6.png\" alt=\"Install Java\" width=\"500\" height=\"121\" title=\"\"><\/a><\/p>\n<h3 id=\"add-new-jenkins-user\">Add New Jenkins User<\/h3>\n<p>Now add the &#8216;Jenkins&#8217; user to all agent nodes.<\/p>\n<p>Run the command below.<\/p>\n<p class=\"command\">useradd -m -s \/bin\/bash Jenkins<br \/>passwd Jenkins<\/p>\n<p>The &#8216;Jenkins&#8217; user for agent nodes has been created.<\/p>\n<p><a class=\"fancybox\" id=\"img-08-Add_User_Jenkins_on_Slave_Agent_Nodes\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/08-Add_User_Jenkins_on_Slave_Agent_Nodes.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-7.png\" alt=\"Add New Jenkins User\" width=\"500\" height=\"158\" title=\"\"><\/a><\/p>\n<h3 id=\"copy-the-ssh-key-from-master-to-slave\">Copy the SSH Key from Master to Slave<\/h3>\n<p>Next, we need to upload the key &#8216;id_rsa.pub&#8217; from the master to slave server nodes. We need to upload to each server nodes using &#8216;ssh-copy-id&#8217; command as below.<\/p>\n<p class=\"command\">ssh-copy-id <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"dfb5bab1b4b6b1ac9feeeff1eff1eeeaf1edee\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a><br \/>ssh-copy-id <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"83e9e6ede8eaedf0c3b2b3adb3adb2b6adb1b1\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a><\/p>\n<p>Type the Jenkins user password.<\/p>\n<p>The ssh key &#8216;id_rsa.pub&#8217; has been uploaded to all agent nodes.<\/p>\n<p><a class=\"fancybox\" id=\"img-09-Upload_the_SSH_Key_using_ssh-copy-id\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/09-Upload_the_SSH_Key_using_ssh-copy-id.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-8.png\" alt=\"Copy the SSH Key from Master to Slave\" width=\"500\" height=\"252\" title=\"\"><\/a><\/p>\n<h2 id=\"step-add-new-slave-nodes\">Step 4 &#8211; Add New Slave Nodes<\/h2>\n<p>On the Jenkins dashboard, click the &#8216;Manage Jenkins&#8217; menu, and click &#8216;Manage Nodes&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-10-Jenkins_Add_Slave_Nodes\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/10-Jenkins_Add_Slave_Nodes.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-9.png\" alt=\"Add New Slave Nodes\" width=\"500\" height=\"291\" title=\"\"><\/a><\/p>\n<p>Click the &#8216;New Node&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-11-Add_Slave_Node_Jenkins\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/11-Add_Slave_Node_Jenkins.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-10.png\" alt=\"New Node\" width=\"500\" height=\"193\" title=\"\"><\/a><\/p>\n<p>Type the node name &#8216;slave01&#8217;, choose the &#8216;permanent agent&#8217;, and click &#8216;OK&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-12-Jenkins_Add_Slave_Nodes\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/12-Jenkins_Add_Slave_Nodes.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-11.png\" alt=\"node name\" width=\"500\" height=\"185\" title=\"\"><\/a><\/p>\n<p>Now type node information details.<\/p>\n<ul>\n<li>Description: slave01 node agent server<\/li>\n<li>Remote root directory: \/home\/jenkins<\/li>\n<li>Labels: slave01<\/li>\n<li>Launch method: Launch slave agent via SSH, type the host ip address &#8216;10.0.15.21&#8217;, choose the authentication using &#8216;Jenkins&#8217; credential.<\/li>\n<\/ul>\n<p><a class=\"fancybox\" id=\"img-13-Jenkins_Add_Slave_Nodes\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/13-Jenkins_Add_Slave_Nodes.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-12.png\" alt=\"node information\" width=\"500\" height=\"291\" title=\"\"><\/a><\/p>\n<p>Now click &#8216;Save&#8217; button and wait for the master server to connect to all agent nodes and launch the agent services.<\/p>\n<p>Below are the results when the master server is connected to all agent nodes.<\/p>\n<p><a class=\"fancybox\" id=\"img-14-Jenkins_Slave_Agent_Nodes\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/14-Jenkins_Slave_Agent_Nodes.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-13.png\" alt=\"master server is connected to all agent nodes\" width=\"500\" height=\"292\" title=\"\"><\/a><\/p>\n<p>Jenkins slave nodes has been added to the master server.<\/p>\n<h2 id=\"step-prepare-slave-agent-nodes-to-execute-build\">Step 5 &#8211; Prepare Slave Agent Nodes to Execute Build<\/h2>\n<p>In this step, we will configure the Jenkins master to execute build on the slave agent nodes.<\/p>\n<p>Click on the &#8216;Manage Jenkins&#8217; menu and then click &#8216;Configure System&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-15-Jenkins_Configure_System_Slave_Node\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/15-Jenkins_Configure_System_Slave_Node.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-14.png\" alt=\"Prepare Slave Agent Nodes to Execute Build\" width=\"500\" height=\"291\" title=\"\"><\/a><\/p>\n<p>Now go to the &#8216;Slave Setups&#8217; section and define all you need as shown below.<\/p>\n<p><a class=\"fancybox\" id=\"img-16-Jenkins_Slave_Setups_Build\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/16-Jenkins_Slave_Setups_Build.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-15.png\" alt=\"the &#039;Slave Setups&#039; section\" width=\"500\" height=\"289\" title=\"\"><\/a><\/p>\n<p>More info about the &#8216;Slave Setups&#8217; on <a href=\"https:\/\/wiki.jenkins.io\/display\/JENKINS\/Slave+Setup+Plugin\" target=\"_blank\" rel=\"noopener\">link<\/a>.<\/p>\n<p>Click &#8216;Save&#8217; button and now we&#8217;re ready to execute build on slave agent nodes.<\/p>\n<h2 id=\"step-testing\">Step 6 &#8211; Testing<\/h2>\n<p>Now we want to create a new simple build for Jenkins, and we want to execute the build on the bot &#8216;slave01&#8217; and &#8216;slave02&#8217; agent nodes.<\/p>\n<p>On the Jenkins dashboard, click the &#8216;New Item&#8217; menu.<\/p>\n<p><a class=\"fancybox\" id=\"img-23-Add_New_Jon_Item_jenkins\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/23-Add_New_Jon_Item_jenkins.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-16.png\" alt=\"Testing Jenkins\" width=\"500\" height=\"290\" title=\"\"><\/a><\/p>\n<p>Type the item name, choose the freestyle project, and click &#8216;OK&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-17-Jenkins_Add_FreeStyle_Project\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/17-Jenkins_Add_FreeStyle_Project.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-17.png\" alt=\"Add Freestyle project\" width=\"500\" height=\"291\" title=\"\"><\/a><\/p>\n<p>On the general section, type the job description and check the &#8216;Restrict where this project can be run&#8217; option.<\/p>\n<p>On the &#8216;Label Expression&#8217;, specify the node such as &#8216;slave01&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-18-Jenkins_execure_Build_on_Slave_Node\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/18-Jenkins_execure_Build_on_Slave_Node.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-18.png\" alt=\"Select a node\" width=\"500\" height=\"291\" title=\"\"><\/a><\/p>\n<p>Move to the build section and choose the &#8216;Execute shell&#8217; option, type the command as below.<\/p>\n<p class=\"command\">top -b -n 1 | head -n 10 &amp;&amp; hostname<\/p>\n<p>Click &#8216;Save&#8217; button, and you will be redirected to the job page.<\/p>\n<p><a class=\"fancybox\" id=\"img-19-Jenkins_execute_Build_on_Slave_Node\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/19-Jenkins_execute_Build_on_Slave_Node.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-19.png\" alt=\"Job page\" width=\"500\" height=\"291\" title=\"\"><\/a><\/p>\n<p>Click the &#8216;Build Now&#8217; to build the project, and then click item on the &#8216;Build History&#8217; section.<\/p>\n<p><a class=\"fancybox\" id=\"img-20-Jenkins_Build_and_Execute_on_Slave_Node\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/20-Jenkins_Build_and_Execute_on_Slave_Node.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-20.png\" alt=\"Build now\" width=\"500\" height=\"291\" title=\"\"><\/a><\/p>\n<p>And the following is my result.<\/p>\n<p>Build on the &#8216;slave01&#8217; agent node.<\/p>\n<p><a class=\"fancybox\" id=\"img-21-Jenkins_Build_on_Slave01_Node\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/21-Jenkins_Build_on_Slave01_Node.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-21.png\" alt=\"Jenkins script result output\" width=\"500\" height=\"291\" title=\"\"><\/a><\/p>\n<p>Build on the &#8216;slave02&#8217; agent node.<\/p>\n<p><a class=\"fancybox\" id=\"img-22-Jenkins_Build_on_slave02_Node\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_jenkins_master_and_slave_on_ubuntu_1804\/big\/22-Jenkins_Build_on_slave02_Node.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-22.png\" alt=\"Build on node 02\" width=\"500\" height=\"291\" title=\"\"><\/a><\/p>\n<p>Installation and configuration of Jenkins master\/slave architecture and the distributed builds Jenkins has been completed successfully.<\/p>\n<h2 id=\"references\">References<\/h2>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<p>\n<a href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-jenkins-master-slave%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-23.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-jenkins-master-slave%2F&amp;text=How+to+Setup+Jenkins+Master+and+Slave+on+Ubuntu+18.04+LTS&amp;via=howtoforgecom&amp;related=howtoforgecom\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-24.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/howtoforgecom\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-25.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-jenkins-master-slave%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-setup-jenkins-master-and-slave-on-ubuntu-18-04-lts-26.png\" height=\"20\" alt=\"\" title=\"\"><\/a>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Jenkins is an automation server forked from the Hudson project, it has support for many SCM (Source Control Management) software systems including Git, SVN, and Mercurial. Jenkins provides hundreds of plugins to automate your project. Jenkins offers support for a&#8217;master\/slave&#8217; architecture, allowing it to host a large number of project builds. How Jenkins &#8216;master\/slave&#8217; works? [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-5823","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/5823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=5823"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/5823\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=5823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=5823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=5823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}