Today we are open sourcing m8s (Pronounced just like the thoroughly Australian "Mates"), our tool for building temporary environments as part of our pull request build process.
Why did we build this?
PreviousNext has a long history with running ephemeral environments as part of our bespoke CI platform, so much so that every time we talk about it we get asked the question "is it open source?", which we have to respond with "sorry, it's a little too custom".
Well no more! Recently we go asked this exact same question from Transport for NSW who were looking for a flexible version of our internal CI. We decided to partner on this project and build an open sourced, Kubernetes-backed version that could work in any CI pipeline you desired.
How does it work?
The M8s CLI / API combo facilitates a workflow desirable by all.
- Developer sends a Pull Request
- Pipeline of your choice reacts and runs the m8s build, telling the API to build a new environment based on the checked out docker-compose.yml file
- Additional tasks can be run as separate steps with m8s step, giving the stepped breakdown display that we love to see in our pipelines.
While there are a handful projects on the market that perform similar operations, they are designed for managing a lot of use cases eg. management of long running environments. We aim for m8s to be a small utility to provide features designed for ephemeral environments:
- Annotations with where the environment came from eg. Build #2 of CircleCI
- Routing so you can get to Mailhog or Solr instances
- Caching between builds (Composer / Yarn)
- Inject environment variables set by variables in the pipeline
- Developer configurable HTTP Authentication
- Building a demo environment against a pull request
- Securing your data while still being able to run within a 3rd party pipeline product (eg. You own the cluster)
- Running a full functional test suite which mirrors your local docker-compose precisely
- A simple tool for learning core Kubernetes API
To help you get your m8s voyage under way, we have created documentation for how to:
- Spin up clusters with the M8s API running
- Run the M8s CLI within a Pipeline
- How to structure a project for running in M8s
Welcome to the crew!