[GSoc 2018] [Student Introduction] Jenkins Remoting over Message Bus/Queue

306 views
Skip to first unread message

Pham Vu Tuan

unread,
Feb 13, 2018, 9:59:34 AM2/13/18
to Jenkins Developers
Hi,

My name is Pham Vu Tuan. I am currently studying my final year in Computer Science at Nanyang Technological University from Singapore. I am going to graduate in May and looking to do some coding activities to get busy this summer. I have some experiences as a back-end developer through my interships before. My familiar programming languages are Java, Python and Go.

I am familiar with Jenkins as a CI server in my work, I hope I can contribute some to Jenkins. Currenty, I am quite interested in project "Jenkins Remoting over Message Bus/Queue" and want to understand more about the project. I think I can learn some interesting things by doing this project. I am a user of RabbitMQ in my recent company, so I have a basic knowledge about this queue messaging technology. Currently, I haven't had any idea/proposal yet, hope it will come along the way with the support of our Jenkins community.

I can be found on LinkedIn: https://www.linkedin.com/in/phamvutuan/ and Github: https://github.com/pvtuan10.

I am looking forward to having some contributions to Jenkins community.

Regards,
Pham Vu Tuan

Jesse Glick

unread,
Feb 13, 2018, 10:53:00 AM2/13/18
to Jenkins Dev
On Tue, Feb 13, 2018 at 9:49 AM, Pham Vu Tuan <phamvu...@gmail.com> wrote:
> I am quite interested in project
> "Jenkins Remoting over Message Bus/Queue" and want to understand more about
> the project.

Probably Oleg will give you some depth but to get started
understanding the background, look at subclasses of:

https://github.com/jenkinsci/remoting/blob/master/src/main/java/hudson/remoting/CommandTransport.java

Oleg Nenashev

unread,
Feb 14, 2018, 4:23:13 AM2/14/18
to Jenkins Developers
Thanks for the interest!
I will try to provide a detailed writeup about the project.

Generally, the idea is to replace current communication layer by a pure message bus implementation. Below you can find some things from the top of my head:
  • All communications between master and agent happen over the message bus
    • Jenkins agents and masters can connect to a message bus.
      • The topology is TBD, it may be either embedded message bus (Jenkins master as a host) or an external service. The latter one is preferable IMHO
    • Jenkins agents query connection metadata over the bus.
      • Current implementations query metadata from an HTTP/HTTPs endpoint before connection. Getting rid of that would help
    • Command transport for message bus is implemented (as Jesse mentioned).
      • It would include transparent support of command invocation, RMI, classloading and data streaming
  • We utilize message bus features to make connections over Remoting more stable
    • Fault tolerance
      • The messaging layer survives short network outages
      • Nice2Have: We use multiple message bus hosts so they do not become a bottleneck
    • Traffic/Request prioritization
      • Currently we have an issue with logging/file transfer messaging overloading the channel and blocking system commands. We could use message bus features to prevent that
    • TBD: More efficient data streaming
  • Implementation:
    • Executable for the agent side
    • Jenkins plugin, which provides the master-side logic and serves the agent executable
  • We have a reference implementation for demos
    • E.g: a set of Docker images, which bring up a Jenkins cluster with a master and several agents (e.g. with Kubernetes or Docker Compose)
    • It may be somehow aligned with other ongoing activities (e.g. the demo could be built on the top of EverGreen distro)
  • TBD: a PoC for Master <=> Master communication
    • In Jenkins project we have some master => master plugins like Parameterized Remote Trigger. We could try to use a message bus to deliver messages between masters
  • TBD: Streaming agent logs to a log storage over the message bus
  • TBD: Remoting autoupdate over message bus
    • Message bust engine could be a bootstrap library, which loads Remoting library from the master after establishing the connection.
    • In Jenkins project we often see issues with update Remoting versions on the agent side. Although it would be great to solve the issue on the Remoting side, usage of such bootstrap could be a quick win
Best regards,
Oleg

вторник, 13 февраля 2018 г., 16:53:00 UTC+1 пользователь Jesse Glick написал:

Pham Vu Tuan

unread,
Feb 14, 2018, 8:11:16 AM2/14/18
to Jenkins Developers
Hi,

Thank you Oleg and Jesse for providing me useful details. I will try to get started and get back to you soon with my ideas.

Regards,
Pham Vu Tuan

Jesse Glick

unread,
Feb 14, 2018, 9:49:27 AM2/14/18
to Jenkins Dev
On Wed, Feb 14, 2018 at 4:23 AM, Oleg Nenashev <o.v.ne...@gmail.com> wrote:
> Traffic/Request prioritization
>
> Currently we have an issue with logging/file transfer messaging overloading
> the channel and blocking system commands. We could use message bus features
> to prevent that

This could be a problem. The current API

