Last active
August 29, 2015 13:57
-
-
Save coodoo/9635667 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Docker for Front-End Developer | |
# 解決問題 | |
- "Works on my machine!" | |
- 新人 on-board 可快速布署開發環境 | |
- 小巧敏捷,較 vm 節省資源 | |
# 資源 | |
- https://www.docker.io/ | |
- $15M VC money (MongoDB $223M) | |
- http://www.meetup.com/Docker-Taipei/ | |
# 單機開發用 | |
- 一致的開發/測試環境 | |
- $ docker pull team/kickassapp | |
- $ docker commit 12345 team/kickassapp | |
# 模擬真實多階架構 | |
- nginx <-> node.js <-> mongodb | |
- Fig 可快速在單機建置多階層架構,隨開即用 | |
http://orchardup.github.io/fig/ | |
- $ fig up //啟動 yml 內設定的所有 contiainer | |
- $ fig scale web=2 //有無眼熟? | |
# 自建 PaaS 平台 | |
- Platform as a Service | |
- Dokku 可自建 PaaS 平台 (只要有心,人人皆可自營 Heroku) | |
https://github.com/progrium/dokku | |
- 方便快速展示多個 side projects | |
- digitalocean 一鍵設定範例 | |
http://goo.gl/fqplNb | |
# 執行測試 | |
- 每次 test 可啟動新的 docker container 跑 test runner | |
- 進階玩法是將大的 test suites 拆成多個 containers 來跑,以收多線程速效 | |
# CI/CD | |
- Continuous Integration/Delivery | |
- 每次 git 有人 commit,就觸發 web hooks | |
- 接著 pull code 跑 test suites | |
- 如果全過,接著就 deploy 到 server 上 (deploy on green) | |
- StriderCD 是開源的 CI/CD 方案 | |
http://stridercd.com/ | |
# Production Deployment | |
- Serf | |
- CoreOS | |
# 安裝方法 | |
# mac | |
- virtualbox | |
https://www.virtualbox.org/ | |
- boot2docker | |
https://github.com/boot2docker/boot2docker | |
- docker osx client | |
brew install docker | |
- 以上只要 5 分鐘完工 | |
# windows | |
# 改用 mac 吧 (結案 | |
# seriously | |
- virtualbox | |
- ubuntu 13.04 64bit | |
- docker host+client | |
- ssh | |
or | |
- virutalbox | |
- vagrant | |
https://speakerdeck.com/coodoo/docker-for-front-end-developer | |
* Gist | |
https://gist.github.com/coodoo/9635667 | |
* Other speak | |
https://speakerdeck.com/coodoo/backbone-rocks-large-scale-single-page-app-done-right | |
* Author | |
Jeremy Lu (jeremy@pubulous.com) | |
Mar. 19, 2014 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment