Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inbound: support for websockets #421

Open
dduportal opened this issue May 11, 2023 · 2 comments
Open

Inbound: support for websockets #421

dduportal opened this issue May 11, 2023 · 2 comments

Comments

@dduportal
Copy link

What feature do you want to see added?

In #406, a new launch method for inbound agents on Linux was introduced.

The documentation states that it requires the TCP port for agent protocol to be set up, static and reachable.

I would like to be able to specify "Websockets" like I can do with permanent agents or Kubernetes agents, so the agent would connect to the controller through HTTP+Websockets to avoid setting up and opening this TCP port (which cannot be load balanced).

Upstream changes

#406

@timja
Copy link
Member

timja commented May 11, 2023

This makes sense although it could be worked around by explicitly telling it to use websockets in a similar manner to #422 (comment)

I've tested locally (with just a permanent agent) and this worked:

java -cp ~/Downloads/agent.jar hudson.remoting.jnlp.Main -headless -webSocket -url http://localhost:8080/jenkins -workDir /tmp/work $SECRET $AGENT_NAME

opening this TCP port (which cannot be load balanced).

What do you mean by cannot be loadbalanced? You can't load balance Jenkins anyway?

@dduportal
Copy link
Author

Thanks I'm going to try the solution with init script, and if it works I'll send a documentation PR.

Same as #422 (comment): it would we a nice UX if the end user could set up the agent through the UI and have it preconfigured (I guess passing userdata to the VM would help for this one, I'll give it a try as well).

What do you mean by cannot be loadbalanced? You can't load balance Jenkins anyway?

The controller itself: no. But the route from the agent process location to a given controller can have many moving paths and my experience with the JNLP over TCP is such setup is not the most positive one, while websockets has embeded retries mechanisms (also, easier to expose as HTTP(s) already is and less configuration).

But it's a nice to have of course :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants