Skip to content

[AWS] CodeDeploy #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
StanGC opened this issue Sep 20, 2018 · 0 comments
Open

[AWS] CodeDeploy #78

StanGC opened this issue Sep 20, 2018 · 0 comments

Comments

@StanGC
Copy link
Owner

StanGC commented Sep 20, 2018

昨天去 aws 台北小小聚聽 dk 大大講 AWS CodeDeploy

記錄一些筆記

優點:

  • 支援 EC2/On-Premises 與 AWS Lambda

  • 有 rollback 機制

  • 提供 In-place deployment 與 Blue/green deployment 可選擇

    in-place 換現有程式 (code deploy)
    bulue-green 開一批新機器去替換

缺點:

  • 速度有時候很慢

  • 沒有 queue 機制,無法連續部署 (可以透過 AWS codePipeline 解決)

  • 機器上要裝 CodeDeploy agent,非 EC2 機器會跑較久 (需等 169.254.169.254 timeout)

    在 Ubuntu 18.04 安裝 aws-codedeploy-agent 會有問題,workaround 的方式參考 github issue

    安裝完

    檢查狀態 sudo service codedeploy-agent status

    啟動 sudo service codedeploy-agent start

  • 需要設定 codeDeploy 跟 EC2 的 role

  • 可以整合 CI/CD

  • deploy 前後有 6 個 hook 可用,可以設定在 deploy 前後要執行的指令

  • 外部機器 (Vps or aws ec2 跨 zone) 無法支援 auto scale

capistrano 部署在 auto scale 可能會有新機器剛開,但沒部署到的問題 (race condition)

Ref:

aws 官方文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant