mag rails 2011 web application deployment for small teams
DESCRIPTION
TRANSCRIPT
![Page 1: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/1.jpg)
Understanding and designing web application deployment for small
teams.
github.com/leehambley
twitter.com/codebeaker
Sunday, October 16, 11
![Page 2: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/2.jpg)
WHY DO WE DEPLOY?
Sunday, October 16, 11
![Page 3: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/3.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
Sunday, October 16, 11
![Page 4: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/4.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
Sunday, October 16, 11
![Page 5: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/5.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
• because we’ve fixed bugs and need to make the improved code available
Sunday, October 16, 11
![Page 6: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/6.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
• because we’ve fixed bugs and need to make the improved code available
• because the business interest needs new features
Sunday, October 16, 11
![Page 7: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/7.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
• because we’ve fixed bugs and need to make the improved code available
• because the business interest needs new features
• because we need to test something privately in a production-like environment
Sunday, October 16, 11
![Page 8: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/8.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
• because we’ve fixed bugs and need to make the improved code available
• because the business interest needs new features
• because we need to test something privately in a production-like environment
• because we’re professionals
Sunday, October 16, 11
![Page 9: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/9.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
• because we’ve fixed bugs and need to make the improved code available
• because the business interest needs new features
• because we need to test something privately in a production-like environment
• because we’re professionals
• because interpreters like to load files into memory for performance (& other good reasons)
Sunday, October 16, 11
![Page 10: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/10.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
• because we’ve fixed bugs and need to make the improved code available
• because the business interest needs new features
• because we need to test something privately in a production-like environment
• because we’re professionals
• because interpreters like to load files into memory for performance (& other good reasons)
• because we like to think about software in “versions”
Sunday, October 16, 11
![Page 11: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/11.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
• because we’ve fixed bugs and need to make the improved code available
• because the business interest needs new features
• because we need to test something privately in a production-like environment
• because we’re professionals
• because interpreters like to load files into memory for performance (& other good reasons)
• because we like to think about software in “versions”
• because we prefer to be available to our customers
Sunday, October 16, 11
![Page 12: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/12.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
• because we’ve fixed bugs and need to make the improved code available
• because the business interest needs new features
• because we need to test something privately in a production-like environment
• because we’re professionals
• because interpreters like to load files into memory for performance (& other good reasons)
• because we like to think about software in “versions”
• because we prefer to be available to our customers
• because we prefer to be accountable to the business people
Sunday, October 16, 11
![Page 13: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/13.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
• because we’ve fixed bugs and need to make the improved code available
• because the business interest needs new features
• because we need to test something privately in a production-like environment
• because we’re professionals
• because interpreters like to load files into memory for performance (& other good reasons)
• because we like to think about software in “versions”
• because we prefer to be available to our customers
• because we prefer to be accountable to the business people
• because we have things like migrations, seed tasks, background workers and all the rest
Sunday, October 16, 11
![Page 14: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/14.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
• because we’ve fixed bugs and need to make the improved code available
• because the business interest needs new features
• because we need to test something privately in a production-like environment
• because we’re professionals
• because interpreters like to load files into memory for performance (& other good reasons)
• because we like to think about software in “versions”
• because we prefer to be available to our customers
• because we prefer to be accountable to the business people
• because we have things like migrations, seed tasks, background workers and all the rest
• because there’s usually more than one machine
Sunday, October 16, 11
![Page 15: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/15.jpg)
WHY DO WE DEPLOY?• Fundamentally, because we’ve done
some work, and we want to share it
• firstly with stakeholders, second with users
• because we’ve fixed bugs and need to make the improved code available
• because the business interest needs new features
• because we need to test something privately in a production-like environment
• because we’re professionals
• because interpreters like to load files into memory for performance (& other good reasons)
• because we like to think about software in “versions”
• because we prefer to be available to our customers
• because we prefer to be accountable to the business people
• because we have things like migrations, seed tasks, background workers and all the rest
• because there’s usually more than one machine
• because very often there’s more than one moving piece has changed. (code & database, code & configuration, etc)
Sunday, October 16, 11
![Page 16: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/16.jpg)
WHAT SHOULD WE DEPLOY?
• How do we decide if a project really needs deployment?
• How do we decide what to deploy?
•Where does infrastructure end, and the application begin?
• How can the what change depending on the application?
•What don’t we deploy?
• Uploaded assets, the database, the system packages, the Ruby Gems, your own log files.
Sunday, October 16, 11
![Page 17: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/17.jpg)
INFRASTRUCTURE VS. APPLICATION
rubygems.org
github.com
nginx virtual hosts configuration
scheduled jobs
log files
SSH keys
SSL Certificates
Infrastructure Application
operating system
application code
database configuration
cache configuration
logrotate configuration
Sunday, October 16, 11
![Page 18: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/18.jpg)
BENCHMARKgadget-showdown.co.ukComparing the latest gadgets in ultimate-fighting style reviews, ending with a “Will it blend?” teardown. Request your own review of any two devices, and we’ll get right on it!
•User registration•User comments• Requests• RSS feed•Notifications•Daily posts•Non-technical writing team
Sunday, October 16, 11
![Page 19: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/19.jpg)
BENCHMARKgadget-showdown.co.ukComparing the latest gadgets in ultimate-fighting style reviews, ending with a “Will it blend?” teardown. Request your own review of any two devices, and we’ll get right on it! PostgreSQL
Memcache
•User registration•User comments• Requests• RSS feed•Notifications•Daily posts•Non-technical writing team
Sunday, October 16, 11
![Page 20: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/20.jpg)
BENCHMARKgadget-showdown.co.ukComparing the latest gadgets in ultimate-fighting style reviews, ending with a “Will it blend?” teardown. Request your own review of any two devices, and we’ll get right on it! PostgreSQL
Memcache
•User registration•User comments• Requests• RSS feed•Notifications•Daily posts•Non-technical writing team
Sunday, October 16, 11
![Page 21: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/21.jpg)
BENCHMARKgadget-showdown.co.ukComparing the latest gadgets in ultimate-fighting style reviews, ending with a “Will it blend?” teardown. Request your own review of any two devices, and we’ll get right on it! PostgreSQL
Memcache
MRI v1.8.7
•User registration•User comments• Requests• RSS feed•Notifications•Daily posts•Non-technical writing team
Sunday, October 16, 11
![Page 22: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/22.jpg)
BENCHMARKgadget-showdown.co.ukComparing the latest gadgets in ultimate-fighting style reviews, ending with a “Will it blend?” teardown. Request your own review of any two devices, and we’ll get right on it! PostgreSQL
Memcache
MRI v1.8.7
Unicorn
•User registration•User comments• Requests• RSS feed•Notifications•Daily posts•Non-technical writing team
Sunday, October 16, 11
![Page 23: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/23.jpg)
BENCHMARKgadget-showdown.co.ukComparing the latest gadgets in ultimate-fighting style reviews, ending with a “Will it blend?” teardown. Request your own review of any two devices, and we’ll get right on it! PostgreSQL
Memcache
MRI v1.8.7
Unicorn
•User registration•User comments• Requests• RSS feed•Notifications•Daily posts•Non-technical writing team
Sunday, October 16, 11
![Page 24: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/24.jpg)
WHO?Our hypothetical, inexperienced team.
Unlike us, they are not misunderstood masters of the forbidden and subtle arts. They’re not Jedi top-gun warlocks, like we are either, they’re just regular job people, and they’re never going to win a Nobel prize for their deployment efforts, and further more, they probably don’t even care.
Sunday, October 16, 11
![Page 25: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/25.jpg)
WHO?Our hypothetical, inexperienced team.
Unlike us, they are not misunderstood masters of the forbidden and subtle arts. They’re not Jedi top-gun warlocks, like we are either, they’re just regular job people, and they’re never going to win a Nobel prize for their deployment efforts, and further more, they probably don’t even care.
Sunday, October 16, 11
![Page 26: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/26.jpg)
WHO?Our hypothetical, inexperienced team.
Unlike us, they are not misunderstood masters of the forbidden and subtle arts. They’re not Jedi top-gun warlocks, like we are either, they’re just regular job people, and they’re never going to win a Nobel prize for their deployment efforts, and further more, they probably don’t even care.
• Three person development team• No dedicated “ops”• No deployment experience• No Unix experience
Sunday, October 16, 11
![Page 27: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/27.jpg)
WHO?Our hypothetical, inexperienced team.
Unlike us, they are not misunderstood masters of the forbidden and subtle arts. They’re not Jedi top-gun warlocks, like we are either, they’re just regular job people, and they’re never going to win a Nobel prize for their deployment efforts, and further more, they probably don’t even care.
• Three person development team• No dedicated “ops”• No deployment experience• No Unix experience
• They want fast, reliable deployments• They don’t want phone calls at 3am because the
servers are choking• They don’t want to have to learn about unix to do
their job• They want it to be impossible to break something
accidentally• They don’t want to have to deal with passwords• They expect things to “Just Work” because they’re
hipster macbook using nancy boys.
Sunday, October 16, 11
![Page 28: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/28.jpg)
WHERE DO WE DEPLOY?
✝ That’s not a condonation, just an observation
Sunday, October 16, 11
![Page 29: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/29.jpg)
WHERE DO WE DEPLOY?
• Almost certainly to VPS
✝ That’s not a condonation, just an observation
Sunday, October 16, 11
![Page 30: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/30.jpg)
WHERE DO WE DEPLOY?
• Almost certainly to VPS
• Almost certainly, not to EC2(that is, at least not in a way that makes the most of the elastic infrastructure)
✝ That’s not a condonation, just an observation
Sunday, October 16, 11
![Page 31: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/31.jpg)
WHERE DO WE DEPLOY?
• Almost certainly to VPS
• Almost certainly, not to EC2(that is, at least not in a way that makes the most of the elastic infrastructure)
• Almost certainly to Ubuntu ✝ (because it has a convenient package manager)
✝ That’s not a condonation, just an observation
Sunday, October 16, 11
![Page 32: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/32.jpg)
WHERE DO WE DEPLOY?
• Almost certainly to VPS
• Almost certainly, not to EC2(that is, at least not in a way that makes the most of the elastic infrastructure)
• Almost certainly to Ubuntu ✝ (because it has a convenient package manager)
• Probably to a VPS provider in the USA
✝ That’s not a condonation, just an observation
Sunday, October 16, 11
![Page 33: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/33.jpg)
WHERE DO WE DEPLOY?
• Almost certainly to VPS
• Almost certainly, not to EC2(that is, at least not in a way that makes the most of the elastic infrastructure)
• Almost certainly to Ubuntu ✝ (because it has a convenient package manager)
• Probably to a VPS provider in the USA
• Probably to a 32 bit operating system
✝ That’s not a condonation, just an observation
Sunday, October 16, 11
![Page 34: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/34.jpg)
WHERE DO WE DEPLOY?
• Almost certainly to VPS
• Almost certainly, not to EC2(that is, at least not in a way that makes the most of the elastic infrastructure)
• Almost certainly to Ubuntu ✝ (because it has a convenient package manager)
• Probably to a VPS provider in the USA
• Probably to a 32 bit operating system
• Probably to more than one machine
✝ That’s not a condonation, just an observation
Sunday, October 16, 11
![Page 35: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/35.jpg)
WHERE DO WE DEPLOY?
• Almost certainly to VPS
• Almost certainly, not to EC2(that is, at least not in a way that makes the most of the elastic infrastructure)
• Almost certainly to Ubuntu ✝ (because it has a convenient package manager)
• Probably to a VPS provider in the USA
• Probably to a 32 bit operating system
• Probably to more than one machine
• Probably using something from AWS, because it’s hip
✝ That’s not a condonation, just an observation
Sunday, October 16, 11
![Page 36: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/36.jpg)
WHERE DO WE DEPLOY?
• Almost certainly to VPS
• Almost certainly, not to EC2(that is, at least not in a way that makes the most of the elastic infrastructure)
• Almost certainly to Ubuntu ✝ (because it has a convenient package manager)
• Probably to a VPS provider in the USA
• Probably to a 32 bit operating system
• Probably to more than one machine
• Probably using something from AWS, because it’s hip
• Probably not using a CDN
✝ That’s not a condonation, just an observation
Sunday, October 16, 11
![Page 37: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/37.jpg)
A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT
SpeedySecureAccessibleTransactionalAccountableParallellHookable
Sunday, October 16, 11
![Page 38: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/38.jpg)
A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT
SpeedySecureAccessibleTransactionalAccountableParallelHookable
Sunday, October 16, 11
![Page 39: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/39.jpg)
A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT
SpeedySecureAccessibleTransactionalAccountableParallelHookable
•Fast starting•Fail fast•Using a fast protocol (SSH, with keys)•Not wasting bandwidth or capacity•Not relying on passwords
Sunday, October 16, 11
![Page 40: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/40.jpg)
A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT
SpeedySecureAccessibleTransactionalAccountableParallelHookable
•Using a secure protocol•Using a secure, trustworthy source•Secure from workstation to server•Secure deployment result by design•No shared sign-ons
•Robust•Resilient
•No .rc~ files
Sunday, October 16, 11
![Page 41: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/41.jpg)
A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT
SpeedySecureAccessibleTransactionalAccountableParallelHookable
•Any member of the dev’ team can deploy•They can do it without using root (or other) passwords•Secure from workstation to server•Secure deployment result by design
Sunday, October 16, 11
![Page 42: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/42.jpg)
A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT
SpeedySecureAccessibleTransactionalAccountableParallelHookable
•When a deploy fails on one machine, we fail it across the board•We know when a deploy starts, is in progress, and ends•We can inform our customers that there’s a deploy in progress,
without falling back to a maintenance page.•We can recover from errors.
Sunday, October 16, 11
![Page 43: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/43.jpg)
A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT
SpeedySecureAccessibleTransactionalAccountableParallelHookable
•We know who deployed what, and when•We know exactly what happened during the deployment•We know which version of the code is in production
•We know how many servers are online
Sunday, October 16, 11
![Page 44: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/44.jpg)
A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT
SpeedySecureAccessibleTransactionalAccountableParallelHookable
•We need to operate on our machines in parallel•Except when we don’t•Sequential parallel deployment
Sunday, October 16, 11
![Page 45: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/45.jpg)
A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT
SpeedySecureAccessibleTransactionalAccountableParallelHookable
•We need to know how it worked out•We often need to share that information•with business people•with automated systems (issue tracker, status board, monitoring)
Sunday, October 16, 11
![Page 46: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/46.jpg)
THAT’S A LONG LIST
Sunday, October 16, 11
![Page 47: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/47.jpg)
AND NOBODY DOES EVERYTHING
Sunday, October 16, 11
![Page 48: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/48.jpg)
SO WHERE DO WE BEGIN?
Sunday, October 16, 11
![Page 49: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/49.jpg)
$ CAP PRODUCTION DEPLOY
Sunday, October 16, 11
![Page 50: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/50.jpg)
# > touch /tmp/some-file
$ > touch /tmp/some-file
Sunday, October 16, 11
![Page 51: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/51.jpg)
$ > su someotheruser
$ > su - someotheruser
Sunday, October 16, 11
![Page 52: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/52.jpg)
The Dreyfus Model
Sunday, October 16, 11
![Page 53: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/53.jpg)
UNIX 101
Sunday, October 16, 11
![Page 54: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/54.jpg)
USERS AND GROUPS
Sunday, October 16, 11
![Page 55: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/55.jpg)
$ CAP PRODUCTION PERMISSIONS:FIX
Sunday, October 16, 11
![Page 56: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/56.jpg)
$ CAP PRODUCTION PERMISSIONS:FIX
desc “fix permissions”task :fix, :roles => [:web, :app] do
run “chown nobody:apache /var/www/otb/“run “chmod -R 666 #{current_release}”run “chmod -R 777 #{current_release}/bin/”
end
Sunday, October 16, 11
![Page 57: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/57.jpg)
Sunday, October 16, 11
![Page 58: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/58.jpg)
$ whoami
Sunday, October 16, 11
![Page 59: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/59.jpg)
$ whoami codebeaker
Sunday, October 16, 11
![Page 60: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/60.jpg)
$ whoami codebeaker
$ groups
Sunday, October 16, 11
![Page 61: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/61.jpg)
$ whoami codebeaker
$ groups codebeaker staff deploy sudo
Sunday, October 16, 11
![Page 62: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/62.jpg)
$ whoami codebeaker
$ groups codebeaker staff deploy sudo
$ echo $PATH
Sunday, October 16, 11
![Page 63: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/63.jpg)
$ whoami codebeaker
$ groups codebeaker staff deploy sudo
$ echo $PATH /usr/bin:/bin:/usr/sbin
Sunday, October 16, 11
![Page 64: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/64.jpg)
Sunday, October 16, 11
![Page 65: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/65.jpg)
$ id
Sunday, October 16, 11
![Page 66: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/66.jpg)
$ iduid=501(codebeaker) gid=20(staff) groups=20(staff)12(everyone),33(_appstore),80(admin),204(_developer)
Sunday, October 16, 11
![Page 67: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/67.jpg)
Sunday, October 16, 11
![Page 68: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/68.jpg)
$ id
Sunday, October 16, 11
![Page 69: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/69.jpg)
$ iduid=1000(codebeaker) gid=1000(codebeaker) groups=60(staff)90(deploy),50(sudo)
Sunday, October 16, 11
![Page 70: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/70.jpg)
$ iduid=1000(codebeaker) gid=1000(codebeaker) groups=60(staff)90(deploy),50(sudo)
$ touch example
Sunday, October 16, 11
![Page 71: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/71.jpg)
$ iduid=1000(codebeaker) gid=1000(codebeaker) groups=60(staff)90(deploy),50(sudo)
$ touch example
$ newgrp -l deploy
Sunday, October 16, 11
![Page 72: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/72.jpg)
I/O
Sunday, October 16, 11
![Page 73: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/73.jpg)
PROCESSES
Sunday, October 16, 11
![Page 74: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/74.jpg)
PERMISSIONS
Sunday, October 16, 11
![Page 75: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/75.jpg)
37SIGNALS
Sunday, October 16, 11
![Page 76: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/76.jpg)
SHELLS, LOGIN AND NON-LOGIN
Sunday, October 16, 11
![Page 77: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/77.jpg)
ENVIRONMENTAL VARIABLES
Sunday, October 16, 11
![Page 78: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/78.jpg)
SSH
Sunday, October 16, 11
![Page 79: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/79.jpg)
SOURCES OF TRUTH
Sunday, October 16, 11
![Page 80: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/80.jpg)
DISTRIBUTION OF RESOURCES
Sunday, October 16, 11
![Page 81: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/81.jpg)
HOW?There isn’t any software on the planet for doing this correctly.
Sunday, October 16, 11
![Page 82: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/82.jpg)
HELP ME WRITE IT…
Sunday, October 16, 11
![Page 83: Mag rails 2011 web application deployment for small teams](https://reader034.vdocuments.us/reader034/viewer/2022051109/549af0c8b4795901098b4621/html5/thumbnails/83.jpg)
I’M @CODEBEAKERThanks for your time and attention, any questions?
Sunday, October 16, 11