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

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

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