1. 程式人生 > >【Linux】【Services】【SaaS】Spinnaker

【Linux】【Services】【SaaS】Spinnaker

docke 機器 base pipe hoc ron jobs 持續交付 cer

1. 簡介

1.1. 說明:

Spinnaker 是 Netflix 的開源項目,是一個持續交付平臺,它定位於將產品快速且持續的部署到多種雲平臺上。Spinnaker 通過將發布和各個雲平臺解耦,來將部署流程流水線化,從而降低平臺遷移或多雲品臺部署應用的復雜度,它本身內部支持 Google、AWS EC2、Microsoft Azure、Kubernetes和 OpenStack 等雲平臺,並且它可以無縫集成其他持續集成(CI)流程,如 git、Jenkins、Travis CI、Docker registry、cron 調度器等。簡而言之,Spinnaker 是致力於提供在多種平臺上實現開箱即用的集群管理和部署功能的平臺。

1.2. 官方網站:

https://www.spinnaker.io

1.3. Ebook

https://www.spinnaker.io/ebook/#continuous-delivery-with-spinnaker

1.4. 參考文章

https://blog.csdn.net/aixiaoyang168/article/details/78717151

2. 架構

2.1. 微服務說明

組件名稱 組件說明 端口
Deck the browser-based UI 9000
Gate the API gateway. The Spinnaker UI and all api callers communicate with Spinnaker via Gate 8084
Orca the orchestration engine. It handles all ad-hoc operations and pipelines. 8083
Clouddriver responsible for all mutating calls to the cloud providers and for indexing/caching all deployed resources. 7002
Front50 used to persist the metadata of applications, pipelines, projects and notifications. 8080
Rosco

the bakery.

It is used to produce machine images (for example GCE images, AWS AMIs, Azure VM images). It currently wraps packer, but will be expanded to support additional mechanisms for producing images.

8087
Igor used to trigger pipelines via continuous integration jobs in systems like Jenkins and Travis CI, and it allows Jenkins/Travis stages to be used in pipelines. 8088
Echo

Spinnaker’s eventing bus.

It supports sending notifications (e.g. Slack, email, Hipchat, SMS), and acts on incoming webhooks from services like Github.

8089
Fiat

Spinnaker’s authorization service.

It is used to query a user’s access permissions for accounts, applications and service accounts.

7003
Kayenta provides automated canary analysis for Spinnaker. 8064
Halyard

Spinnaker’s configuration service.

Halyard manages the lifecycle of each of the above services. It only interacts with these services during Spinnaker startup, updates, and rollbacks.

8090

2.2. 系統依賴

技術分享圖片

2.3. 架構:集群管理和部署管理

技術分享圖片

集群管理主要用於管理雲上的資源,它分為以下幾個塊:

  • Server Group:服務組,是資源管理單位,識別可部署組件和基礎配置設置,它並且關聯了一個負載均衡器和安全組,當部署完畢後,服務組就相當於一組運行中的軟件實例集合,如(VM 實例,Kubernetes pods)。
  • Cluster:集群,由用戶定義的,對服務組的邏輯分組。
  • Applications:應用,是對集群的邏輯分組。
  • Load Balancer:負載均衡,用於將外部網絡流量重定向到服務組中的機器實例,還可以指定一系列規則,用來對服務組中的機器實例做健康監測。
  • Security Group:安全組,定義了網絡訪問權限,由IP、端口和通信協議組成的防火墻規則。

部署管理功能用於創建一個持續交付流程,它可分為管道和階段兩大部分。

  • 管道

    技術分享圖片

    部署管理的核心是管道,在Spinnaker的定義中,管道由一系列的階段(stages)組成。管道可以人工觸發,也可以配置為自動觸發,比如由 Jenkins Job 完成時、Docker Images 上傳到倉庫時,CRON 定時器、其他管道中的某一階段。同時,管道可以配置參數和通知,可以在管道一些階段上執行時發送郵件消息。Spinnaker 已經內置了一些階段,如執行自定義腳本、觸發 Jenkins 任務等。

  • 階段

    階段在 Spinnaker 中,可以作為管道的一個自動構建模塊的功能組成。我們可以隨意在管道中定義各個階段執行順序。Spinnaker 提供了很多階段供我們選擇使用,比如執行發布(Deploy)、執行自定義腳本 (script)、觸發 Jenkins 任務 (jenkins)等,功能很強大。

  • 部署策略

    技術分享圖片

    Spinnaker 支持精細的部署策略,比如 紅/黑(藍/綠)部署,多階段環境部署,滾動紅/黑策略,canary 發布等。用戶可以為每個環境使用不同部署策略,比如,測試環境可以使用紅/黑策略,生產環境使用滾動紅/黑策略,它封裝好了必須的步驟,用戶不需要復雜操作,就可以實現企業級上線。

【Linux】【Services】【SaaS】Spinnaker