SlideShare a Scribd company logo
1 of 83
Download to read offline
Understanding and designing web
                         application deployment for small
                                      teams.
   Lee Hambley
      lee.hambley@gmail.com
      github.com/leehambley
      twitter.com/codebeaker


Sunday, October 16, 11
WHY DO WE DEPLOY?




Sunday, October 16, 11
WHY DO WE DEPLOY?
    •   Fundamentally, because we’ve done
        some work, and we want to share it




Sunday, October 16, 11
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
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
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
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
WHY DO WE DEPLOY?
    •   Fundamentally, because we’ve done       •   because we’re professionals
        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
WHY DO WE DEPLOY?
    •   Fundamentally, because we’ve done       •   because we’re professionals
        some work, and we want to share it
                                                •   because interpreters like to load files into memory
                                                    for performance (& other good reasons)
    •   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
WHY DO WE DEPLOY?
    •   Fundamentally, because we’ve done       •   because we’re professionals
        some work, and we want to share it
                                                •   because interpreters like to load files into memory
                                                    for performance (& other good reasons)
    •   firstly with stakeholders, second with
        users
                                                •   because we like to think about software in “versions”

    •   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
WHY DO WE DEPLOY?
    •   Fundamentally, because we’ve done       •   because we’re professionals
        some work, and we want to share it
                                                •   because interpreters like to load files into memory
                                                    for performance (& other good reasons)
    •   firstly with stakeholders, second with
        users
                                                •   because we like to think about software in “versions”

    •   because we’ve fixed bugs and need to     •   because we prefer to be available to our customers
        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
WHY DO WE DEPLOY?
    •   Fundamentally, because we’ve done       •   because we’re professionals
        some work, and we want to share it
                                                •   because interpreters like to load files into memory
                                                    for performance (& other good reasons)
    •   firstly with stakeholders, second with
        users
                                                •   because we like to think about software in “versions”

    •   because we’ve fixed bugs and need to     •   because we prefer to be available to our customers
        make the improved code available
                                                •   because we prefer to be accountable to the business
                                                    people
    •   because the business interest needs
        new features

    •   because we need to test something
        privately in a production-like
        environment



Sunday, October 16, 11
WHY DO WE DEPLOY?
    •   Fundamentally, because we’ve done       •   because we’re professionals
        some work, and we want to share it
                                                •   because interpreters like to load files into memory
                                                    for performance (& other good reasons)
    •   firstly with stakeholders, second with
        users
                                                •   because we like to think about software in “versions”

    •   because we’ve fixed bugs and need to     •   because we prefer to be available to our customers
        make the improved code available
                                                •   because we prefer to be accountable to the business
                                                    people
    •   because the business interest needs
        new features
                                                •   because we have things like migrations, seed tasks,
                                                    background workers and all the rest
    •   because we need to test something
        privately in a production-like
        environment



Sunday, October 16, 11
WHY DO WE DEPLOY?
    •   Fundamentally, because we’ve done       •   because we’re professionals
        some work, and we want to share it
                                                •   because interpreters like to load files into memory
                                                    for performance (& other good reasons)
    •   firstly with stakeholders, second with
        users
                                                •   because we like to think about software in “versions”

    •   because we’ve fixed bugs and need to     •   because we prefer to be available to our customers
        make the improved code available
                                                •   because we prefer to be accountable to the business
                                                    people
    •   because the business interest needs
        new features
                                                •   because we have things like migrations, seed tasks,
                                                    background workers and all the rest
    •   because we need to test something
        privately in a production-like          •   because there’s usually more than one machine
        environment



Sunday, October 16, 11
WHY DO WE DEPLOY?
    •   Fundamentally, because we’ve done       •   because we’re professionals
        some work, and we want to share it
                                                •   because interpreters like to load files into memory
                                                    for performance (& other good reasons)
    •   firstly with stakeholders, second with
        users
                                                •   because we like to think about software in “versions”

    •   because we’ve fixed bugs and need to     •   because we prefer to be available to our customers
        make the improved code available
                                                •   because we prefer to be accountable to the business
                                                    people
    •   because the business interest needs
        new features
                                                •   because we have things like migrations, seed tasks,
                                                    background workers and all the rest
    •   because we need to test something
        privately in a production-like          •   because there’s usually more than one machine
        environment
                                                •   because very often there’s more than one moving
                                                    piece has changed. (code & database, code &
                                                    configuration, etc)

Sunday, October 16, 11
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
INFRASTRUCTURE VS. APPLICATION
        operating system

           rubygems.org

         SSL Certificates

                                             github.com

                                              SSH keys

                                       logrotate configuration

                                                          nginx virtual hosts configuration

                           scheduled jobs                                    application code

                                              log files

                                                    cache configuration

                                                  database configuration


        Infrastructure                                                                 Application
Sunday, October 16, 11
BENCHMARK
    gadget-showdown.co.uk
    Comparing 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
BENCHMARK
    gadget-showdown.co.uk
    Comparing 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
                                                     PostgreSQL
         • User comments
         • Requests
         • RSS feed
         • Notifications
                                                     Memcache
         • Daily posts
         • Non-technical writing team




Sunday, October 16, 11
BENCHMARK
    gadget-showdown.co.uk
    Comparing 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
                                                     PostgreSQL
         • User comments
         • Requests
         • RSS feed
         • Notifications
                                                     Memcache
         • Daily posts
         • Non-technical writing team




Sunday, October 16, 11
BENCHMARK
    gadget-showdown.co.uk
    Comparing 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
                                                     PostgreSQL
         • User comments
         • Requests
         • RSS feed
         • Notifications
                                                     Memcache
         • Daily posts
         • Non-technical writing team
                                                     MRI v1.8.7




Sunday, October 16, 11
BENCHMARK
    gadget-showdown.co.uk
    Comparing 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
                                                     PostgreSQL
         • User comments
         • Requests
         • RSS feed
         • Notifications
                                                     Memcache
         • Daily posts
         • Non-technical writing team
                                                     MRI v1.8.7

                                                     Unicorn



Sunday, October 16, 11
BENCHMARK
    gadget-showdown.co.uk
    Comparing 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
                                                     PostgreSQL
         • User comments
         • Requests
         • RSS feed
         • Notifications
                                                     Memcache
         • Daily posts
         • Non-technical writing team
                                                     MRI v1.8.7

                                                     Unicorn



Sunday, October 16, 11
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
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
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
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
WHERE DO WE DEPLOY?




 ✝ That’s not a condonation, just an observation
Sunday, October 16, 11
WHERE DO WE DEPLOY?

    • Almost                  certainly to VPS




 ✝ That’s not a condonation, just an observation
Sunday, October 16, 11
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
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
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
WHERE DO WE DEPLOY?

    • Almost                  certainly to VPS                   • Probablyto a 32 bit
                                                                  operating system
    • 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
WHERE DO WE DEPLOY?

    • Almost                  certainly to VPS                   • Probablyto a 32 bit
                                                                  operating system
    • Almost                  certainly, not to EC2
        (that is, at least not in a way that makes the most of
        the elastic infrastructure)                              • Probably   to more than one
                                                                  machine
    • 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
WHERE DO WE DEPLOY?

    • Almost                  certainly to VPS                   • Probablyto a 32 bit
                                                                  operating system
    • Almost                  certainly, not to EC2
        (that is, at least not in a way that makes the most of
        the elastic infrastructure)                              • Probably   to more than one
                                                                  machine
    • Almost                  certainly to Ubuntu ✝
        (because it has a convenient package manager)
                                                                 • Probably
                                                                         using something
    • Probably
                                                                  from AWS, because it’s hip
                 to a VPS provider
        in the USA

 ✝ That’s not a condonation, just an observation
Sunday, October 16, 11
WHERE DO WE DEPLOY?

    • Almost                  certainly to VPS                   • Probablyto a 32 bit
                                                                  operating system
    • Almost                  certainly, not to EC2
        (that is, at least not in a way that makes the most of
        the elastic infrastructure)                              • Probably   to more than one
                                                                  machine
    • Almost                  certainly to Ubuntu ✝
        (because it has a convenient package manager)
                                                                 • Probably
                                                                         using something
    • Probably
                                                                  from AWS, because it’s hip
                 to a VPS provider
        in the USA                                               • Probably   not using a CDN

 ✝ That’s not a condonation, just an observation
Sunday, October 16, 11
A SHORTLIST OF REQUIREMENTS FOR A SANE
                                DEPLOYMENT

           Speedy
           Secure
           Accessible
           Transactional
           Accountable
           Parallell
           Hookable




Sunday, October 16, 11
A SHORTLIST OF REQUIREMENTS FOR A SANE
                                DEPLOYMENT

           Speedy
           Secure
           Accessible
           Transactional
           Accountable
           Parallel
           Hookable




Sunday, October 16, 11
A SHORTLIST OF REQUIREMENTS FOR A SANE
                                DEPLOYMENT

           Speedy           •Fast starting
                            •Fail fast
           Secure           •Using a fast protocol (SSH, with keys)
                            •Not wasting bandwidth or capacity
           Accessible       •Not relying on passwords
           Transactional
           Accountable
           Parallel
           Hookable




Sunday, October 16, 11
A SHORTLIST OF REQUIREMENTS FOR A SANE
                                DEPLOYMENT

           Speedy        •Using a secure protocol
                         •Using a secure, trustworthy source
           Secure        •Secure from workstation to server
                         •Secure deployment result by design
           Accessible    •No shared sign-ons
           Transactional •Robust
           Accountable •Resilient
           Parallel      •No .rc~ files
           Hookable




Sunday, October 16, 11
A SHORTLIST OF REQUIREMENTS FOR A SANE
                                DEPLOYMENT

           Speedy           •Any member of the dev’ team can deploy
                            •They can do it without using root (or other) passwords
           Secure           •Secure from workstation to server
                            •Secure deployment result by design
           Accessible
           Transactional
           Accountable
           Parallel
           Hookable




Sunday, October 16, 11
A SHORTLIST OF REQUIREMENTS FOR A SANE
                                DEPLOYMENT

           Speedy           •When a deploy fails on one machine, we fail it across the board
                            •We know when a deploy starts, is in progress, and ends
           Secure           •We can inform our customers that there’s a deploy in progress,
                             without falling back to a maintenance page.
           Accessible       •We can recover from errors.
           Transactional
           Accountable
           Parallel
           Hookable




Sunday, October 16, 11
A SHORTLIST OF REQUIREMENTS FOR A SANE
                                DEPLOYMENT

           Speedy           •We know who deployed what, and when
                            •We know exactly what happened during the deployment
           Secure           •We know which version of the code is in production
           Accessible       •We know how many servers are online
           Transactional
           Accountable
           Parallel
           Hookable




Sunday, October 16, 11
A SHORTLIST OF REQUIREMENTS FOR A SANE
                                DEPLOYMENT

           Speedy           •We need to operate on our machines in parallel
                            •Except when we don’t
           Secure           •Sequential parallel deployment
           Accessible
           Transactional
           Accountable
           Parallel
           Hookable




Sunday, October 16, 11
A SHORTLIST OF REQUIREMENTS FOR A SANE
                                DEPLOYMENT

           Speedy           •We need to know how it worked out
                            •We often need to share that information
           Secure            •with business people
                             •with automated systems (issue tracker, status board, monitoring)
           Accessible
           Transactional
           Accountable
           Parallel
           Hookable




Sunday, October 16, 11
THAT’S A LONG LIST




Sunday, October 16, 11
AND NOBODY DOES
                           EVERYTHING



Sunday, October 16, 11
SO WHERE DO WE BEGIN?




Sunday, October 16, 11
$ CAP PRODUCTION DEPLOY




