My App, Three Ways With Deis Workflow
The first stable release of Deis Workflow is hot off the press as of June 9th, sporting the prestigious "suitable for production deployments" statement. So, I figured it was high time that I kicked the tires and took the platform for a spin.
The mission statement for the platform elegantly boils down a complex set of problems into this simple one liner. The Deis Workflow cause is a noble one!
"Deis Workflow is a lightweight application platform that deploys and scales Twelve-Factor apps as containers across a Kubernetes cluster."
Why Does Kubernetes Need a PaaS?
Having used Kubernetes in a production environment for the last year, I am all too familiar with the challenges getting developers on-boarded and up-to-speed. So, I am approaching Kubernetes from an app development perspective rather than a platform point of view.
The fundamental problem we faced was that developers shouldn't be writing Kubernetes manifests. Asking them to do this requires them to have a Kubernetes experience. And even with that, resulted in a myriad of different approaches to app deployment.
This also broke the promised simplicity of the Docker developer workflow, which is central to working with container platforms.
We needed a pattern that met 99% of all the app needs while encouraging industry best practices.
This is exactly what Deis Workflow excels at.
One of the things I like about Deis Workflow is that it utilizes other tools in the Deis portfolio like Helm, the package manager they wrote for Kubernetes.
The platform also natively runs on Kubernetes. Being a big fan of the "eat your own dog food" technique, I am happy to see they took this route.
Now. Back to My App!
My objectives were simple:
See how far I could take my app using the platform in 15 minutes.
Well, one of the ways I approach open source is to see if I can get a minimum install going and then test a very basic use-case. I have found the 15 minute mark to be about the extent of my attention span, so this is something of a benchmark for me.
I was pleasantly surprised with how simple the quick start actually was.
Because a Kubernetes cluster is listed as a prerequisite for installing Workflow, I wouldn't typically include it in the total time taken while testing. But given Deis provides documentation on how to spin one up on GKE, I took the opportunity to get my hands dirty spinning up a new cluster.
Deploying: Three Ways
The only decision you have to make is how you want Deis Workflow to build your application.
Your choices are simple:
- Buildpacks: made popular by Heroku. All you do is provide some simple metadata in your source repo and Deis will happy build and deploy.
- Dockerfile: dump a Dockerfile into the root of your source repo and Deis will build and deploy the docker container artifact.
- Docker images: pull directly from a Docker image published on Docker hub.
Why not try them all.
Buildpacks (5 minutes)
Having never used Buildpacks, it was less than 5 minutes to have this up and running following the Heroku docs. In summary, we indicate the app is written in Go with the existence of the
Godeps directory in the source repo.
Dockerfile (2 minutes)
This one was straight forward. Add a Dockerfile to your source repo, and hey presto, Deis Workflow builds and deploys! How easy is that?
Docker image (2 minutes)
By far the easiest approach. Just pull in a docker image from your favorite registry.
I was able to install and test out Deis Workflow in under 15 minutes.
Overall, I was impressed with how lightweight and easy Workflow is to use. It definitely takes the guesswork out of understanding Kubernetes manifests, and provides a quick and intuitive way to get on-boarded and up-to-speed with any application.
There are several big features I didn't look at. Workflow supports all common elements of a typical app lifecycle. To name a few:
- User access control
- Scaling apps
- Versioning and releases
- Log file management
I'm excited to see what the future holds for Deis Workflow. Two thumbs up!
This post originally appeared on Medium.