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

Dockerize your Grails App for more deployment fun - Gr8Conf EU 2016

Dockerize your Grails App for more deployment fun - Gr8Conf EU 2016

Do you know the pain of maintaining different Versions of Grails, Redis, PhantomJS or Postgres on your development box to work with various projects you’re involved in over time? Even if you get it done, how is this repeatable if a new colleague starts at your company? How do you set up testing environments for QA with different versions of your apps? Docker can be the answer to this.

In this talk i will introduce Docker and tell you why it’s worth looking at from a developer's perspective. Starting with different introductory examples, we will dockerize a “real world” Grails app with dependent services. Additionally we’ll have a look at the differences Grails 3 brings to the table regards containerization.

You will learn that managing the mentioned problems and more becomes a breeze and can even be a lot of fun.

Mario David

June 02, 2016
Tweet

More Decks by Mario David

Other Decks in Programming

Transcript

  1. Dockerize your Grails app
    Mario David

    View full-size slide

  2. Mario David
    Software Developer | road-to-cuba-and-beyond.com | mariomddavid

    View full-size slide

  3. What is a Container?
    standardized
    isolated
    App + all depencencies

    View full-size slide

  4. Hypervisor vs. container based Virtualization
    Hypervisor
    App
    OS
    App
    OS
    App
    OS
    OS
    App
    Userspace
    App
    Userspace
    App
    Userspace

    View full-size slide

  5. What is Docker? - Example of Container-Virtualization
    ...actually a pretty old idea: Segmentation
    marketing technological
    lightweight Hypervisor VM shared Linux Kernel
    Isolation Namespaces
    Ouality of Service Cgroups
    OS
    App
    Userspace
    App
    Userspace
    App
    Userspace
    Solaris Zones
    OpenVZ
    FreeBSD
    Jails
    LPAR
    LXC

    View full-size slide

  6. What is Docker? - At the right place at the right time
    Accessibility
    Cloud
    DevOps
    Docker Hub
    Community

    View full-size slide

  7. Docker for Developers
    dev == prod
    Distribution
    mechanism
    share
    your
    environment
    One
    dependency

    View full-size slide


  8. Talk is cheap, show me the code

    View full-size slide


  9. “bit.ly for your own domain”

    Grails 2.5 application

    Database dependency

    github.com/ManningPublications/3oh1
    3oh1 as a Docker Container
    $ docker run -it --rm -p 9000:8080 mariodavid/3oh1

    View full-size slide

  10. even easier...
    Docker as Grails 3 App
    $ docker run -it --rm -p 9001:8080 mariodavid/grails3-docker
    FROM java:8-jre-alpine
    ADD app.war /tmp/app.war
    CMD java -jar /tmp/app.war
    Dockerfile

    View full-size slide

  11. Thank you!
    road-to-cuba-and-beyond.com | mariomddavid

    View full-size slide