Sunday, October 16, 11
# > touch /tmp/some-file


                         $ > touch /tmp/some-file




Sunday, October 16, 11
$ > su someotheruser


                         $ > su - someotheruser




Sunday, October 16, 11
The Dreyfus Model




Sunday, October 16, 11
UNIX 101




Sunday, October 16, 11
USERS AND GROUPS




Sunday, October 16, 11
$ CAP PRODUCTION PERMISSIONS:FIX




Sunday, October 16, 11
$ 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
Sunday, October 16, 11
$ whoami




Sunday, October 16, 11
$ whoami
                 codebeaker




Sunday, October 16, 11
$ whoami
                 codebeaker

                $ groups




Sunday, October 16, 11
$ whoami
                 codebeaker

                $ groups
                 codebeaker staff deploy sudo




Sunday, October 16, 11
$ whoami
                 codebeaker

                $ groups
                 codebeaker staff deploy sudo

                $ echo $PATH




Sunday, October 16, 11
$ whoami
                 codebeaker

                $ groups
                 codebeaker staff deploy sudo

                $ echo $PATH
                 /usr/bin:/bin:/usr/sbin




Sunday, October 16, 11
Sunday, October 16, 11
$ id




Sunday, October 16, 11
$ id
                uid=501(codebeaker) gid=20(staff)
                groups=20(staff)12(everyone),
                33(_appstore),80(admin),
                204(_developer)




Sunday, October 16, 11
Sunday, October 16, 11
$ id




Sunday, October 16, 11
$ id
                uid=1000(codebeaker)
                gid=1000(codebeaker)
                groups=60(staff)90(deploy),50(sudo)




Sunday, October 16, 11
$ id
                uid=1000(codebeaker)
                gid=1000(codebeaker)
                groups=60(staff)90(deploy),50(sudo)

                $ touch example




Sunday, October 16, 11
$ id
                uid=1000(codebeaker)
                gid=1000(codebeaker)
                groups=60(staff)90(deploy),50(sudo)

                $ touch example

                $ newgrp -l deploy



Sunday, October 16, 11
I/O




Sunday, October 16, 11
PROCESSES




Sunday, October 16, 11
PERMISSIONS




Sunday, October 16, 11
37SIGNALS




Sunday, October 16, 11
SHELLS, LOGIN AND NON-LOGIN




Sunday, October 16, 11
ENVIRONMENTAL VARIABLES




Sunday, October 16, 11
SSH




Sunday, October 16, 11
SOURCES OF TRUTH




Sunday, October 16, 11
DISTRIBUTION OF
                            RESOURCES




Sunday, October 16, 11
HOW?
        There isn’t any software on the planet for doing this correctly.




Sunday, October 16, 11
HELP ME WRITE IT…




Sunday, October 16, 11
I’M @CODEBEAKER
                         Thanks for your time and attention, any questions?




Sunday, October 16, 11

More Related Content

Similar to Mag rails 2011 web application deployment for small teams

Evaluation technologies
Evaluation  technologiesEvaluation  technologies
Evaluation technologiesolliedwyer
 
Evaluation technologies
Evaluation  technologiesEvaluation  technologies
Evaluation technologiesolliedwyer
 
Evaluation - Technologies
Evaluation - TechnologiesEvaluation - Technologies
Evaluation - Technologies11153231
 
Agile Way to First Iteration
Agile Way to First IterationAgile Way to First Iteration
Agile Way to First IterationMikalai Alimenkou
 
SendGrid documentation & open source projects
SendGrid documentation & open source projectsSendGrid documentation & open source projects
SendGrid documentation & open source projectsSendGrid JP
 
SharePoint - The hybrid story and beyond
SharePoint - The hybrid story and beyondSharePoint - The hybrid story and beyond
SharePoint - The hybrid story and beyondMikael Svenson
 
Agile Analysis, Not Fragile Analysis
Agile Analysis, Not Fragile AnalysisAgile Analysis, Not Fragile Analysis
Agile Analysis, Not Fragile AnalysisAdam Monago
 
Deep Links Into Primo
Deep Links Into PrimoDeep Links Into Primo
Deep Links Into PrimoAlan Manifold
 
It's the way of the present - Why you should use plone.app.contenttypes
It's the way of the present - Why you should use plone.app.contenttypesIt's the way of the present - Why you should use plone.app.contenttypes
It's the way of the present - Why you should use plone.app.contenttypesPhilip Bauer
 
Lean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentLean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentBill Ayers
 
AD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension LibraryAD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension Librarypaidi_ed
 
Enterprise Open Source
Enterprise Open SourceEnterprise Open Source
Enterprise Open SourceOscar Renalias
 
Dev ops lessons learned - Michael Collins
Dev ops lessons learned  - Michael CollinsDev ops lessons learned  - Michael Collins
Dev ops lessons learned - Michael CollinsDevopsdays
 
Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SitePronovix
 
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by Ilona Ko...
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by  Ilona Ko...APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by  Ilona Ko...
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by Ilona Ko...apidays
 
IBM Cognos 10.2 Cognos Workspace and Workspace Advanced
IBM Cognos 10.2 Cognos Workspace and Workspace AdvancedIBM Cognos 10.2 Cognos Workspace and Workspace Advanced
IBM Cognos 10.2 Cognos Workspace and Workspace AdvancedSenturus
 

Similar to Mag rails 2011 web application deployment for small teams (20)

Evaluation technologies
Evaluation  technologiesEvaluation  technologies
Evaluation technologies
 
Evaluation technologies
Evaluation  technologiesEvaluation  technologies
Evaluation technologies
 
Evaluation - Technologies
Evaluation - TechnologiesEvaluation - Technologies
Evaluation - Technologies
 
Agile Way to First Iteration
Agile Way to First IterationAgile Way to First Iteration
Agile Way to First Iteration
 
Slide share
Slide shareSlide share
Slide share
 
Slide share
Slide shareSlide share
Slide share
 
SendGrid documentation & open source projects
SendGrid documentation & open source projectsSendGrid documentation & open source projects
SendGrid documentation & open source projects
 
Developer 2.0
Developer 2.0Developer 2.0
Developer 2.0
 
SharePoint - The hybrid story and beyond
SharePoint - The hybrid story and beyondSharePoint - The hybrid story and beyond
SharePoint - The hybrid story and beyond
 
Agile Analysis, Not Fragile Analysis
Agile Analysis, Not Fragile AnalysisAgile Analysis, Not Fragile Analysis
Agile Analysis, Not Fragile Analysis
 
Deep Links Into Primo
Deep Links Into PrimoDeep Links Into Primo
Deep Links Into Primo
 
SharePoint Conference Recap - Adoption Session
SharePoint Conference Recap - Adoption SessionSharePoint Conference Recap - Adoption Session
SharePoint Conference Recap - Adoption Session
 
It's the way of the present - Why you should use plone.app.contenttypes
It's the way of the present - Why you should use plone.app.contenttypesIt's the way of the present - Why you should use plone.app.contenttypes
It's the way of the present - Why you should use plone.app.contenttypes
 
Lean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentLean-Agile SharePoint Development
Lean-Agile SharePoint Development
 
AD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension LibraryAD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension Library
 
Enterprise Open Source
Enterprise Open SourceEnterprise Open Source
Enterprise Open Source
 
Dev ops lessons learned - Michael Collins
Dev ops lessons learned  - Michael CollinsDev ops lessons learned  - Michael Collins
Dev ops lessons learned - Michael Collins
 
Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc Site
 
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by Ilona Ko...
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by  Ilona Ko...APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by  Ilona Ko...
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by Ilona Ko...
 
IBM Cognos 10.2 Cognos Workspace and Workspace Advanced
IBM Cognos 10.2 Cognos Workspace and Workspace AdvancedIBM Cognos 10.2 Cognos Workspace and Workspace Advanced
IBM Cognos 10.2 Cognos Workspace and Workspace Advanced
 

