Continuous Delivery for Containers
How Wit.ai Uses CircleCI and Docker to Deploy Their Containerized Services
Why CircleCI?
Wit.ai’s current development and deployment workflow looks like this:
- Each time a developer pushes code to GitHub, CircleCI checks out the project and builds the Docker image.
- CircleCI also pulls down images for all the other services that are necessary to run integration tests on the service being developed from their Docker registry.
- CircleCI then runs all of these containers inside of a CircleCI build container, and runs the test suite.
- After the tests pass, CircleCI pushes the images to their Docker registry, from which images are deployed to their CoreOS fleet running on AWS EC2.
With this setup, Wit.ai’s deployment process is straightforward, automated, and safe.
The Challenge Prior to CircleCI
Wit.ai’s platform is built with services written in Clojure, including user-facing web apps and service endpoints, as well as a Riak-backed Datomic database. As Wit.ai was scaling their platform, they ran in to a few different issues. First, different services were built, tested, and deployed in different ways. The development team was moving fast and wanted to deploy multiple times per day, but were slowed down by this operational complexity. Second, it was difficult to ensure that their production environment was always consistent with their development and test environments. Making sure that the proper binary artifacts, server OS, and configuration files were in place required additional tooling which further added to their issues around complexity.
The Solution
The first step the Wi.ai team took to solve these problems was to implement Docker. All of their services, from their web app to speech recognition APIs to Datomic transactors, were containerized with Docker in order to achieve development-production parity, minimize downtime, and simplify their deployment process.
Next, Wit.ai begain searching for a Continuous Integration and Delivery workflow that would allow any team member to easily build and deploy a Docker image. This would help them move quickly and deliver value to their customers as soon as the code had been written and tested. Wit.ai ultimately settled on CircleCI because it gave them the ability to run Docker natively from within their build containers, which would let them easily build and deploy images from within their CI environment.
About Wit
Wit.ai, which was acquired by Facebook, makes advanced natural language processing tools for developers. As a service that others rely on for their applications to function, it’s vital for Wit.ai to ensure that every service deployed is rigorously tested, and that there are no unknown quantities in their delivery process.