Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Loading in …3
1 of 15

More Modern Perl - YAPC 2016



Download to read offline

Part of running a "Modern Perl" system means being ably to quickly test against different versions of perl. Learn why Docker makes this easier for the modern perl developer, and how to get started.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

More Modern Perl - YAPC 2016

  1. 1. More Modern Perl With Docker Jason (Jayce^) Hall - BlueHost
  2. 2. What is Modern Perl? New Versions Update Cycles New Tools
  3. 3. But we already have tools for that perlbrew plenv carton Software Collections
  4. 4. The Absolute Basics Containers Just what you need Encourage small services
  5. 5. Pre Built Images Docker Perl Pick your base Optimize
  6. 6. Beyond the beginning REPL is nifty, but… I want a current perl To run this code I have And add my deps
  7. 7. First Note You can build up an image and save your whole app Docker run, Add your needs, run Or have a common base that just mounts your application code docker build / tag / push Registry Server
  8. 8. Running our first code Pick our image Mount our code directory Install deps … Profit
  10. 10. Some Optimizations Which Base image Chain Commands Clean up work info Build in your dependencies Build on other images
  11. 11. Interacting with others Docker-compose Management interface Hostname setup Service groups Runtime options
  12. 12. Automating a system Compose your alpha/beta/stage Build your images runtime ready Upgrade to other tools AWS Kubernetes ocean of others
  13. 13. –Johnny Doe But What About A Live Demo
  14. 14. Redis Mongo API Worker
  15. 15. More Modern Perl With Docker Jason (Jayce^) Hall - BlueHost

Editor's Notes

  • What is Modern Perl?
    How can you get “more” modern?
  • a renaissance
    frequency, but you need to update
  • Does not remove usefulness of any of these, in fact can make them even more useful
    test your code against multiple version
    but you have to compile and maintain each one

    Carton get the modules you use - if it works in your toolchain
    SCL - Redhat/centos RPM based custom environments

    Why beyond “Hipster” reasons?
  • Not for full VM’s really, look at the upcoming vagrant talk for that
    The next generation of architecture
    Slice out just the parts you need from a VM
    Less exposure
    Less data to cart around
  • Basic containers with just the engine you want to try
    Perl latest
    specific perl versions, options (eg threading)
    and yes, perl6
  • What comes in the image? NOTHING..
    You need to start adding things
    so you can DO things, who programs without CPAN?
  • grab the basic and play, start adding in modules you use
    save out your state, to use for later
    Have your script pull in what it needs
    Better, set one up with *your* use case, and start from that point
  • Have the base commands in the image
    See, it’s that easy….
    Interactive terminal
    Clean up our container after ourselves
    Mount my project directory under /app
    which image am I based off of
    What command do I run?
    could be dzil authordeps | cpanm, or carton run
  • Well, who wants to build up that command line every time?
    Build your arguments, and extra features into a file
    Startup your app, process, etc just by feeding your file into docker
    Build an image with your common starting point, or your final product
    Docker pages have plenty of info and examples about better practices, such as && and working with image layers
    Default command (my REPL in this case) but overrides with command line usage
  • Standard “Perl” library was > 750mb!
    — If I’m running a container that is *only* the things I *need* it shouldn’t have to be that large!
    Current standard starts at 255 - 285 mb
    Built one off of Alpine and it was 75mb
  • What if you wanted to describe multiple containers at once? Docker file for a system of containers
    Get them to know how to interact with each other
    All your docker command line arguments
    Automate a “system”
    Define private network space
    Other tools
    Define custom locations, registry servers


    I can reference by name : so refer to “mongo” or “redis” box in their DSN
  • docker-compose
    Local box
    can push build elsewhere
    or quickly use prebuilt images to replicate
    including out to live
    - please learn when this is right (eg not db)
  • What is Modern Perl?
    How can you get “more” modern?
  • ×