Recently uploaded

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Recently uploaded (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Mag rails 2011 web application deployment for small teams

  • 1. Understanding and designing web application deployment for small teams. Lee Hambley lee.hambley@gmail.com github.com/leehambley twitter.com/codebeaker Sunday, October 16, 11
  • 2. WHY DO WE DEPLOY? Sunday, October 16, 11
  • 3. WHY DO WE DEPLOY? • Fundamentally, because we’ve done some work, and we want to share it Sunday, October 16, 11
  • 4. 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
  • 5. 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
  • 6. 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
  • 7. 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
  • 8. WHY DO WE DEPLOY? • Fundamentally, because we’ve done • because we’re professionals 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
  • 9. WHY DO WE DEPLOY? • Fundamentally, because we’ve done • because we’re professionals some work, and we want to share it • because interpreters like to load files into memory for performance (& other good reasons) • 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
  • 10. WHY DO WE DEPLOY? • Fundamentally, because we’ve done • because we’re professionals some work, and we want to share it • because interpreters like to load files into memory for performance (& other good reasons) • firstly with stakeholders, second with users • because we like to think about software in “versions” • 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
  • 11. WHY DO WE DEPLOY? • Fundamentally, because we’ve done • because we’re professionals some work, and we want to share it • because interpreters like to load files into memory for performance (& other good reasons) • firstly with stakeholders, second with users • because we like to think about software in “versions” • because we’ve fixed bugs and need to • because we prefer to be available to our customers 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
  • 12. WHY DO WE DEPLOY? • Fundamentally, because we’ve done • because we’re professionals some work, and we want to share it • because interpreters like to load files into memory for performance (& other good reasons) • firstly with stakeholders, second with users • because we like to think about software in “versions” • because we’ve fixed bugs and need to • because we prefer to be available to our customers make the improved code available • because we prefer to be accountable to the business people • because the business interest needs new features • because we need to test something privately in a production-like environment Sunday, October 16, 11
  • 13. WHY DO WE DEPLOY? • Fundamentally, because we’ve done • because we’re professionals some work, and we want to share it • because interpreters like to load files into memory for performance (& other good reasons) • firstly with stakeholders, second with users • because we like to think about software in “versions” • because we’ve fixed bugs and need to • because we prefer to be available to our customers make the improved code available • because we prefer to be accountable to the business people • because the business interest needs new features • because we have things like migrations, seed tasks, background workers and all the rest • because we need to test something privately in a production-like environment Sunday, October 16, 11
  • 14. WHY DO WE DEPLOY? • Fundamentally, because we’ve done • because we’re professionals some work, and we want to share it • because interpreters like to load files into memory for performance (& other good reasons) • firstly with stakeholders, second with users • because we like to think about software in “versions” • because we’ve fixed bugs and need to • because we prefer to be available to our customers make the improved code available • because we prefer to be accountable to the business people • because the business interest needs new features • because we have things like migrations, seed tasks, background workers and all the rest • because we need to test something privately in a production-like • because there’s usually more than one machine environment Sunday, October 16, 11
  • 15. WHY DO WE DEPLOY? • Fundamentally, because we’ve done • because we’re professionals some work, and we want to share it • because interpreters like to load files into memory for performance (& other good reasons) • firstly with stakeholders, second with users • because we like to think about software in “versions” • because we’ve fixed bugs and need to • because we prefer to be available to our customers make the improved code available • because we prefer to be accountable to the business people • because the business interest needs new features • because we have things like migrations, seed tasks, background workers and all the rest • because we need to test something privately in a production-like • because there’s usually more than one machine environment • because very often there’s more than one moving piece has changed. (code & database, code & configuration, etc) Sunday, October 16, 11
  • 16. 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
  • 17. INFRASTRUCTURE VS. APPLICATION operating system rubygems.org SSL Certificates github.com SSH keys logrotate configuration nginx virtual hosts configuration scheduled jobs application code log files cache configuration database configuration Infrastructure Application Sunday, October 16, 11
  • 18. BENCHMARK gadget-showdown.co.uk Comparing 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
  • 19. BENCHMARK gadget-showdown.co.uk Comparing 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 PostgreSQL • User comments • Requests • RSS feed • Notifications Memcache • Daily posts • Non-technical writing team Sunday, October 16, 11
  • 20. BENCHMARK gadget-showdown.co.uk Comparing 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 PostgreSQL • User comments • Requests • RSS feed • Notifications Memcache • Daily posts • Non-technical writing team Sunday, October 16, 11
  • 21. BENCHMARK gadget-showdown.co.uk Comparing 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 PostgreSQL • User comments • Requests • RSS feed • Notifications Memcache • Daily posts • Non-technical writing team MRI v1.8.7 Sunday, October 16, 11
  • 22. BENCHMARK gadget-showdown.co.uk Comparing 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 PostgreSQL • User comments • Requests • RSS feed • Notifications Memcache • Daily posts • Non-technical writing team MRI v1.8.7 Unicorn Sunday, October 16, 11
  • 23. BENCHMARK gadget-showdown.co.uk Comparing 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 PostgreSQL • User comments • Requests • RSS feed • Notifications Memcache • Daily posts • Non-technical writing team MRI v1.8.7 Unicorn Sunday, October 16, 11
  • 24. 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
  • 25. 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
  • 26. 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
  • 27. 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
  • 28. WHERE DO WE DEPLOY? ✝ That’s not a condonation, just an observation Sunday, October 16, 11
  • 29. WHERE DO WE DEPLOY? • Almost certainly to VPS ✝ That’s not a condonation, just an observation Sunday, October 16, 11
  • 30. 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
  • 31. 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
  • 32. 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
  • 33. WHERE DO WE DEPLOY? • Almost certainly to VPS • Probablyto a 32 bit operating system • 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
  • 34. WHERE DO WE DEPLOY? • Almost certainly to VPS • Probablyto a 32 bit operating system • Almost certainly, not to EC2 (that is, at least not in a way that makes the most of the elastic infrastructure) • Probably to more than one machine • 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
  • 35. WHERE DO WE DEPLOY? • Almost certainly to VPS • Probablyto a 32 bit operating system • Almost certainly, not to EC2 (that is, at least not in a way that makes the most of the elastic infrastructure) • Probably to more than one machine • Almost certainly to Ubuntu ✝ (because it has a convenient package manager) • Probably using something • Probably from AWS, because it’s hip to a VPS provider in the USA ✝ That’s not a condonation, just an observation Sunday, October 16, 11
  • 36. WHERE DO WE DEPLOY? • Almost certainly to VPS • Probablyto a 32 bit operating system • Almost certainly, not to EC2 (that is, at least not in a way that makes the most of the elastic infrastructure) • Probably to more than one machine • Almost certainly to Ubuntu ✝ (because it has a convenient package manager) • Probably using something • Probably from AWS, because it’s hip to a VPS provider in the USA • Probably not using a CDN ✝ That’s not a condonation, just an observation Sunday, October 16, 11
  • 37. A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT Speedy Secure Accessible Transactional Accountable Parallell Hookable Sunday, October 16, 11
  • 38. A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT Speedy Secure Accessible Transactional Accountable Parallel Hookable Sunday, October 16, 11
  • 39. A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT Speedy •Fast starting •Fail fast Secure •Using a fast protocol (SSH, with keys) •Not wasting bandwidth or capacity Accessible •Not relying on passwords Transactional Accountable Parallel Hookable Sunday, October 16, 11
  • 40. A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT Speedy •Using a secure protocol •Using a secure, trustworthy source Secure •Secure from workstation to server •Secure deployment result by design Accessible •No shared sign-ons Transactional •Robust Accountable •Resilient Parallel •No .rc~ files Hookable Sunday, October 16, 11
  • 41. A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT Speedy •Any member of the dev’ team can deploy •They can do it without using root (or other) passwords Secure •Secure from workstation to server •Secure deployment result by design Accessible Transactional Accountable Parallel Hookable Sunday, October 16, 11
  • 42. A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT Speedy •When a deploy fails on one machine, we fail it across the board •We know when a deploy starts, is in progress, and ends Secure •We can inform our customers that there’s a deploy in progress, without falling back to a maintenance page. Accessible •We can recover from errors. Transactional Accountable Parallel Hookable Sunday, October 16, 11
  • 43. A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT Speedy •We know who deployed what, and when •We know exactly what happened during the deployment Secure •We know which version of the code is in production Accessible •We know how many servers are online Transactional Accountable Parallel Hookable Sunday, October 16, 11
  • 44. A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT Speedy •We need to operate on our machines in parallel •Except when we don’t Secure •Sequential parallel deployment Accessible Transactional Accountable Parallel Hookable Sunday, October 16, 11
  • 45. A SHORTLIST OF REQUIREMENTS FOR A SANE DEPLOYMENT Speedy •We need to know how it worked out •We often need to share that information Secure •with business people •with automated systems (issue tracker, status board, monitoring) Accessible Transactional Accountable Parallel Hookable Sunday, October 16, 11
  • 46. THAT’S A LONG LIST Sunday, October 16, 11
  • 47. AND NOBODY DOES EVERYTHING Sunday, October 16, 11
  • 48. SO WHERE DO WE BEGIN? Sunday, October 16, 11
  • 49. $ CAP PRODUCTION DEPLOY Sunday, October 16, 11
  • 50. # > touch /tmp/some-file $ > touch /tmp/some-file Sunday, October 16, 11
  • 51. $ > su someotheruser $ > su - someotheruser Sunday, October 16, 11
  • 52. The Dreyfus Model Sunday, October 16, 11
  • 54. USERS AND GROUPS Sunday, October 16, 11
  • 55. $ CAP PRODUCTION PERMISSIONS:FIX Sunday, October 16, 11
  • 56. $ 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
  • 59. $ whoami codebeaker Sunday, October 16, 11
  • 60. $ whoami codebeaker $ groups Sunday, October 16, 11
  • 61. $ whoami codebeaker $ groups codebeaker staff deploy sudo Sunday, October 16, 11
  • 62. $ whoami codebeaker $ groups codebeaker staff deploy sudo $ echo $PATH Sunday, October 16, 11
  • 63. $ whoami codebeaker $ groups codebeaker staff deploy sudo $ echo $PATH /usr/bin:/bin:/usr/sbin Sunday, October 16, 11
  • 66. $ id uid=501(codebeaker) gid=20(staff) groups=20(staff)12(everyone), 33(_appstore),80(admin), 204(_developer) Sunday, October 16, 11
  • 69. $ id uid=1000(codebeaker) gid=1000(codebeaker) groups=60(staff)90(deploy),50(sudo) Sunday, October 16, 11
  • 70. $ id uid=1000(codebeaker) gid=1000(codebeaker) groups=60(staff)90(deploy),50(sudo) $ touch example Sunday, October 16, 11
  • 71. $ id uid=1000(codebeaker) gid=1000(codebeaker) groups=60(staff)90(deploy),50(sudo) $ touch example $ newgrp -l deploy Sunday, October 16, 11
  • 76. SHELLS, LOGIN AND NON-LOGIN Sunday, October 16, 11
  • 79. SOURCES OF TRUTH Sunday, October 16, 11
  • 80. DISTRIBUTION OF RESOURCES Sunday, October 16, 11
  • 81. HOW? There isn’t any software on the planet for doing this correctly. Sunday, October 16, 11
  • 82. HELP ME WRITE IT… Sunday, October 16, 11
  • 83. I’M @CODEBEAKER Thanks for your time and attention, any questions? Sunday, October 16, 11