Deploying Happiness & Fighting Homelessness (Hourschool & the 12factor App)
Hourschool is a peer to peer learning network built to help you learn from those around you. Anyone can post a class online and anyone else can sign up for your class. Hourschool helps fight homelessness by...
up deployment, makes scaling easier & keeps apps clean • Developed over direct exposure to the deployment of hundreds of thousands of apps Thursday, March 22, 12
for external dependencies • Instructions for starting processes • Problem with dev environment? • Put the fix in the readme $ brew install memcache $ foreman start Thursday, March 22, 12
changes worked • Merge into master • Deploy to production $ git push --remote staging mybranch:master $ git push --remote production Thursday, March 22, 12
cycle to a worker • Workers have the same code, but don’t serve web content • Perfect for • Delayed emails • Image Processing • etc. Thursday, March 22, 12
• DelayedJob (sql) • Enqueue from the web server • User signs up, queue email • Dequeue & run on the worker • Process next item in queue Thursday, March 22, 12
in multiple environments? • Easily scaling without tooling, architecture or development headaches? • Having the latest updates available to users at a moments notice? Read more at 12factor.net Thursday, March 22, 12
many deploys • Dependencies • Explicitly declare and isolate dependencies • Config • Store config in the environment • Backing Services • Treat backing services as attached resources Thursday, March 22, 12
run stages • Process • Execute the app as one or more stateless processes • Port Binding • Export services via port binding • Concurrency • Scale out via the process model Thursday, March 22, 12
graceful shutdown • Dev/Prod Parity • Keep development, staging, and production as similar as possible • Logs • Treat logs as event streams • Admin Process • Run admin/management tasks as one-off processes Thursday, March 22, 12