Jenkins architecture

68 views
Skip to first unread message

Jeroen Haaksema

unread,
Feb 27, 2020, 10:07:24 AM2/27/20
to Jenkins Developers

Hello,

First of, I’m really sorry if this is not the right place to ask this, if not please let me know who I could direct this to!I am a CS student who is doing a course on architecture and I have chosen Jenkins. Part of the course is communicating with the architect. There doesn’t seem to be just a single architect within Jenkins and your group seems to me the closest I will get to an actual architect. The assignment I’m working on is a reconstruction of the architecture from an open source software project and one of the things we are looking at is Architecturally Significant Requirements(ASR). Which comes down to requirements set in stone with no wiggle room. I would really appreciate it if someone would be able to either confirm or deny if the ASR’s I have defined are correct.

  • Would you say that part of the reason that Jenkins was developed in Java is due to that this means that the codebase can be used for Linux, Mac Os X and Windows? (this obviously skips over that Oracle, the owner of Java was part of the inception of Jenkins)
  • Would you say that using HTTP to manage slave nodes is to make it possible for Jenkins to have nodes on different operating systems working together?

Furthermore I have some other questions:

  • Would you say that one of the main features of Jenkins is the Pipeline and the option to customise which steps are taken including the order and possible steps after the completion of test?
  • What is the reason that plugins can be written in Kotlin?
  • Would you say that an external interface used by Jenkins is a link to a source control management system (eg. GitHub) ?

 

I understand that most if not all of you are working on this on a voluntary basis but if you could steer me in the right way or answer some of these questions it would be greatly appreciated!

 

Kind regards,

 

Jeroen Haaksema

James Harrison

unread,
Feb 27, 2020, 11:27:45 AM2/27/20
to jenkin...@googlegroups.com
Hey - I sit on this mailing list and am looking at some newbie-issues; I'm definitely not a core developer or anything, but I wanted to tackle the Jenkins in Java question.


On Thu, Feb 27, 2020 at 8:07 AM Jeroen Haaksema <jeroenh...@gmail.com> wrote:

Hello,

First of, I’m really sorry if this is not the right place to ask this, if not please let me know who I could direct this to!I am a CS student who is doing a course on architecture and I have chosen Jenkins. Part of the course is communicating with the architect. There doesn’t seem to be just a single architect within Jenkins and your group seems to me the closest I will get to an actual architect. The assignment I’m working on is a reconstruction of the architecture from an open source software project and one of the things we are looking at is Architecturally Significant Requirements(ASR). Which comes down to requirements set in stone with no wiggle room. I would really appreciate it if someone would be able to either confirm or deny if the ASR’s I have defined are correct.

  • Would you say that part of the reason that Jenkins was developed in Java is due to that this means that the codebase can be used for Linux, Mac Os X and Windows? (this obviously skips over that Oracle, the owner of Java was part of the inception of Jenkins)

If you do a quick wikipedia search for the Jenkins project, you'll see that it didn't originate in Oracle at all. Kohsuke Kawagachi, the original author, worked at Sun Microsystems, the original developer of the JVM :  )

Checking the references on the wikipedia page got me to this interview with Kohsuke after he received an O'Reilly Open Source Achievement Award https://www.red-gate.com/simple-talk/opinion/geek-of-the-week/kohsuke-kawaguchi-geek-of-the-week/. I picked that because I figure an interview about an award normally covers "How did this project start?" kinds of questions.

A quote from that article reads:
====
There were several motivations for writing it. One was that despite I was working in a group of Sun Microsystems that designed and developed JavaEE (the framework layer for server applications written in Java), I’ve never written apps on top of it. And that’s not a good thing. I’d been meaning to write one so effectively that idea became Jenkins; I thought this could be a good vehicle to make myself learn JavaEE.
====

So, he chose Java because he wanted to motivate himself to learn JavaEE for work.
  • Would you say that using HTTP to manage slave nodes is to make it possible for Jenkins to have nodes on different operating systems working together?

