Multi tier Docker apps with Panamax

12Aug14

Just as I did with Fig I had a go at composing my three tier demo app with CenturyLink’s Panamax as I was writing my InfoQ piece on the launch.

You can see the resulting todomvc.pmx template file in GitHub (and see that it’s very similar to my fig.yml), but it’s a visual tool, so let’s look at some screenshots, starting with an overview of the service:

Panamax ToDoMVC

Zooming in, the template is made up out of three underlying services:

PanamaxToDoMVCServices

I started out with the mysql service, which is why it has the _latest suffix dangling there. I could edit it out, but didn’t bother. Clicking on that service the only things that matter are the EXPOSEd port and the volume mapping:

PanamaxToDoMVC_DB

It will be interesting to see what Panamax adds under the hood for volumes, as right now the mount point needs to be created manually, and such things don’t play well in multi server deployments.

The Sinatra app server needs a link back to the database in addition to exposing its own port:

PanamaxToDoMVC_App

Finally the container with Nginx for SSL termination links back to the app server and binds to port 443:

PanamaxToDoMVC_SSL

 

Because the whole thing is running inside VirtualBox it’s necessary to do another port forward. The instructions for that are included in the template and can be brought up on screen:

PanamaxToDoMVC_Docs

Having set the application up I then entered a GitHub token in order to allow it to be saved as a template.

Give it a try for yourself. Add cpswan/panatest to your sources:

PanamaxSources

Then search for todomvc:

PanamaxToDoSearch