-
Improvement
-
Resolution: Fixed
-
Major
-
Jenkins 1.525, Amazon EC2 plugin v1.19-unreleased (last commit: #1e009adfa3)
From the help message in EC2Cloud configuration, I need to let spot instance notify the Jenkins master that this slave is available.
As my AMI is based on CentOS, I cannot take the script directly as it mentioned. So I have gone through the script and here is my understanding on the callback process.
Jenkins master does the spot-instance request also with a default parameter in instance userdata, like:
JENKINS_URL=http://1.1.1.1:8080/&SLAVE_NAME=XXXXXXX&USER_DATA=
Then the callback script will first download the "slave.jar" and use it to notify Jenkins Master that this slave is alive:
java -jar slave.jar -jnlpUrl http://1.1.1.1:8080/XXXXXXX/slave-agent.jnlp
However, due to my Jenkins master deployed internally with no public access, Jenkins master will keep considering this slave not ready.
I also try to run these commands on an internal machine and wish Master could let it go. But only get the "403 forbidden" response.
Could you please help me on this issue?
I feel this deployment is also quite common then.
Thanks
Henry
It sounds like your configuration is set up correctly. As you state, the issue is your non-public Jenkins master.
Since jnlp requires the slave to connect to the master, it will not be possible for the instance to find the master and connect to it. Since currently the only way to launch Spot instances through the plugin is with jnlp, I don't think this will be easily fixable.
The alternative is to give an option to launch the Spot instances in the same manner as On demand instance in which the Jenkins master connects to the slave. This would result in Jenkins polling EC2 frequently on the initial start up of a Spot instance to determine when there is a usable instance. Also if a persistent bid is used, and the Spot instance was terminated, the instance might eventually restart, but Jenkins would not know about it.