Furthermore I have some other questions:

  • Would you say that one of the main features of Jenkins is the Pipeline and the option to customise which steps are taken including the order and possible steps after the completion of test?
  • What is the reason that plugins can be written in Kotlin?
  • Would you say that an external interface used by Jenkins is a link to a source control management system (eg. GitHub) ?

 

I understand that most if not all of you are working on this on a voluntary basis but if you could steer me in the right way or answer some of these questions it would be greatly appreciated!

 

Kind regards,

 

Jeroen Haaksema

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/a4ce6a3a-6690-4b03-8f5f-4ec642eb18f7%40googlegroups.com.

Matt Sicker

unread,
Feb 27, 2020, 2:47:56 PM2/27/20
to jenkin...@googlegroups.com
Responses inline below:

On Thu, Feb 27, 2020 at 9:07 AM Jeroen Haaksema
<jeroenh...@gmail.com> wrote:
>
> Hello,
>
> First of, I’m really sorry if this is not the right place to ask this, if not please let me know who I could direct this to!I am a CS student who is doing a course on architecture and I have chosen Jenkins. Part of the course is communicating with the architect. There doesn’t seem to be just a single architect within Jenkins and your group seems to me the closest I will get to an actual architect. The assignment I’m working on is a reconstruction of the architecture from an open source software project and one of the things we are looking at is Architecturally Significant Requirements(ASR). Which comes down to requirements set in stone with no wiggle room. I would really appreciate it if someone would be able to either confirm or deny if the ASR’s I have defined are correct.

Correct; there isn't a single architect behind Jenkins, though Kohsuke
Kawaguchi was the original developer which is the closest thing I can
think of.

> Would you say that part of the reason that Jenkins was developed in Java is due to that this means that the codebase can be used for Linux, Mac Os X and Windows? (this obviously skips over that Oracle, the owner of Java was part of the inception of Jenkins)

Cross platform capabilities are useful, though I'd also assume it was
also chosen as a familiar tech stack by the original developer at the
time when it was just a side project running on a spare computer at
his office.

> Would you say that using HTTP to manage slave nodes is to make it possible for Jenkins to have nodes on different operating systems working together?

The nodes are managed through a custom protocol which has allowed it
to be implemented in several concrete implementations such as
launching over SSH, using the protocol directly (encrypted via TLS)
over TCP/IP for agent-initiated TCP/IP connections, and even using
Apache Kafka as a message broker of sorts.

> Furthermore I have some other questions:
>
> Would you say that one of the main features of Jenkins is the Pipeline and the option to customise which steps are taken including the order and possible steps after the completion of test?

Yes, though do note that pipelines are a more recent feature than the
project itself, though just through a different UI. Automation of
tasks and reacting to them is the gist in my opinion, yes.

> What is the reason that plugins can be written in Kotlin?

Kotlin was designed to interoperate easily with Java [1], so it's a
natural extension to be able to do the same in Jenkins. Due to
JEP-200, though, there may be extra boilerplate code needed to save
and load config objects written using Kotlin collection classes, but I
haven't actually validated that.

[1]: https://kotlinlang.org/docs/reference/java-interop.html

> Would you say that an external interface used by Jenkins is a link to a source control management system (eg. GitHub) ?

Yes, though I'd clarify that there are two potential interfaces there:
the git repository itself and webhooks from GitHub (or other similar
SCM hosts). There are even more potential interfaces there, though the
git repository one is a fundamental one as most Jenkins jobs need to
pull data from somewhere continuously, and a git repository is a
natural tool for that.


--
Matt Sicker
Senior Software Engineer, CloudBees

Jeroen Haaksema

unread,
Feb 27, 2020, 3:21:05 PM2/27/20
to Jenkins Developers
Hey Gwen, 

Thank you for taking the time to write an answer! I'm not really sure how I got it in my head that Oracle built Jenkins but that interview is really helpfull. 

Op donderdag 27 februari 2020 17:27:45 UTC+1 schreef Gwen:
To unsubscribe from this group and stop receiving emails from it, send an email to jenkin...@googlegroups.com.

