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.

Charles Korn- Build & Testing Environments as Code: Because Life's Too Short Not To (Evolution)

108 views

Published on

The value of defining our production infrastructure as code is unquestionable, but in 2018 we are still struggling with our local build and testing environments.

All too often, starting a new project is an incredibly painful process of working out which tools we need to install, which versions will happily coexist together, and configuring them to make them behave as we would like.

As the application evolves and changes over time, maintaining and updating this environment across all developer machines and CI agents is difficult enough, let alone thinking about integration and journey testing, where we'd like to quickly and reliably spin up external dependencies like databases and other services in a known state to test against.

Charles will share practical advice on running your builds and tests quickly, consistently, and completely automatically, on your machine, your colleagues' machines and on CI, as well as how to be up and running in just a few minutes without the overhead of virtual machines, thanks to the power of Docker.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Charles Korn- Build & Testing Environments as Code: Because Life's Too Short Not To (Evolution)

  1. 1. CHARLES KORN Software Developer @charleskorn #EvolutionTW #ThoughtWorks
  2. 2. BUILD AND TESTING ENVIRONMENTS AS CODE …because life’s too short not to
  3. 3. Dollars and Sense, Inc.
  4. 4. International transfers service Postgres database Exchange rate service
  5. 5. Development environment Build environment
  6. 6. Build tools Libraries RuntimesCode IDE / text editor Version control tool Build environment
  7. 7. Development environment Build environment Testing environment(s)
  8. 8. THE STATUS QUO
  9. 9. International transfers service Data store Exchange rate service Data store Kafka CAD CHF EUR GBP SEK USD AUD
  10. 10. WHAT’S WRONG WITH THE STATUS QUO?
  11. 11. Build environments
  12. 12. (In)consistency
  13. 13. Onboarding time Average onboarding time: 2 hours to 2 weeks
  14. 14. Cost of change
  15. 15. No isolation
  16. 16. Overhead
  17. 17. Team autonomy (or lack thereof)
  18. 18. Test environments
  19. 19. Flakiness 84% of new test failures at Google are due to flakiness
  20. 20. It’s painful
  21. 21. It’s painful …which leads to further pain
  22. 22. Inconsistent High onboarding time High cost of change No isolation High overhead Lack of team autonomy Flakiness It’s painful Debugging and cycle times
  23. 23. THE IDEA
  24. 24. Build environment
  25. 25. Your computer or a CI agent Build container Build tools Libraries Runtimes Code directoryCode directory IDE / text editor Version control tool
  26. 26. Consistency
  27. 27. Lightweight
  28. 28. Quick onboarding time 30 minutes and 4 seconds from bare metal to running app
  29. 29. Quick setup time
  30. 30. Low cost of change
  31. 31. batect build and test environments as code tool
  32. 32. DEMO
  33. 33. Test environment
  34. 34. International transfers service Postgres database Exchange rate service
  35. 35. Unit Integration Journey
  36. 36. International transfers service Postgres database Exchange rate service
  37. 37. International transfers service Postgres database Exchange rate service Test driver
  38. 38. Reduced flakiness
  39. 39. Local environment
  40. 40. Integration and journey testing on CI
  41. 41. International transfers service Postgres database Exchange rate service Test driver
  42. 42. International transfers service Postgres database Exchange rate service Test driver
  43. 43. International transfers service Postgres database Exchange rate service Test driver
  44. 44. International transfers service Postgres database Exchange rate service Test driver
  45. 45. International transfers service Postgres database Exchange rate service Test driver
  46. 46. International transfers service Postgres database Exchange rate service Test driver
  47. 47. International transfers service Postgres database Exchange rate service Test driver
  48. 48. batect build and test environments as code tool
  49. 49. “What about Docker Compose?”
  50. 50. DEMO
  51. 51. (with apologies to the Beatles)
  52. 52. Path to production
  53. 53. BUT…
  54. 54. IDE integration
  55. 55. Inconsistent High onboarding time High cost of change No isolation High overhead Lack of team autonomy Flakiness It’s painful Debugging and cycle times
  56. 56. Consistent Quick onboarding time Low cost of change Isolated Low overhead Enables team autonomy Reduces flakiness Quick and easy Easy debugging and short cycle times Inconsistent High onboarding time High cost of change No isolation High overhead Lack of team autonomy Flakiness It’s painful Debugging and cycle times
  57. 57. SO NOW WHAT?
  58. 58. Start small, work incrementally
  59. 59. International transfers service Postgres database Exchange rate service
  60. 60. International transfers service Postgres database Exchange rate service Test driver
  61. 61. github.com/charleskorn/batect github.com/charleskorn/batect-sample-java github.com/charleskorn/batect-sample-ruby THANK YOU

×