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 - 吳剛志(Andrew Wu) {%hackmd B44mr9JvRMSCm5gVjQMNXA %} ![](https://i.imgur.com/Z1rFqWs.png) * 簡報下載: [Andrew-DevOpsFromZero (2019).pdf](https://github.com/andrew0928/Meetup/blob/master/20191017.DevOpsDaysTaipei2019/Andrew-DevOpsFromZero%20(2019).pdf) * 講者 [Facebook](https://www.facebook.com/andrew.blog.0928/) / [BLOG](https://columns.chicken-house.net) * 參考資料: [DevOpsDays Taipei 2018 - 微服務基礎建設](https://hackmd.io/c/DevOpsDays2018/%2FMIP3UHCwTCKQOjO4P9tmjA) 大會共筆 --- ### 從0開始 > 91App 過去一年半 轉到 CloudNative * 專案開始之初, 首重看見全貌 * 技術債是屬於那些活下來的公司,活不下來的,技術債就跟你一點關係都沒有 ### 面臨的挑戰 協助品牌打造線上電商與門市OMO循環 (不同屬性的使用者) 品牌客戶超過10000家 背後代表的是: - 龐大的規模 超過200+ EC2, 3 Regions 每年花的營運費用超過新台幣八位數,開頭不是1 - 複雜的組態 每個系統都要想,如果要佈很多國家,要怎麼做 光是對內&對外的DNS record就有60+ - 測試環境 - prod - staging - qa - dev - 快喘不過去的老爺爺(Jenkins) ### 邁向下個階段的策略 ### 關鍵原因:問題在於系統的複雜度 從架構角度直接降低複雜度的維度(market * environment * instance * shop ...) [SaaS - 12 factor app](https://www.12factor.net) 從12 factor app找出自己做到哪些,還要做哪些 從12 factor app衍生出來的決策 1. codebase:光是統一codebase,並沒有解決問題 --> 部署一律從==artifict manager== 2. dependencies: 服務間的相依性怎麼處理 --> 一律透過==service discovery==來協作 3. config ### 軟體交付的架構三大元素 - Application: CI/CD - Env: IaC - Config: Config as code [Rick: 三大元素 + 單一pipeline](https://rickhw.github.io/2019/03/28/DevOps/DevOpsTaiwan-Meetup-Beginning-in-Artifacts-Management/) 門檻:如何把operation的東西,跟developer整合 ### 實際挑戰#1 ==現有流程:不斷升級既有instance的版本== * 一台jenkins,部署到一台一台的instance中 - jenkins負擔所有的流程,成為效能瓶頸 ==改善流程:導入artifacts + immutable server== * jenkins push到artifact manager,service#n再pull過去 - 部署架構簡單,效率好(並行) ### 實際挑戰#2: configuration - 每個環境都有個config的管理中心,例如分國家(Taiwan, Hong Kong) - 解決跨國的需求 - 定義組態的目錄結構,使用繼承式的方式,global --> region --> ..... - config as code 內部:不再依賴DNS + Load balancer ### 實際挑戰#3: 環境抽象化,基礎建設整合 - 先定義什麼是“環境” - 服務執行的環境:OS, computing resources, network - configurations - code SDK如何找到config server在哪? - 下環境變數給OS - 如果開了一百台機器,怎麼知道環境變數要怎麼給?由infra team制定 - self managerment ### 實際挑戰#4 服務開發規範,環境變數的規範制定 - 當你能夠讓它完全獨立,你的複雜度就會下降 統一一致的環境識別機制,才有一致的監控與紀錄 - 制定一致的Log前置欄位 - 統一的message context,A服務傳到B服務才能互通 ### 開發維運一體化,將維運也當作需求的來源 - 想怎麼維運,就要怎麼設計 ###### tags: `DevOpsDays Taipei 2019` ---- ---- ###### 以下開放討論 電商都很擔心雙十一XD

    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