Fixing TCP port for JNLP slave agents from command line

205 views
Skip to first unread message

Anthony Green

unread,
Jun 25, 2015, 4:42:59 AM6/25/15
to jenkins...@googlegroups.com
Is it possible to fix the TCP port for JNLP slave agents from command line?
I'm trying to automated the installation and configuration of Jenkins, in a Docker container, via Ansible and am trying to use the Jenkins CLI to install the job-dsl plugin.

Vincent Latombe

unread,
Jun 25, 2015, 5:14:56 AM6/25/15
to Jenkins Users
Hi,

this can be configured under Manage Jenkins > Configure global security.

Vincent

2015-06-25 10:42 GMT+02:00 Anthony Green <anthony.ch...@gmail.com>:
Is it possible to fix the TCP port for JNLP slave agents from command line?
I'm trying to automated the installation and configuration of Jenkins, in a Docker container, via Ansible and am trying to use the Jenkins CLI to install the job-dsl plugin.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a557f1b1-3810-4651-bfdc-c07c4e02028e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anthony Green

unread,
Jun 25, 2015, 7:03:30 AM6/25/15
to jenkins...@googlegroups.com


On Thursday, 25 June 2015 10:14:56 UTC+1, Vincent Latombe wrote:
Hi,

this can be configured under Manage Jenkins > Configure global security.

Vincent

That's not from the command line. 

Can it be done via the CLI or with curl as a POST request? 
Has anyone scripted it?

Anthony Green

unread,
Jun 25, 2015, 10:09:32 AM6/25/15
to jenkins...@googlegroups.com
On Thursday, 25 June 2015 12:03:30 UTC+1, Anthony Green wrote:
Can it be done via the CLI or with curl as a POST request? 

I've experimented with a POST request 

curl -X POST -d '.useSecurity=on&slaveAgentPort.type=fixed&value=2230&core%3Aapply=true&json=%7B%22useSecurity%22%3A+%7B%22slaveAgentPort%22%3A+%7B%22type%22%3A+%22fixed%22%2C+%22value%22%3A+%222230%22%7D%7D%2C+%22core%3Aapply%22%3A+%22true%22%7D' --header 'Content-Type: application/x-www-form-urlencoded' http://localhost:8080//configureSecurity/configure 

This does set the port to a fixed number

Don't know if there's a better way 
Reply all
Reply to author
Forward
0 new messages