PanaMax - Docker Management for Humans

As cool as Docker is there is quite a lot of stuff you need to start caring about, service discovery, orchestration, routing and so on, and there is a long line of technologies which help you achieve that, here is quite a long list just as an example:

And there is more (believe me I’ve done my research …) If you need to spin up a single container you do not need all this stuff, but when you need to launch more than one container in order to bring your system up, and maybe span over more than 1 host you need a few of the tools listed above in order to achieve that. Looking at this list and knowing it is potentially mych longer … think how many tools you need to master in order to launch a POC … before you can start developing your system and develop a continuous delivery / deployment scheme for it !

So how can you simplify the development life-cycle of a containerized solution / system ?

Panamax by centurylinklabs to the rescue. Panamax is (and I quote) a containerized app creator with an open-source app marketplace hosted in GitHub, I think the last bit is most important one the fact you can find on github a template of an existing “containarized” systems is awesome – very similar to the way you can share Docker files but here instead you get a fig file which describes your environment and “tells” your containers what to do, who to connect to etc. etc.

About Panamax

PanaMax is naturally based on CoreOs and has made some educated choices for example fleet and etcd which are shipped part of CoreOs, according to Lucas Carlson of centurylinklabs PanaMax will support other OS’s and other orchestration frameworks in the future, as you may understand this was just released a few days ago (August 12 to be precise).

Using Panamax

After installing PanaMax and you have panamax up and running on your local machine you can search for existing systems as an example lets take the piwik exmaple by searching in our local panamax ui via http://localhost:8888 (the default)

Pressing the “run template” button will result in panamax parsing the pmx(fig) yaml file:

- category: Web Tier
  name: Piwik
  source: cbeer/piwik
  description: Piwik web application
  type: Default
  - host_port: 80
    container_port: 80
  - service: DB
    alias: db
- name: DB
  source: centurylink/mysql:5.5
  description: MySQL
    - variable: MYSQL_ROOT_PASSWORD
      value: pass@word01
  - host_port: 3306
    container_port: 3306
  category: DB Tier
  type: mysql

Then panamax will download the docker images from the section above in this example: cbeer/piwik & centurylink/mysql:5.5

Once the docker images are downloaded and spawn up you can examine the CoreOS Journal log and see exactly what occurred:

Aug 16 15:55:53 docker 140816 12:55:53 [Note] Server hostname (bind-address): ''; port: 3306
Aug 16 15:55:53 docker 140816 12:55:53 [Note] - '' resolves to '';
Aug 16 15:55:53 docker 140816 12:55:53 [Note] Server socket created on IP: ''.
Aug 16 15:55:53 docker 140816 12:55:53 [Note] Event Scheduler: Loaded 0 events
Aug 16 15:55:53 docker 140816 12:55:53 [Note] /usr/sbin/mysqld: ready for connections.
Aug 16 15:55:53 docker Version: '5.5.38-0ubuntu0.14.04.1-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
Aug 16 16:00:48 systemd Started Piwik web application.
Aug 16 16:00:49 docker Error response from daemon: No such container: Piwik
Aug 16 16:00:49 docker 2014/08/16 13:00:48 Error: failed to remove one or more containers
Aug 16 16:00:50 docker /usr/lib/python2.7/dist-packages/supervisor/ UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
Aug 16 16:00:50 docker 'Supervisord is running as root and it is searching '
Aug 16 16:00:50 docker 2014-08-16 13:00:50,924 CRIT Supervisor running as root (no user in config file)
Aug 16 16:00:50 docker 2014-08-16 13:00:50,924 WARN Included extra file "/etc/supervisor/conf.d/supervisord-apache2.conf" during parsing
Aug 16 16:00:51 docker 2014-08-16 13:00:51,076 INFO RPC interface 'supervisor' initialized
Aug 16 16:00:51 docker 2014-08-16 13:00:51,076 CRIT Server 'unix_http_server' running without any HTTP authentication checking
Aug 16 16:00:51 docker 2014-08-16 13:00:51,076 INFO supervisord started with pid 1
Aug 16 16:00:52 docker 2014-08-16 13:00:52,098 INFO spawned: 'apache2' with pid 11
Aug 16 16:00:53 docker 2014-08-16 13:00:53,315 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

As you recall CoreOs ships with fleet so you can basically run any fleet command and see what containers (units) are running on your system:

core@panamax-vm ~ $ fleetctl list-units
UNIT          STATE       LOAD    ACTIVE      SUB     DESC            MACHINE
DB.service      launched loaded   active       running      MySQL           0890a9ee.../
Piwik.service       launched loaded   active       running      Piwik web application 0890a9ee.../
jenkins_latest.service   launched loaded   deactivating stop-sigterm   -            0890a9ee.../

Of course you can examine each image / service separately from the UI and see the container linking / exposed ports.

Same for the mysql image:
you can see the container exposed ports, and system variables which are used by piwik to connect.

The cool thing about panamax is “forking” a system by performing some changes and “save as” like so:

The first time you do this you will need to create a github token – make sure you have the following settings:

Now I should choose my github repository and publish it …

And a few seconds later i have my own clone out there …

To summarize

Panamax takes away a lot of headaches, it is quite user friendly and easy to share with your colleagues, The power of it being linked to Github is awesome (but may limit the usage for non github users). As you could see in this post the steps taken to create a template / clone a template, perform the application wiring (with fleet) was a few clicks – there is of course an API for panamax but I assume I will be able to discuss that only after I experiment a bit more with it. Two thumbs up for centurylinklabs putting together this great tool – definitely a tool to keep an eye on.

References used for this article: