Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Don't Cry When Your Dev Dependencies Die

Don't Cry When Your Dev Dependencies Die

You're supposed to treat your servers like cattle, not pets. But what about your local dependencies? With Takeout, you can spin your instances of MySQL, PostgreSQL, Redis, Memcached, and more up and down without a care. Pairs perfectly with Valet.

Matt Stauffer

August 26, 2020
Tweet

More Decks by Matt Stauffer

Other Decks in Technology

Transcript

  1. BLOCKCHAIN
    Crypto
    A red flare silhouetted the jagged
    @stauffermatt @josecanhelp
    Don’t Cry When Your Dev
    Dependencies Die

    View full-size slide

  2. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Let’s talk local development.

    View full-size slide

  3. Tools we use daily
    • Some are super visible, like our IDE, or our database management tool
    • Some less so, like our shell, or our OS
    • Some, if effective, are nearly invisible; e.g. our local hosting environment

    View full-size slide

  4. Today’s topic

    View full-size slide

  5. How do we know which is the best?
    0
    25
    50
    75
    100
    Ease of use Ease of modification Resource usage Production Parity
    Docker Homestead Valet

    View full-size slide

  6. Common Laravel local environments
    Full Docker
    (Vessel,
    Laradock, etc.)
    Homestead/
    Vagrant
    Valet +
    Homebrew
    DNS/serving/nginx
    PHP, core deps
    MySQL, Redis, etc.
    Packaged
    with Valet
    Managed
    by Valet
    Managed
    by you

    View full-size slide

  7. Common Laravel local environments
    Full Docker
    (Vessel,
    Laradock, etc.)
    Homestead/
    Vagrant
    DNS/serving/nginx
    PHP, core deps
    MySQL, Redis, etc.
    Packaged
    with Valet
    Valet + Docker
    (Jose-style)
    Packaged
    with Valet
    Managed
    by Valet
    Managed
    by you
    Managed
    by Valet
    Valet +
    Homebrew

    View full-size slide

  8. Jose Soto
    • Very Helpful Human
    • AKA Gaston
    • Docker enthusiast

    View full-size slide

  9. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Laravel Valet

    View full-size slide

  10. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Laravel Valet

    View full-size slide

  11. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Other Dependencies

    View full-size slide

  12. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Install Locally

    View full-size slide

  13. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Failure

    View full-size slide

  14. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Valuable Time

    View full-size slide

  15. Troubleshooting
    • Modify obscure files
    • Run uncertain commands
    • Backup and Reformat

    View full-size slide

  16. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Server Admin

    View full-size slide

  17. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp

    View full-size slide

  18. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Not an Intro to Docker Talk

    View full-size slide

  19. What is Docker?
    • Set of Products
    • Virtualization
    • Delivers Software
    • Containers

    View full-size slide

  20. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Parity

    View full-size slide

  21. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Dockerized
    Laravel

    View full-size slide

  22. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Dockerized
    Laravel

    View full-size slide

  23. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Dockerized
    Laravel

    View full-size slide

  24. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Dockerized
    Laravel

    View full-size slide

  25. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Dockerized
    Laravel

    View full-size slide

  26. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Dockerized
    Laravel

    View full-size slide

  27. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Dockerized
    Laravel

    View full-size slide

  28. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Dockerized
    Laravel

    View full-size slide

  29. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Dockerized
    Laravel

    View full-size slide

  30. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    “Local” MySQL

    View full-size slide

  31. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Shared MySQL

    View full-size slide

  32. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Demo

    View full-size slide

  33. Why Docker?
    • Clean Machine
    • Multiple versions
    • Difficult to Install Software

    View full-size slide

  34. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Matt’s Docker Story

    View full-size slide

  35. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Story time: MySQL tanking

    View full-size slide

  36. BLOCKCHAIN
    Crypto
    A red flare silhouetted the jagged
    Homebrew Hell is real.
    Valet won’t save you here.


    View full-size slide

  37. Cattle not pets
    http://cloudscaling.com/blog/cloud-computing/the-history-of-pets-vs-cattle/

    View full-size slide

  38. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Jose saved the day
    $ docker run -d —p 3306:3306 \
    -e MYSQL_ROOT_PASSWORD=password \
    -v mysql_data:/var/lib/mysql \
    library/mysql:latest

    View full-size slide

  39. Not everyone
    has a Jose.

    View full-size slide

  40. EVERYONE GETS A JOSE!

    View full-size slide

  41. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Introducing: Takeout

    View full-size slide

  42. What is it?
    A macOS tool for installing & managing
    development environment dependencies
    using Docker.

    View full-size slide

  43. Side notes
    • macOS-only—for now—but we ❤ Linux & Windows!
    • Takeout ❤ Valet
    • Valet :: PHP/Nginx/etc.
    Takeout :: MySQL/Redis/etc.

    View full-size slide

  44. What isn’t it?
    • Complicated
    • Competition to Vessel, Laradock, Homestead, or Valet

    View full-size slide

  45. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Demo time!

    View full-size slide

  46. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Set the stage

    View full-size slide

  47. 1. Install Docker
    2. Install Takeout
    3. Use Takeout
    4. […]
    5. Profit
    Installing Takeout

    View full-size slide

  48. 1. Install Docker

    View full-size slide

  49. 2. Install Takeout
    $ composer global require tightenco/takeout

    View full-size slide

  50. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Using Takeout
    $ takeout enable

    View full-size slide

  51. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Using Takeout
    $ takeout list

    View full-size slide

  52. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Using Takeout
    $ takeout disable

    View full-size slide

  53. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    Advanced Demo

    View full-size slide

  54. DON’T CRY WHEN YOUR DEV DEPENDENCIES DIE
    @stauffermatt @josecanhelp
    What do we want from you?

    View full-size slide

  55. What do we want from you?
    • Try it out!
    • Share your thoughts with us
    • Contribute (for Linux, for Windows, GUI, etc.):
    github.com/tightenco/takeout
    • Check out Jose's YouTube to learn more:
    youtube.josecanhelp.com

    View full-size slide