Jenkins master with JNLP slaves

In this document, I will show how to configure Jenkins master and slave nodes. In the slave nodes, AWS CLI and Docker must be installed and configured. All of the topology will be configured with Vagrant.

The network topology will be as following:

I have used my WiFi card as the public network to direct connection in the Virtual machines. For that, you need to change your own Physical or WiFi card in the Vagrantfile configuration file.

Download codes from git repository and start all machines:

$ git clone
$ cd vagrant-codes-in-practice/jenkins-gitlab-gogs-webdeploy
$ vagrant up

Get ‘admin’ password for Jenkins master server:

$ vagrant ssh JenkMaster -c 'sudo cat /var/lib/jenkins/secrets/initialAdminPassword'

Default login for Nexus is ‘admin’ and password is ‘admin123’. Jenkins listens on port 8080 and Nexus listens on port 8081.

Login to the Jenkins server:

Go to the ‘Manage Jenkins’ -> ‘Manage Plugins’

At the end of list select ‘All’ -> ‘Download now and install after restart’

Then go to the ‘Manage Jenkins’ -> ‘Manage Plugins’ -> ‘Available’ tab and then select checkbox ‘Self-Orginizing Swarm Plug-In Modules’ and then press the ‘Download now and install after restart’ button.

Create user for our slave nodes(This username and password is defined in our /etc/rc.local file for each of nodes). Go to the ‘Manage Jenkins’ -> ‘Manage Users’ -> ‘Create User’ then add username and password and press to the ‘Create User’ button

Before connection slave nodes go to the -> ‘Manage Jenkins’ -> ‘Configure Global Security’

In the ‘TCP port for JNLP agents’ -> ‘Random’ and then press ‘Save’ button:

Note it is important and there is a bug in the Jenkins. Before start slave nodes do the following thing in the master node. Go to the ‘Manage Jenkins’ -> ‘Configure System’ and then press ‘Save’ button.

At the end we must see the similar result as flowing:


One thought on “Jenkins master with JNLP slaves

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s