Docker is an open-source system for automating deployment, scaling, and management of containerized applications. Having captured the hearts and minds of developers with their simple API, they have been at the center of the container revolution and have grown their suite of tools into an enterprise-grade cluster management solution. Tools such as Docker Swarm and the Universal Control Plane allow the automated deployment of containers at scale. However, as enterprises adopt containers, they need a Docker persistent storage solution that provides HA, backups, snapshots, encryption, monitoring integration, and more. If you are thinking about running Docker stateful containers like MySQL, Cassandra, Redis, Postgres or any other stateful services, this guide to Docker storage is for you.
Problems with Docker persistent storage today:
Getting started running stateful services on Docker is easy. Portworx can be installed directly via the Docker command line and will run as a Swarm global service. This method runs a Portworx container on each host and will create a cluster-wide storage fabric from your underlying block devices.
DockerHub has official images for some of the most popular stateful services including MySQL, Cassandra, Redis and Postgres. You can easily run a stateful container from these images which will automatically provision storage using the underlying Portworx volume driver. You can also create a Distributed Application Bundle using Docker Compose that will deploy a Swarm service. Alongside Portworx, these images make it easy to deploy and manage stateful apps on Docker, eliminating nearly all of the complexity traditionally associated with running stateful services on these clusters.
Docker has given developers a powerful tool to bundle and distribute their code, which has many advantages for stateless applications. Many enterprises have discovered the situation changes when you introduce state into the equation. Managing state inside Docker containers is difficult, primarily because containers are designed to be lightweight, nimble resources that will move around the cluster, whereas data has a gravity that makes it harder to move. There are other problems such as 1) how to ensure data integrity and isolation when you are running multiple containers on the same host, 2) how to take snapshots of your production data for offsite container backups and CI, and 3) how to encrypt sensitive data both in flight and at rest. Portworx solves these problems and more by creating a cluster-wide data layer from your underlying storage devices while also providing off-site backups, encryption of data in flight and at rest, and full automation of data management.
Portworx’s deep integration into Docker gives you the benefits of Portworx container data services, directly through your Docker Swarm scheduler. You can create Swarm services that consume Portworx volumes via the official Docker volume plugin. This brings the power and management capability of Portworx to your Docker persistent storage layer, meaning you can handle difficult tasks such as increasing your storage pool without container downtime, and avoid problems like stuck EBS drives.