Update 20181220 7 CI-CD tools for sysadmins.md

This commit is contained in:
Jerry Li 2019-02-22 17:40:34 +08:00
parent aa1e53c7f8
commit 58bda83052

View File

@ -53,7 +53,7 @@ Let's dig into the tools a bit more. We'll briefly cover each one and share link
### GitLab CI
GitLab is a fairly new entrant to the CI/CD space, but it's already achieved the top spot in the [Forrester Wave for Continuous Integration Tools][20]. That's a huge achievement in such a crowded and highly qualified field. What makes GitLab CI so great? It uses a YAML file to describe the entire pipeline. It also has a functionality called Auto DevOps that allows for simpler projects to have a pipeline built automatically with multiple tests built-in. This system uses [Herokuish buildpacks][21] to determine the language and how to build the application. Some languages can also manage databases, which is a real game-changer for building new applications and getting them deployed to production from the beginning of the development process. The system has native integrations into Kubernetes and will deploy your application automatically into a Kubernetes cluster using one of several different deployment methodologies, like percentage-based rollouts and blue-green deployments.
GitLab 可以说是 CI/CD 领域里新登场的玩家,但它却在 [Forrester一个权威调研机构 的调查报告][20]中位列第一。在一个高水平、竞争激烈的领域里是个了不起的成就。是什么让 GitLab CI 这么成功呢?它使用 YAML 文件来描述整个管道。它还有一个功能叫做 Auto DevOps可以为简单的工程自动生成管道并且包含多种内置的测试单元。这套系统使用 [Herokuish buildpacks][21]来判断语言的种类以及如何构建应用。它和 Kubernetes 整合地很紧密,可以根据不同的方案将你的应用自动部署到 Kubernetes 集群,比如灰度发布、蓝绿部署等。
GitLab 可以说是 CI/CD 领域里新登场的玩家,但它却在 [Forrester一个权威调研机构 的调查报告][20]中位列第一。在一个高水平、竞争激烈的领域里,这是个了不起的成就。是什么让 GitLab CI 这么成功呢?它使用 YAML 文件来描述整个管道。它还有一个功能叫做 Auto DevOps可以为简单的工程自动生成管道并且包含多种内置的测试单元。这套系统使用 [Herokuish buildpacks][21]来判断语言的种类以及如何构建应用。它和 Kubernetes 整合地很紧密,可以根据不同的方案将你的应用自动部署到 Kubernetes 集群,比如灰度发布、蓝绿部署等。
In addition to its CI functionality, GitLab offers many complementary features like operations and monitoring with Prometheus deployed automatically with your application; portfolio and project management using GitLab Issues, Epics, and Milestones; security checks built into the pipeline with the results provided as an aggregate across multiple projects; and the ability to edit code right in GitLab using the WebIDE, which can even provide a preview or execute part of a pipeline for faster feedback.
除了它的持续集成功能GitLab 还提供了许多补充特性,比如:将 Prometheus 和你的应用一同部署,以提供监控功能;通过 GitLab 提供的 Issues、Epics 和 Milestones 功能来实现项目评估和管理;管道中集成了安全检测功能,多个项目的检测结果会聚合显示;你可以通过 GitLab 提供的网页版 IDE 在线编辑代码,还可以快速查看管道的预览或执行状态。
@ -91,14 +91,18 @@ Jenkins 2 引入了两种原生的管道pipeline功能我在 LISA
### Concourse CI
I was first introduced to Concourse through folks at Pivotal Labs when it was an early beta version—there weren't many tools like it at the time. The system is made of microservices, and each job runs within a container. One of its most useful features that other tools don't have is the ability to run a job from your local system with your local changes. This means you can develop locally (assuming you have a connection to the Concourse server) and run your builds just as they'll run in the real build pipeline. Also, you can rerun failed builds from your local system and inject specific changes to test your fixes.
我第一次知道 Concourse 是通过 Pivotal Labs 的伙计们介绍的,当时它处于早期 beta 版本,而且那时候也很少有类似的工具。这套系统是基于微服务构建的,每个任务运行在一个容器里。它独有的一个优良特性是能够在你本地系统上运行任务,体现你本地的改动。这意味着你完全可以在本地开发(假设你已经连接到了 Concourse 的服务器),像在真实的管道构建流程一样从你本地构建项目。而且,你可以在本地修改过代码后直接重新运行构建,来检验你的改动结果。
Concourse also has a simple extension system that relies on the fundamental concept of resources. Basically, each new feature you want to provide to your pipeline can be implemented in a Docker image and included as a new resource type in your configuration. This keeps all functionality encapsulated in a single, immutable artifact that can be upgraded and modified independently, and breaking changes don't necessarily have to break all your builds at the same time.
Concourse 还有一个简单的扩展系统,它依赖于资源这一基础概念。基本上,你想给管道添加的每个新功能都可以用一个 Docker 镜像实现,并作为一个新的资源类型包含在你的配置中。这样可以保证每个功能都被封装在一个不易改变的独立工件中,方便对其单独修改和升级,改变其中一个时不会影响其他构建。
### Spinnaker
Spinnaker comes from Netflix and is more focused on continuous deployment than continuous integration. It can integrate with other tools, including Travis and Jenkins, to kick off test and deployment pipelines. It also has integrations with monitoring tools like Prometheus and Datadog to make decisions about deployments based on metrics provided by these systems. For example, the canary deployment uses a judge concept and the metrics being collected to determine if the latest canary deployment has caused any degradation in pertinent metrics and should be rolled back or if deployment can continue.
Spinnaker 出自 Netflix它更关注持续部署而非持续集成。它可以与其他工具整合比如Travis 和 Jenkins来启动测试和部署流程。它也能与 Prometheus、Datadog 这样的监控工具集成参考它们提供的指标来决定如何部署。例如在一次金丝雀发布canary deployment我们可以根据收集到的相关监控指标来做出判断最近这次发布导致了服务降级应该立刻回滚或者看起来一切OK于是继续执行部署。
A couple of additional, unique features related to deployments cover an area that is often overlooked when discussing continuous deployment, and might even seem antithetical, but is critical to success: Spinnaker helps make continuous deployment a little less continuous. It will prevent a stage from running during certain times to prevent a deployment from occurring during a critical time in the application lifecycle. It can also enforce manual approvals to ensure the release occurs when the business will benefit the most from the change. In fact, the whole point of continuous integration and continuous deployment is to be ready to deploy changes as quickly as the business needs to change.
谈到持续部署一些另类但却至关重要的问题往往被忽略掉了说出来可能有点让人困惑Spinnaker 可以帮助持续部署不那么“持续”。在整个应用部署流程期间如果发生了重大问题它可以让流程停止继续执行以阻止可能发生的部署错误。实际上CI/CD 的主要目的
### Screwdriver