从头开始安装 Jenkins 实例/预配置 Jenkins 的最佳实践

Best Practices for Installing Jenkins Instance / Pre-configured Jenkins from scratch

Jenkins 前景广阔,很难跟踪新进展,尤其是如果您不是常规 DevOps。

我目前正在从头开始设置 Jenkins CI 系统。我正在寻找启动 Jenkins 实例和 运行 的最佳方法。我查看了 JAR 中的选项,例如 运行、设置服务、docker、蓝海等

我想知道您是否可以分享您的经验,如果市场上已经有预配置的设置或可扩展的 Jenkins 解决方案可供使用 configured/deployed。

这个 Jenkins 实例的主要租户之一是测试自动化人员 运行 他们的 Selenium 测试(或者我正在理想地查看 Windows 服务器安装,尽管 CentOS 是一个选项)并且想要让他们尽可能轻松地工作。

也许最接近预配置 Jenkins 实例的是使用 Docker 图像 (https://hub.docker.com/r/jenkins/jenkins). But also with the docker image, you have to selected plugins and so on. Maybe you want to raise an issue as purposal in the Jenkins Docker repository to make it possible to pre-configure Jenkins (Github Repo: https://github.com/jenkinsci/docker/issues)?

我是 Jenkins 管理员。在我的公司,我使用 Helm chart with a custom docker image preloaded with plugins (you don't want to rely on the plugin update site during startup). All configuration is done with the Configuration as Code Plugin. We're using the Kubernetes plugin to do horizontally scaling. No builds are allowed on the build controller, everything is done within agents, which is custom docker images inspired by these images. and we don't allow no builds to run on the build controller. This works very well, and I'm very happy with the setup. There is also a Jenkins Kubernetes Operator 在我们的 Kubernetes 集群上设置了 Jenkins,这看起来很有前途,但我自己还没有尝试过。

如果你没有使用 Kubernetes,你可以看看 Jenkins Evergreen project

PS:Blue Ocean 项目已经结束,但 Cloudbees 的人们目前正在对 UX 进行大修。他们刚刚发布了一个每周版本,他们摆脱了所有表格,因此设计慢慢变得越来越灵敏,并且还出现了一组新图标。