Esther Alvarez

unread,
Feb 28, 2020, 5:30:07 AM2/28/20
to jenkin...@googlegroups.com


I don't have a deep knowledge in jenkins, so apologies in advance if I say something which is not accurate. 


> What is the reason that plugins can be written in Kotlin?
I would say that plugins can be written in any language executable by the JVM that can interoperate with java classes, like scala and groovy. It may be challenging having some maven plugins work with them, but should be possible.


Would you say that an external interface used by Jenkins is a link to a source control management system (eg. GitHub) ?

Another main principle in Jenkins architecture is the plugins system. Most of the features are implemented by plugins, including those that interact with external interfaces. For example, the interaction with maven, node, git or mercurial is implemented by plugins.
So, answering your question, the source control management system is an external interface, depending on which plugins you install. Also, integration with LDAP for authentication, sonar for code analysis, nexus and docker registries, kubernetes, SSH to un agents, all of them can be external interfaces too. This list can be as long as you can imagine, as anybody can create a plugin to connect with whatever they want.


To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/9abcbd2d-1898-4042-a28a-75bf620209a3%40googlegroups.com.

mike cirioli

unread,
Feb 28, 2020, 7:13:00 AM2/28/20
to Jenkins Developers
I would even go a step further regarding plugins, the @Extension mechanism (on which plugins are based) is used internally quite a bit as well.

Would you say that an external interface used by Jenkins is a link to a source control management system (eg. GitHub) ?

Another main principle in Jenkins architecture is the plugins system. Most of the features are implemented by plugins, including those that interact with external interfaces. For example, the interaction with maven, node, git or mercurial is implemented by plugins.
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkin...@googlegroups.com.

Jesse Glick

unread,
Feb 28, 2020, 8:43:22 AM2/28/20
to Jenkins Dev
On Thu, Feb 27, 2020 at 2:47 PM Matt Sicker <msi...@cloudbees.com> wrote:
> Kotlin was designed to interoperate easily with Java, so it's a
> natural extension to be able to do the same in Jenkins. Due to
> JEP-200, though, there may be extra boilerplate code needed to save
> and load config objects written using Kotlin collection classes

I know little about Kotlin, but we have had some experience with
plugins written in non-Java languages such as JRuby and it is a
terrible headache from a security and maintainability perspective. (In
particular because Jenkins uses no less than _three_ distinct Java
serialization frameworks.)

Jeroen Haaksema

unread,
Feb 28, 2020, 1:45:35 PM2/28/20
to Jenkins Developers
Thank you for taking the time to provide a response! It has really clarified some of the things I wasn't super sure on. 

Op donderdag 27 februari 2020 20:47:56 UTC+1 schreef Matt Sicker:

Jeroen Haaksema

unread,
Feb 28, 2020, 1:53:14 PM2/28/20
to Jenkins Developers
Thank you for your answer! I was assuming that source control management was a part of Jenkins since both the Hudson and Jenkins module feature it, but if I understand correctly this is actually a plugin? I will look into the @Extension decorator as Mike mentioned and see if I can find it in action. 

Op vrijdag 28 februari 2020 11:30:07 UTC+1 schreef Esther Alvarez:

Jeff Pearce

unread,
Feb 28, 2020, 2:00:33 PM2/28/20
to jenkin...@googlegroups.com

That’s correct. At its heart Jenkins is just a task runner. Most people use if for CICD, so they would have a SCM hook, but it’s not required

 

From: <jenkin...@googlegroups.com> on behalf of Jeroen Haaksema <jeroenh...@gmail.com>
Reply-To: "jenkin...@googlegroups.com" <jenkin...@googlegroups.com>
Date: Friday, February 28, 2020 at 10:53 AM
To: Jenkins Developers <jenkin...@googlegroups.com>
Subject: Re: Jenkins architecture

 

Notice: This email is from an external sender.

 

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/acb89e44-8734-46f5-a30b-c18537ffa6ff%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages