https://github.com/will/incdeploy_webx
https://github.com/will/incdeploy_webx
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/will/incdeploy_webx
- Owner: will
- Created: 2013-07-29T22:34:40.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-07-29T23:10:56.000Z (over 12 years ago)
- Last Synced: 2025-02-10T11:45:41.682Z (about 1 year ago)
- Language: Ruby
- Size: 105 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Incremental Deploys on Heroku with WEBX
I have this app, with these releases:
➤ h releases
=== incdeploy Releases
v7 Deploy 82b7eff will@heroku.com 2013/07/29 13:37:59 (~ 10m ago)
v6 Deploy 51309c4 will@heroku.com 2013/07/29 13:23:32 (~ 24m ago)
➤ git lg
* 82b7eff - (HEAD, heroku/master, master) purple (12 minutes ago)
* 51309c4 - blue (26 minutes ago)
That's all fine and dandy, but I'd really like to try out that `v7` release with various proportions of my traffic, before calling it shipped. **Now I can**.
### Half traffic from one release, half from the other
➤ h run --version 6 'bundle exec rackup -p $PORT'
➤ h run --version 7 'bundle exec rackup -p $PORT'
➤ for run in {1..100}; do curl -s incdeploy.webxapp.io; echo; done | sort | uniq -c
49
BLUE
51 PURPLE
### 1/3 traffic from one release, 2/3 from the other
➤ h run --version 6 'bundle exec rackup -p $PORT'
➤ h run --version 7 'bundle exec rackup -p $PORT'
➤ h run --version 7 'bundle exec rackup -p $PORT'
➤ for run in {1..100}; do curl -s incdeploy.webxapp.io; echo; done | sort | uniq -c
33
BLUE
67 PURPLE
### 1/4 traffic from one release, 3/4 from the other
➤ h ps -a incdeploy
=== run: one-off processes
run.1221: v6 up 2013/07/29 13:40:20 (~ 22m ago): `bundle exec rackup -p $PORT`
run.2943: v7 up 2013/07/29 14:02:39 (~ 11s ago): `bundle exec rackup -p $PORT`
run.5199: v7 up 2013/07/29 13:58:43 (~ 4m ago): `bundle exec rackup -p $PORT`
run.8352: v7 up 2013/07/29 13:40:58 (~ 21m ago): `bundle exec rackup -p $PORT`
➤ for run in {1..100}; do curl -s incdeploy.webxapp.io; echo; done | sort | uniq -c
27
BLUE
73 PURPLE
### Ok new release looking good, let's go with it 100%
➤ h ps:stop run.1221 -a incdeploy
Stopping run.1221 dyno... done
➤ h ps -a incdeploy
=== run: one-off processes
run.2943: v7 up 2013/07/29 14:02:39 (~ 3m ago): `bundle exec rackup -p $PORT`
run.5199: v7 up 2013/07/29 13:58:43 (~ 7m ago): `bundle exec rackup -p $PORT`
run.8352: v7 up 2013/07/29 13:40:57 (~ 25m ago): `bundle exec rackup -p $PORT`
➤ for run in {1..100}; do curl -s incdeploy.webxapp.io; echo; done | sort | uniq -c
100
PURPLE
## Serve some traffic from EU, and auto failover to EU
➤ h run:detached --version 5 'bundle exec rackup -p $PORT' -a incdeploy-eu
➤ for run in {1..100}; do curl -s incdeploy.webxapp.io; echo; done | sort | uniq -c
49
BLUE
15 PURPLE-eu
36 PURPLE
**OH NO US-EAST OUTAGE**
➤ h stop run -a incdeploy
Stopping run dynos... done
➤ for run in {1..100}; do curl -s incdeploy.webxapp.io; echo; done | sort | uniq -c
100
PURPLE-eu
## Summary
Not using web dynos, and having instead having run dynos connect out to a router is pretty sweet.
### Prior Art
* [webx](https://github.com/kr/webx)
* [sticky releases](https://github.com/heroku/heroku-sticky-releases)