<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Harbor on Clarence｜Backend、AI、DevOps 與 Infrastructure</title>
    <link>https://clarence.tw/tags/harbor/</link>
    <description>Recent content in Harbor on Clarence｜Backend、AI、DevOps 與 Infrastructure</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-tw</language>
    <lastBuildDate>Mon, 26 Oct 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://clarence.tw/tags/harbor/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>自架 GitLab、Runner 與 Harbor：從原始碼到部署的 CI/CD 流程</title>
      <link>https://clarence.tw/posts/self-hosted-gitlab-runner-harbor/</link>
      <pubDate>Mon, 26 Oct 2026 00:00:00 +0800</pubDate>
      
      <guid>https://clarence.tw/posts/self-hosted-gitlab-runner-harbor/</guid>
      <description>&lt;p&gt;自 2022 年起，我以 Operator 的角色建置與維護 Self-hosted GitLab、GitLab Runner、Harbor registry 與 CI/CD workflow，把 source code、container image 與 deployment 串在同一條流程上。&lt;/p&gt;
&lt;p&gt;這篇不是設定教學。&lt;code&gt;.gitlab-ci.yml&lt;/code&gt;、Runner 部署與多環境部署的範例整理在 &lt;a href=&#34;https://clarence.tw/posts/gitlab-cicd-complete-guide/&#34;&gt;GitLab CI/CD 完整配置指南&lt;/a&gt;，&lt;code&gt;config.toml&lt;/code&gt; 的設定項目與常用變數整理在 &lt;a href=&#34;https://clarence.tw/notes/gitlab/runner-config/&#34;&gt;GitLab Runner config.toml 設定與常用 CI/CD 變數&lt;/a&gt;。這裡想談的是另一面：為什麼要自己養這套系統、各元件怎麼接，以及跑了幾年之後真正花時間的地方。文中提到的問題，都附上我當時寫在 &lt;a href=&#34;https://blog.clarence.tw/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;blog.clarence.tw&lt;/a&gt; 的紀錄。&lt;/p&gt;
&lt;h2 id=&#34;為什麼考慮自架&#34;&gt;為什麼考慮自架&lt;/h2&gt;
&lt;p&gt;GitLab.com 與各家雲端 registry 都很成熟，自架不是預設答案。會走向自架，通常是下面幾個考量疊在一起：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;資料與程式碼放在哪裡&lt;/strong&gt;：有些團隊需要原始碼、image 與 build log 留在自己能控制的環境。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;網路環境&lt;/strong&gt;：deployment target 在地端或內部網路時，Runner 與 registry 放在同一側，build 與 pull image 的路徑比較短，也比較好控管對外連線。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Runner 資源&lt;/strong&gt;：需要特定硬體、作業系統或較大的 build 資源時，自己的 Runner 比較好安排。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;整合需求&lt;/strong&gt;：要和既有的帳號系統、監控與備份流程接在一起。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;代價也很清楚：升級、備份、憑證、金鑰、磁碟空間與故障排除都變成自己的事。決定自架之前，要先確定有人願意長期承擔這些工作。&lt;/p&gt;
&lt;h2 id=&#34;整體流向&#34;&gt;整體流向&lt;/h2&gt;
&lt;p&gt;整條流程可以用一句話描述：程式碼進 GitLab，Runner 依照 pipeline build 與測試，產出的 container image 推到 Harbor，部署環境再從 Harbor 拉 image。&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
