how to configure Jenkins' Slave Nodes

Please follow the screen shots

Go to Configure Jenkins







[root@localhost Downloads]# scp  -i jenkinsnew.pem  slave.jar ubuntu@34.230.90.99:/home/ubuntu/
slave.jar                                                                                                          100%  713KB 713.2KB/s   00:00    
[root@localhost Downloads]# 



java -jar slave.jar -jnlpUrl http://ec2-54-210-147-105.compute-1.amazonaws.com:8080/computer/slave1/slave-agent.jnlp -secret 2120971706c29441e2b7340883b76ac6392aae123899dff360bf6c6777d0517a



root@docker:/var/lib/jenkins# java -jar slave.jar -jnlpUrl http://ec2-54-210-147-105.compute-1.amazonaws.com:8080/computer/slave1/slave-agent.jnlp -secret 2120971706c29441e2b7340883b76ac6392aae123899dff360bf6c6777d0517a
Jul 28, 2017 4:47:54 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up slave: slave1
Jul 28, 2017 4:47:54 PM hudson.remoting.jnlp.Main$CuiListener 
INFO: Jenkins agent is running in headless mode.
Jul 28, 2017 4:47:54 PM hudson.remoting.Engine startEngine
WARNING: No Working Directory. Using the legacy JAR Cache location: /root/.jenkins/cache/jars
Jul 28, 2017 4:47:54 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://ec2-54-210-147-105.compute-1.amazonaws.com:8080/]
Jul 28, 2017 4:47:54 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, CLI2-connect, JNLP-connect, Ping, CLI-connect, JNLP2-connect]
Jul 28, 2017 4:47:54 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
  Agent address: ec2-54-210-147-105.compute-1.amazonaws.com
  Agent port:    39544
  Identity:      52:d2:fa:44:9e:46:02:30:24:5d:7c:ab:16:3e:ab:0a
Jul 28, 2017 4:47:54 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Jul 28, 2017 4:47:54 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to ec2-54-210-147-105.compute-1.amazonaws.com:39544
Jul 28, 2017 4:47:54 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP4-connect
Jul 28, 2017 4:47:54 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Remote identity confirmed: 52:d2:fa:44:9e:46:02:30:24:5d:7c:ab:16:3e:ab:0a
Jul 28, 2017 4:47:55 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected

Once it is connected you will see the Node - slave as Connected and in Green.
Congrats!!! you can run your jobs on the Slave/clients now.
I have created a sample project with just a Shell script on the slave node and I am able to Build my project on the Slave now...

I did not use any complex build, since this demo is to show only how to configure Jenkins Agents. Later you can play around with complex configuration once the connectivity is met.

I have tried to use :"Docker SSH", "SSH clients", Cloud as "Docker", AWS cloud config but nothing worked as expected. But this one is pretty simple and easy.











No comments:

Installing Ingress Controller - Kubernetes

Installing the Ingress Controller Prerequisites Make sure you have access to the Ingress controller image: For NGINX Ingress controll...