400,000 ephemeral containers: testing entire ecosystems with Docker

Опубликовано: 17 Октябрь 2024
на канале: linux conf au 2017 - Hobart, Australia
714
7

Daniel Axtens
http://linux.conf.au/schedule/present...
The value of a high-level language isn't just in the language itself, but rather in the ecosystem surrounding it. Python is hugely enriched by PyPI, Ruby by gems, and Node.js by npm. These ecosystems have hundreds of thousands of packages, evolve rapidly, and vary wildly in quality.

What if you want to test how all the packages work in a given situation? This is the question we set out to answer in this talk.

Previously, testing each and every one of the 458,100+ packages came with an enormous infrastructure cost - for each package you need a VM with a full OS, and the associated memory, CPU and disk requirements. This makes exhaustive testing infeasible for most teams. However, we found that by using Docker, we could test the entire Python, Ruby or Node.js ecosystem over a weekend with a single VM.

In this talk, we look at:

how we leveraged Docker to rapidly test the entire Python, Ruby and Node.js package sets on OpenPOWER,
how the characteristics of containers vs VMs made an otherwise infeasible task both feasible and simple,
how we evolved this into a continuous-integration process,
other interesting applications of testing at this scale,
what we found, and some of the interesting quirks and bugs we encountered and lessons we learned.