DevOpsDay
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 【DevOps入門班】何謂 GitOps? 為什麼愈來愈多團隊開始導入? - 邱宏瑋 (hwchiu) {%hackmd @DevOpsDay/B1cnefOI0 %} [TOC] #### 》[議程介紹](https://devopsdays.tw/2024/speaker-page/1131) #### 》[填寫議程滿意度問卷|回饋建言給辛苦的講者](https://forms.gle/TM2q2tke3tTG9AA3A) > 共筆從這開始 Weaveworks > GitOps works by using Git as a single source of truth for declarative infrastructure and applications ## GitOps濫觴 2017推廣的概念(推廣的公司今年也倒閉了) 上網搜尋會看到各式各樣的說法,概念大概不統一 - 有沒有標準專案 - 有沒有標準規則 Weaveworks最初是從k8s上面構想出來的。 隨著時間推移,GitOps的概念也落地到不同環境跟領域中 ## Kubernetes 多節點的container orchestration,透過yaml跟cli(kubectl, helm)可以簡單地完成應用程式的部署。 會包成兩包 - source code - dockerfile - k8s - yml file ## 應用程式流程 ### 開發人員 開發 撰寫 編譯 容器化送到容器倉庫 ### 叢集管理人員 攥寫設定檔案 準備cli工具 連結k8s叢集並運行 > - 團隊變多功能變雜亂,怎樣把自動化可以導入進去簡化流程。 > - repo 一個放source code 一個放yml檔案 ## K8S也需要部署 CI - yml 格式檢查 - k8s語意檢查 CD - 連結k8s叢集 - 透過cli工具部署 weavework管這套流程叫做CIOps。 有許多缺點 - 安全性 - 規模大會讓環境複雜 - 環境多 - 應用程式多(每個都有自己的設定檔案) 應用程式有問題如何重新部署 如果環境有問題,需要全部重新部署,如何部署全部的APP 一個應用程式就一個pipeline一百套會有一百個pipeline椰 ## GitOps 讓k8s更容易部署 - weavework提出gitops概念 - 所有設定都是基於宣告(declaratively)去描述app的最終狀態 - 使用git作為single source of truth - 任何修改最終狀態的設定都要自動地套用到遠方系統 - 會有一個軟體的應用池是去同步狀態並檢查一制性 ### 同步軟體處理 從git repo檢查,同步軟體檢查異動,就會把他放到應用程式裡面。 若有人偷改cluster就會被告警。 ### 好處 提高效率。 - 只要把yaml放進去剩下系統自己同步 - 所有手動修改都會被抓出來,因為git就是所有狀態來源 系統。 ### 多環境 有多個環境就有多個同步軟體就可以用多個軟體去偵測來做跑動。 ### 同步軟體 - ArgoCD - Flux - Jenkins X - Fleet ### ArgoCD - 專門為k8S設計 - 將所有跟k8s有關的yml放到git裡面 - 透過一個介面呈現各種狀態 - 目前是否同步 - 半自動全自動? ### 概念 GitOps是為了解決k8s的部署問題,相關文件都強烈綁定 但是GitOps重要的是git為核心。k8s只是一個應用,其他也可以套用Gitops GitOps自動化軟體複雜度太高,不是所有架構跟專案都有辦法處理 - 需要讀取git - 判別狀態差異 - 不是每種資源都可以即時更新 - 直接更新 - 砍舊建新 ->最後移除同步軟體的情境,但其他GitOps的核心要保留。 ### push mode pull mode push mode進去觸發pipeline pull mode偵測差異 pull下來來跑動建置 ### GitOps痛點 yml檔案最終要誰寫?開發人員跟維運人員中間還是有衝突 ### 小結 git 單一入口 git管理狀態跟對應版本 自動化佈署 #### ref - [hwchiu.com](https://www.hwchiu.com/about) ###### tags: `DevOpsDays Taipei 2024`

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully