Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
20220323_Harbor 技術雜談
Phil Huang
March 23, 2022
Technology
2
520
20220323_Harbor 技術雜談
https://docs.google.com/presentation/d/1Qk-ExTgxL918J5QKyr6t5ivzChC4oV1slwuQvwnHCag/edit?usp=sharing
Phil Huang
March 23, 2022
Tweet
Share
More Decks by Phil Huang
See All by Phil Huang
20221222 Unleashing the Power of Azure VMware Solution
pichuang
0
130
20221220 Azure Public IP 路由偏好教戰手冊
pichuang
0
52
20221214 Latency Measurement of Azure Backbone Network
pichuang
0
25
20221129 Azure Route Exchange: 以 Azure VMware Solution 為例
pichuang
0
34
20221116 混合雲架構師日常 如何使用 WSL 2 搭配 Ansible 自動化進行 Azure 維運管理
pichuang
2
130
20221028 淺談 Azure Private 5G Core 和 Kubernetes
pichuang
0
240
20221016 要如何直面到 Kubernetes 所帶來的技術能力影響
pichuang
4
2.3k
20220731 如何跟隨開源技術保持你的職涯發展
pichuang
0
280
Kubernetes 叢集平台 Tanzu Community Edition 動手做
pichuang
0
280
Other Decks in Technology
See All in Technology
CUEとKubernetesカスタムオペレータを用いた新しいネットワークコントローラをつくってみた
hrk091
1
270
OCI DevOps 概要 / OCI DevOps overview
oracle4engineer
PRO
0
480
AI Services 概要 / AI Services overview
oracle4engineer
PRO
0
170
- Rでオブジェクト指向プログラミング- クラス設計入門の入門
kotatyamtema
1
720
Stripe / Okta Customer Identity Cloud(旧Auth0) の採用に至った理由 〜モリサワの SaaS 戦略〜
tomuro
0
120
MarvelClient Upgrade 64bit クライアントへの自動アップグレード設定
mitsuru_katoh
0
110
グローバルチームことはじめ / Bootstrapping a global team
tasshi
1
650
02_プロトタイピングの進め方
kouzoukaikaku
0
150
Virtual Thread - 導入の背景と、効果的な使い方 -
skrb
3
260
WebLogic Server for OCI 概要
oracle4engineer
PRO
3
870
あつめたデータをどう扱うか
skrb
1
130
Deep dive in Reserved Instance ~脳死推奨量購入からの脱却~
kzkmaeda
0
500
Featured
See All Featured
Writing Fast Ruby
sferik
613
58k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
120
29k
Unsuck your backbone
ammeep
659
56k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
101
6.2k
Ruby is Unlike a Banana
tanoku
93
9.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
317
22k
Build your cross-platform service in a week with App Engine
jlugia
221
17k
Infographics Made Easy
chrislema
235
17k
Raft: Consensus for Rubyists
vanstee
130
5.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
182
15k
Code Reviewing Like a Champion
maltzj
508
38k
Producing Creativity
orderedlist
PRO
335
38k
Transcript
Harbor 技術雜談 Phil Huang 黃秉鈞 <
[email protected]
> Will 保哥的技術交流中心, Webniar, Mar.
23, 2022
WARNING • 本次分享不會講基本安裝等 101 等級議題 • 建議當廣播節目收聽 • 歡迎直接開麥交流
#pichuang # whois Phil Huang 黃秉鈞 • 一週七睡,一週三練;上班專業,下班躺平 • Cloud
Native Taiwan User Group (CNTUG) 打雜工 • blog.pichuang.com.tw Ref: https://www.linkedin.com/in/phil-huang-09b09895/ 3
#pichuang
#pichuang Harbor • 為 Cloud Native Computing Foundation (CNCF) 畢業專案之一
• 主要由 VMware 貢獻和維護的私有容器倉庫 (Container Registry) 開源 專案 • 主要常見於地端 Container / Kubernetes / 微服務等案子會隨行出現的 服務 • 現在最新版本為 v2.4.0 ◦ Roadmap • 近況 ◦ SIG 宣布 Harbor SIG Docs 計畫 • GitHub:goharbor/harbor
#pichuang 開始之前...
#pichuang 關於安裝 Harbor 你是如何安裝 Harbor 的? • 2 個約束條件 ◦
VM or Kubernetes? ◦ Self Support or Vendor Specific Support?
#pichuang 關於憑證 SSL/TLS 萬惡的 x509: certificate signed by unknown authority
• 預設狀況下,會提供自動 產生的 Certificate / Private Key • 理想狀況下,建議自簽 TLS Certificate / Private Key ◦ EasyRSA (推薦) ◦ OpenSSL https://github.com/goharbor/harbor/blob/v2.4.1/make/harbor.yml.tmpl#L13-L18
#pichuang 關於 Storage Backend • 儲存技術選擇邏輯跟設計 Docker Registry 一樣 •
預設狀況下,是會使用 Local Storage ◦ 會吃 /data 的儲存空間 ◦ 關於能不能跟要不要使用 NFS… • 理想狀況下,是採用 Object Storage 為主 ◦ 主要使用 s3-compatible Storage,例如 AWS S3 / Azure Blob / GCP Cloud Stroage / MinIO 等 https://github.com/goharbor/harbor/blob/v2.4.1/make/harbor.yml.tmpl https://docs.docker.com/registry/configuration/#storage https://docs.docker.com/registry/storage-drivers/
#pichuang High Level Design for Harbor
#pichuang https://github.com/goharbor/harbor/wiki/Architecture-Overview-of-Harbor
#pichuang 關於 Project 與 Repositories • Project 主要控制用戶授權、資源分配;Repositories 主要提供實際 Container
Images 儲存的位置 • Project : Repositories = 1 : N • Repository 可以使用做巢狀 Repos (Nested Repos) https://goharbor.io/docs/2.4.0/working-with-projects/working-with-images/repositories/ Project Repository Nested Repositories
#pichuang 關於 Helm Chart • Helm v3.8.0 後開始支援 OCI 格式打包
Packages ◦ 現在是 helm v3.8.1 • 推薦使用 helm v3.8 推送 OCI 格式的 helm chart 進入 Harbor v2.4.x 儲存 Ref: https://goharbor.io/docs/2.4.0/working-with-projects/working-with-images/managing-helm-charts/ https://helm.sh/docs/topics/registries/#enabling-oci-support
#pichuang 關於 Scanners • 預設狀況下,是採用 Aqua Trivy 當作預設 CVEs 掃描來
源 • 會有 CVEs 來源需要定期匯入新的 Database 議題,每個 Scanners 做法不一樣 a. 白名單開 Firewall 或走 HTTPs/ Proxy (推薦) b. 手動一個一個搬 DB • Scanner Adapters 支援清單上並沒有列全部的 Scanner 選擇,若有特定廠牌,需洽詢各自 Provdiders https://goharbor.io/docs/2.4.0/install-config/harbor-compatibility-list/#scanner-adapters
#pichuang 關於離線環境處理 • 主要分 2 種 ◦ 預先建置 docker-registry or
harbor ◦ 手動壓縮 tarball (.tar.gz) • Tarball 建立常見做法 ◦ docker save / podman save ◦ skopeo copy
#pichuang 關於 Replications • 支援同步市面上絕大部分的 Container Registry • 架構上可透過 Replications
Rules 設計出 ◦ 單向同步 ◦ 邏輯上的雙向同步 (兩邊都設定單向) • Replications Rules 蠻多參數可以調的,建議 參考官方文件 Creating a Replication Rule 一 文 => 這是精髓啊~只是受限現實因素用不太起來
#pichuang 典型架構:混合雲部署,複製方向決定長相 Case 1 Case 2
#pichuang 典型架構:Harbor Federated Topology Ref: https://tanzu.vmware.com/content/white-papers/vmware-tanzu-edge-solution-architecture-with-robo-topology • 主要為生成物分發,如 dockerhub •
依據位置,分 2 種角色: ◦ 唯一 Corporate Harbor ◦ 多個 Edge Harbor
#pichuang ScreenShot: Harbor Edge Site Replications Ref: https://tanzu.vmware.com/content/white-papers/vmware-tanzu-edge-solution-architecture-with-robo-topology
#pichuang 關於備份策略選擇
#pichuang References • 蠻常會有不錯內容的公眾號 亨利筆記 • 管理員都應該要有一本的 Harbor 權威指南
#pichuang COSCUP x KCD Taiwan 2022 • CFP: 2022/4/11 ~
2022/5/15 • 議程公告: 2022/7/1 • COSCUP 議程: 2022/7/30 ~2022/7/31