The jenkins-X is based on kubernetes, and use the Sidecar pattern too. However
See more at https://codefresh.io/continuous-deployment/codefresh-versus-jenkins-x/
Here is my solution, every masters are independence, where data get eventually consistency with low latency
All components are made with opensource products.
This solution is not a smart solution, but saves your time
shell
step need to be reimplemented with redirect for centralized logs.Modifications with jenkins.war and other plugins are not required. PAAS bind naming services(k8s/nomad) are also not required.
Just create a jenkins plugin(not open sourced here)
hudson.model.listeners.RunListener
to send back job results(RUNNING/SUCCESS/FAIL).Problems | Before | After |
---|---|---|
Pipeline defination | Master Disk | Database |
Build result | Master Disk | Forwarding to data lake by RunListener class |
Step details | Master Disk | Just forwarding, not persistence |
Stdout Log | Master Disk | Forwarding to ELK by filebeats |
Webhook | Master Disk | Spring Controller wrappers |
Cron Job | Master Disk | Quartz(on Database)+WebHook |
SCM pulling | Master Disk | Quartz or WebHook |
Load balancer | No | Consul blocking query |
visualization | JSP like | Powered by Spring RESTful API |
I should emphasize again that this solution is not cheap at all.
Single Jenkins | Paid Solutions | Sidecar based Solution | |
---|---|---|---|
Costs | Free, no guarantees | License fees | Customization costs and time |
Parallels jobs | Limited | By license type | 10K Jobs+, depends on your datalake |
HA | No | Yes | Yes(Flight jobs still down) |
Pipelines as code | Groovy | YAML/NodeJS | Same as Jenkins + DSL |
Tenant | No | Yes | Customized by Spring |
Authorization | Simple | Yes | Customized by Spring(RBAC/LDAP/…) |
CD | No | Yes | DSL template |
So, what you will get depends on how much you pay. This post proposes a way to implement mutilple masters, but requires a lot of works and time.