How to run Panamax on Digital Ocean

September 8, 2014

Panamax offers a simple to use UI to manage Docker systems by leveraging community written templates. This allows you to quickly setup a server with eg. Gitlab, or as we’ll see at the end of this blogpost, Stellard.

Panamax is built on top of CoreOS, the minimal OS for Massive Server Deployments, for which DigitalOcean launched support just 5 days ago. If you don’t have a Digital Ocean account, you can start one using this link to get a $10 bonus credit.

Generate a discovery.etcd.io token

Go to https://discovery.etcd.io/new and write down the token. This is the unique token your CoreOS cluster will use to discover other nodes.

Start a new droplet

Use Digital Ocean’s online interface to start a CoreOS server in a region that supports “User Data” (NYC3, SFO1, SGP1 or LON1 at the time of writing). Enter the following cloud config as User Data (replace the <token> with your unique discovery token from the previous step).

#cloud-config

coreos:
  etcd:
    # generate a new token for each unique cluster from https://discovery.etcd.io/new
    discovery: https://discovery.etcd.io/<token>
    # multi-region deployments, multi-cloud deployments, and droplets without
    # private networking need to use $public_ipv4
    addr: $private_ipv4:4001
    peer-addr: $private_ipv4:7001
  units:
    - name: etcd.service
      command: start
    - name: fleet.service
      command: start

I had good results running Stellard on Panamax with a 2GB Droplet.

Install panamax

  1. ssh into your droplet as user core:
    ssh core@<your-droplet-public-ip>
  2. download the panamax installer:
    curl -O http://download.panamax.io/installer/pmx-installer-latest.zip
  3. run the installer as root:
    sudo ./coreos install --stable

When that finishes you can point your browser to <your-droplet-public-ip>:3000 and explore the panamax UI.

Bonus points: Stellard

To test the panamax installation, we can install and run stellard on your new panamax instance. Go to the panamax UI at <your-droplet-public-ip>:3000, search for ‘stellard’ and click ‘Run Template’:

Panamax Stellard

You can now query stellard with curl:

curl -X POST http://<your-droplet-public-ip>:9002 -d '{ "method" : "ping" }'

Check the full stellard api for more fun stuff you can do.

Discussion, links, and tweets

I work at Venture Spirit. Follow me on Twitter; you'll enjoy my tweets. I take care to carefully craft each one. Or at least aim to make you giggle. Or offended. One of those two— I haven't decided which yet.