how to use port remapping using JNLP with Dockerized Jenkins using JCASC ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to use port remapping using JNLP with Dockerized Jenkins using JCASC ?

David Riemens
Hi,
I have been experimenting with Dockerized Jenkins (incl JCasC). Only the master is dockerized for now.
My Jenkins agents are started from the agent, and connect via JNLP.
The master (internal) port is 8080. the JNLP port is 50000. Both defined in the JCasC configuration.


  location:
    adminAddress: "<[hidden email]>"
    url: "http://MASTER:8080/"

  slaveAgentPort: 50000


I tried starting a Jenkins instance with remapped ports, like: 

   docker run -p 8080:9090 -p 50000:60000 <JENKINS_MASTER>

But this leads to agent connection issues.

* the master itself has the port (actually the Jenkins URL) coded inside the jcasc config file. 
    Can I take in the port mapping from the docker '-p' option ? Having a 'wrong' URL leads 
    to strange issues.
* the JNLP port remapping does not seem to work at all; here also the default port is defined
    in the JCasC file, and afaict passed back to a connecting agent via the HTTP response header.
    Consequently the slave communicates via the default JNLP port to the master docker instance.

Any one who has a working setup ?

thx, M


--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1470791657.1715274.1592379720270%40mail.yahoo.com.