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

Continuous Delivery in Java - Things we learned hurting ourselves

Continuous Delivery in Java - Things we learned hurting ourselves

The slides of my talk at the Italian Agile Day 2015 about Continuous Delivery in Java

Paolo D'Incau

November 07, 2015
Tweet

More Decks by Paolo D'Incau

Other Decks in Programming

Transcript

  1. Continuous
    Delivery
    in Java
    Cose che abbiamo imparato
    facendoci del male
    Italian Agile Day ‘15

    View Slide

  2. @pdincau
    Here I am

    View Slide

  3. Continuous Delivery?
    What is

    View Slide

  4. “Continuous Delivery is a software development discipline where you
    build software in such a way that the software can be released to
    production at any time. ”
    Martin Fowler*
    * martinfowler.com/bliki/ContinuousDelivery.html

    View Slide

  5. “Continuous Delivery is nothing more than reducing the
    stress you get when you deliver business value to the customer ”
    My Team*
    * Come and ask!

    View Slide

  6. n t
    Continuous Delivery...
    What is

    View Slide

  7. Continuous Integration

    View Slide

  8. Continuous Deployment

    View Slide

  9. “Safety" Deploy rules

    View Slide

  10. Technically
    Speaking

    View Slide

  11. Deploy any specific working version to
    production with confidence

    View Slide

  12. 3 ways

    View Slide

  13. Rodeo Style

    View Slide

  14. No tests
    Manual deploy
    Snowflake environments
    Non predictable outcome
    Few or very little collaboration

    View Slide

  15. By the book

    View Slide

  16. Fast Feedback
    Done is released
    Shared responsibility
    Everything is automated
    Repeatable and reliable process

    View Slide

  17. Start small and iterate

    View Slide

  18. Once upon
    a time...

    View Slide

  19. We did know...

    View Slide

  20. Previous deployment process was painful
    Database continuously change
    Different environments

    View Slide

  21. Iteration n.1
    No
    Automation

    View Slide

  22. Environment replica on AWS
    Manual build
    Manual DB migrations
    Deploy with scp to remote JBoss

    View Slide

  23. It was our
    own choice...

    View Slide

  24. ...but we felt like this

    View Slide

  25. No automation at all
    When was our last deploy?

    View Slide

  26. A taste of
    Automation
    Iteration n.2

    View Slide

  27. Set up a basic Jenkins installation
    Test and build triggered on push
    DB migration using Liquibase
    Task to deploy on AWS

    View Slide

  28. This worked for a while

    View Slide

  29. Errors in MyBatis DB mappers
    Wrong/Missing wirings

    View Slide

  30. Yay! Environments are ready!

    View Slide

  31. Deploy
    Everywhere
    Iteration n.3

    View Slide

  32. New Jenkins job to run IT
    Track slowest tests
    First official deploy an all environments

    View Slide

  33. …with different DB drivers !#$?!

    View Slide

  34. Duplication

    View Slide

  35. Incorrect use of mvn profiles
    N-builds for N-environments
    Long build and deploy time

    View Slide

  36. Single
    Artefact
    Iteration n.4

    View Slide

  37. Got rid of configurations using JBoss
    *Unique* artefact for all environments
    Deploy version X.Y.Z from Nexus

    View Slide

  38. We started getting fast

    View Slide

  39. But QA were not so happy
    Branches, branches everywhere!

    View Slide

  40. Make
    them happy
    Iteration n.5

    View Slide

  41. AWS is for nightly builds
    Tags over branches
    Track deployed version

    View Slide

  42. Acceptance tests

    View Slide

  43. Explained values and
    motivations to Product Owner

    View Slide

  44. Remove Candidate
    Clean Up
    Clean Up
    Meet the pipeline
    Migrate
    Database
    Fetch
    Unit Tests
    Build
    Build
    Slow Tests
    Integration Tests
    Integration
    Deploy
    Publish
    UAT
    QA and Publish

    View Slide

  45. Where to go next

    View Slide

  46. Parallel builds
    Environments Provisioning

    View Slide

  47. Things we would
    change...

    View Slide

  48. Pipeline with “placeholders”
    Extract configurations
    Explain at the beginning the values behind

    View Slide

  49. Things we would
    do again...

    View Slide

  50. Build the pipeline iteratively
    Use of Liquibase
    Share pipeline responsibility

    View Slide

  51. Recommended reading

    View Slide

  52. That’s all!

    View Slide

  53. Thanks
    @pdincau

    View Slide