https://github.com/jenkinsci/remoting/blob/563bff81f5639db0aad501f784a97e8af6742541/src/main/java/hudson/remoting/CommandTransport.java#L29-L33

specifies that packets must be delivered in order—a transport is not
permitted to rearrange them as an optimization.

I am not sure this needs fixing, anyway. Even large transfers over the
channel are generally broken up into chunks at a higher protocol
layer, permitting other `Command`s to be interleaved. And we are
independently working on architectural changes specifically to avoid
the two examples given—use of the Remoting channel to transfer large
files or significant volumes of log text.

Gonçalo Garcia

unread,
Feb 17, 2018, 1:46:52 PM2/17/18
to Jenkins Developers
Hello everyone,

My name is Gonçalo Garcia. I'm currently pursing a Master's Degree in Distributed Systems, and completed my Bachelor's in Computer Engineering last summer. I also have some internship experience in software development in one of the fastest growing start-ups in my country. I've mainly worked with Java, C# and to a lesser extent Python, C, and Bash.

This project caught my interest among all the GSOC proposals as it would allow me to gain some experience in distributed systems while learning and improving some very widely used technologies. Some of which I have worked directly with (RabbitMQ and other MQTT frameworks) and Jenkins which was part of the pipeline in the company where I interned. Who knows, it might even help me find a topic for my thesis.

I read Oleg's quite comprehensive overview of the project and it seems like a good starting point, but I'd also like to get familiar with the code base. Are there some tasks or bugs that need to be fixed that could be a good introduction? I'd like to get my hands "dirty" as soon as possible.

For more information about me, you can find me on Linkedin: https://www.linkedin.com/in/goncalotgarcia/ and Github: https://github.com/GoncaloGarcia (here you can get a better view of my open source contributions).


I'm eager to help, and hopefully we can keep improving Jenkins.

Best Regards,
Gonçalo Garcia


Oleg Nenashev

unread,
Feb 19, 2018, 5:23:23 AM2/19/18
to Jenkins Developers
Hi Gonçalo,

Thanks for the interest!


I read Oleg's quite comprehensive overview of the project and it seems like a good starting point, but I'd also like to get familiar with the code base. Are there some tasks or bugs that need to be fixed that could be a good introduction? I'd like to get my hands "dirty" as soon as possible.

Remoting is an internal engine, so it's hard to find a "newbie-friendly" ticket. I would suggest starting from establishing the Jenkins master with agents and trying various remote operations. OTOH it is still possible to find some low-hanging fruits, especially in the agent-related area.

I have created a JIRA filter for newbie-friendly issues specific to remoting. The filter is here (you would need to login to JIRA I'd guess). I will make sure to extend the list of tickets there over this week.

Best regards,
Oleg

ajm...@g.rit.edu

unread,
Mar 4, 2018, 1:48:47 AM3/4/18
to Jenkins Developers
I am Amit Magar a graduate student pursuing masters in Computer Science from Rochester Institute of Technology. I am specializing in Computer Networks and Artificial Intelligence. I have 8 years formal education in Computer Science.

 I have 3 years of professional works experience at Accenture. Currently, I am working at Genex Services, Pensylvania as Intern in Advanced Analytics.

 In my work experience I worked on Integration of heterogeneous services, packaged and legacy applications (more than 20 applications) using Enterprise Service Bus, Web Services, and JMS queue. Our Continuous Integration stack (DevOps) included Jenkins, GIT, Chef Server and Nexus so I have good knowledge of these Tools. I am well versed in Java, SoftwarPython, XML and Docker technologies too. I have closely worked on each phase of Software development life cycle.

 I always wanted to do open source contribution, my long-term goal is to become a contributor(Github) open source code. I think GSoC is good platform to start open source contribution where I will mentorship from experience open source contributor and will get chance interact with open source community which will be helpful for future contribution in open source.

Jenkins caught my attention because I have used Jenkins before for Continuous Integration.I have gone through the detailed information of "Jenkins Remoting over Message Bus/Queue" project. I am particularly interested in "Jenkins Remoting over Message Bus/Queue" Because my previous work experience in Java, JMS queues will be helpful here and I will be able actively to contribute from day 1.

You can find more information about me on below links,

I would like to request mentors to give me some guidance here as well as in office hour to formulate a good proposal.

Thanks and Regard,
Amit Magar

Oleg Nenashev

unread,
Mar 4, 2018, 11:31:29 AM3/4/18
to Jenkins Developers
Hi all,

Since we have several students interested in this project, I propose to spend some time at office hours on Wednesday in order to discuss it.

From what I see, everybody in this thread can attend during the APAC/Europe timeslot, right? If yes, let's just talk about the project there.

BR, Oleg

Pham Vu Tuan

unread,
Mar 8, 2018, 10:59:06 AM3/8/18
to Jenkins Developers
Hello,

I am trying to setup the master and agent in my local machine. Server setup is fine, I used https://hub.docker.com/r/jenkinsci/blueocean/. But when I tried to connect an agent to it using https://hub.docker.com/r/jenkins/jnlp-slave/ by this command "docker run jenkins/jnlp-slave -url http://localhost:8080 abcd test-node" , I encountered some problems:

- Warning: JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to alter the behavior => Athough I set the env variable in the docker container for the server, I still encountered this warning message, am I missing to set it somewhere?
- Not sure if this is related to the above issue, then I cannot connect the agent to server 
SEVERE: Failed to connect to http://localhost:8080/tcpSlaveAgentListener/: Connection refused (Connection refused)
java.io.IOException: Failed to connect to http://localhost:8080/tcpSlaveAgentListener/: Connection refused (Connection refused)
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:199)
at hudson.remoting.Engine.innerRun(Engine.java:518)
at hudson.remoting.Engine.run(Engine.java:469)
Could someone help me with this setup issue?

