-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add support to remote kafka plugin #316
Conversation
87cbd15
to
41cbafe
Compare
Thanks for the contribution! I have to admit I am uneasy about the kafka-remoting plugin. Total 80 installations worldwide, no other Jenkins plugins supporting this, fairly rich dependencies, no release in past 2 years, etc. Also, the scarce documentation mentioning that "There are also issues with traffic prioritization and multi-agent communications, which impact Jenkins stability and scalability.". All in all it seems to me as an experiment that did not quite gained popularity, and there is no investment into it anymore. @ktaborski, do you have positive experience using kafka-remoting? How about implementing this as a standalone plugin depending on both kafka-remoting and openstack-cloud that will add support for openstack-cloud to use kafka nodes? I would be happy to help you on crafting one... |
977e5ab
to
4de0c41
Compare
do you have positive experience using kafka-remoting? Now I am in PoC/testing phase, so hard to say about positive experience. Normally I am using openstack plugin to launch slaves and I met lack of kafka-remoting support. How about implementing this as a standalone plugin depending on both kafka-remoting and openstack-cloud that will add support for openstack-cloud to use kafka nodes? |
Also, the scarce documentation mentioning that "There are also issues with traffic prioritization and multi-agent communications, which impact Jenkins stability and scalability." In "Benefits to the community section": |
62cd279
to
1078233
Compare
You are right, my bad.
Let me help you with that. I will do the code review here to keep you going. Once the new plugin is ready, the code can be moved there easily. |
@@ -164,6 +164,8 @@ private Object readResolve() { | |||
LauncherFactory lf = null; | |||
if ("JNLP".equals(slaveOptions.slaveType)) { | |||
lf = LauncherFactory.JNLP.JNLP; | |||
} else if ("KAFKA".equals(slaveOptions.slaveType)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to add these into readResolve
methods. They are only used to migrate old config to new one. And since kafka is just being added, it does not exist in user configs.
lf = new LauncherFactory.SSH(credentialsId); | ||
} else if ("JNLP".equals(slaveType)) { | ||
lf = LauncherFactory.JNLP.JNLP; | ||
} else if ("KAFKA".equals(slaveType)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to add these into readResolve
methods. They are only used to migrate old config to new one. And since kafka is just being added, it does not exist in user configs.
@@ -122,6 +122,8 @@ private Object readResolve() { | |||
lf = new LauncherFactory.SSH(credentialsId); | |||
} else if("JNLP".equals(slaveType)) { | |||
lf = LauncherFactory.JNLP.JNLP; | |||
} else if("KAFKA".equals(slaveType)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to add these into readResolve
methods. They are only used to migrate old config to new one. And since kafka is just being added, it does not exist in user configs.
@@ -153,6 +155,9 @@ private Object readResolve() { | |||
} else if ("SSH".equals(slaveOptions.slaveType)) { | |||
lf = new LauncherFactory.SSH(slaveOptions.credentialsId); | |||
slaveOptions.slaveType = slaveOptions.credentialsId = null; | |||
} else if ("KAFKA".equals(slaveOptions.slaveType)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to add these into readResolve
methods. They are only used to migrate old config to new one. And since kafka is just being added, it does not exist in user configs.
@@ -77,6 +78,16 @@ | |||
"Labels of the node.", | |||
r -> r.labelString | |||
); | |||
stub( | |||
"SLAVE_KAFKA_SECRET", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refrain from using the word slave
and prefer agent
. https://www.jenkins.io/blog/2020/06/18/terminology-update/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to be compliant with SLAVE_JNLP_SECRET variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we would have to rename that one as well.
r -> Util.fixNull(KafkaSecretManager.getConnectionSecret(r.serverName)) | ||
); | ||
stub( | ||
"SLAVE_NAME", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refrain from using the word slave
and prefer agent
. https://www.jenkins.io/blog/2020/06/18/terminology-update/
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> | ||
<f:section title="KAFKA remote agent launch"> | ||
<f:entry> | ||
<p>Jenkins will wait for the Kafka connection to be initiated from the slave itself. Note this plugin does not initiate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refrain from using the word slave
and prefer agent
. https://www.jenkins.io/blog/2020/06/18/terminology-update/
<f:section title="KAFKA remote agent launch"> | ||
<f:entry> | ||
<p>Jenkins will wait for the Kafka connection to be initiated from the slave itself. Note this plugin does not initiate | ||
that. See help for <i>User Data</i> field for more information on the available options.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might need to massage this a bit, by ideally moving the details here. For now, JNLP was the only inbound connection supported so the user-data config mentioned that only. Kafka seems to require specific launching instructions, that needs to be documented here (or at least link to plugin documentation). Also, there will be no way for the other plugin to contribute documentation for User Data, so this might be the only place to document it.
Add support to remote Kafka plugin.
I've added similar code part as for JNLP connection.
Resolves: #315