Regards,
Pham Vu Tuan 

Oleg Nenashev

unread,
Mar 8, 2018, 11:13:56 AM3/8/18
to JenkinsCI Developers
Hi Pham,

In order to connect an agent to the Dockerized master, you need to expose the port for the agent (make the Agent port fixed in security settings + use "-p" option to expose it).
I am not sure how BlueOcean image is configured, the standard Jenkins Docker image has it documented here: https://github.com/jenkinsci/docker#usage

Hopefully it helps,
Oleg

P.S: I'd guess it's another case of WEBSITE-474, right?



--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/dMRn4zpSpkk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/9bc7adfe-b171-4767-822a-2c8ee3a6ac3e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Pham Vu Tuan

unread,
Mar 8, 2018, 12:22:34 PM3/8/18
to Jenkins Developers
I resolved the JNLP warning message by passing env variable in Docker run.
But I still encountered "Connection refused" error although I exposed the port 50000 in the Dockerized master.

My command to start the agent is: "docker run -e JNLP_PROTOCOL_OPTS='-Dorg.jenkinsci.remoting.engine.JnlpProtocol3.disabled=false' jenkins/jnlp-slave -url http://localhost:8080 abcd test-node".
Any ideas on this?
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.

Oleg Nenashev

unread,
Mar 8, 2018, 12:26:37 PM3/8/18
to JenkinsCI Developers
You still have not exposed "-p" option as proposed above.
I kindly recommend to move this prototyping discussion to a separate thread so it does not pollute the project proposal discussion.

Thanks in advance,
Oleg

To unsubscribe from this group and all its topics, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/67382d80-2d70-4a91-aa90-a9cac5056bb7%40googlegroups.com.

Pham Vu Tuan

unread,
Mar 10, 2018, 4:57:41 AM3/10/18
to Jenkins Developers
Hi,

I put my draft proposal for GSoC here https://docs.google.com/document/d/17vmPvDtMbHT7nTKRlGReFRgOtwVImhgsETLOGPW9Rso/edit?usp=sharing. I would like to receive reviews and comments about my draft proposal before the submission deadline.

Thanks,
Pham Vu Tuan

Oleg Nenashev

unread,
Mar 11, 2018, 7:28:31 PM3/11/18
to Jenkins Developers
Hi all,

Thanks to Pham for the proposal! Will try to review it tomorrow

Since we have several students interested in Remoting, I propose to setup a separate session to discuss it.
I have created a poll regarding suitable times here: https://doodle.com/poll/a93m25nzzaf29sya

Best regards,
Oleg

Oleg Nenashev

unread,
Mar 13, 2018, 7:05:57 AM3/13/18
to JenkinsCI Developers
Hi all,

I have scheduled the meeting to Thursday, 4PM-5PM UTC.
If you are a member of https://groups.google.com/forum/#!forum/jenkinsci-gsoc-all-public , you should have received an invitation. If no, please join this mailing list and ping me.

BR, Oleg



To unsubscribe from this group and all its topics, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/245f81a5-886f-439d-af4e-83022f40f130%40googlegroups.com.

Oleg Nenashev

unread,
Mar 15, 2018, 11:57:49 AM3/15/18
to Jenkins Developers
Hi all,

Just heads-up before the incoming call.
I have created a new filter, which captures more Remoting-related newbie-friendly issues in JIRA different components: https://issues.jenkins-ci.org/issues/?filter=18242

Best regards,
Oleg

Oleg Nenashev

unread,
Mar 26, 2018, 7:18:12 AM3/26/18
to Jenkins Developers
Hi Goncalo and Amit,

Just a reminder, Mar 27 16:00 PM UTC is a deadline for proposals.
If you are still interested in the project, please make sure to submit your final proposal by this time.

We will also have the last Q&A office hours today at 18:00PM UTC. Feel free to join if you have any questions.

Best regards,
Oleg Nenashev
Reply all
Reply to author
Forward
0 new messages