The Docker PaaS, Octohost

The Many Armed Docker PaaS

I've been delving into Docker the last few months. One of the many projects that have sprung up around Docker, is a PaaS, called Octohost.1

Like a few of the other similiar projects out there like Dokku, Octohost allows you to git push your code to it, and in a heroku-like fashion it bootstraps your site. Which I thought would be awesome to have a server in my DO account that would allow me to quickly spin up websites simply by create a git remote to my Octohost server, and pushing there. My thinking is that using this kind of model for experimenting and simply spinning up new ideas — all while running my apps in Docker, as God intended.

The Innards of the Octopus

Built on Ubuntu 14.04LTS, It uses Jeff Lindsay's gitreceive for allowing you to push to an Octohost using git. Consul is used monitor the Docker containers and supply the environment data to those containers. And Nginx is used as a forwarding proxy in front of your Docker containers, servicing requests, and routing traffic to the apporpriate container.

Shaking the Octopus Awake

I used their chef cookbook, to setup a VM on DigitalOcean.

The setup wasn't too difficult, but I did run into some issues with the Digital Ocean Packer template.

Small aside, on Packer. I knew of Packer, but had never used it before. From the website it says, "Packer is a tool for creating identical machine images for multiple platforms from a single source configuration." The HashiCorp folks are awesome. So many great projects by them. Anyway, if you're not a veteran devops/sysadmin person having used a tool like this before, it's a very cool CLI that allows you to create VM images from one source file, no matter what cloud provider it may run on. So you can write your machine templates once, and deploy them to many different places. It does more things, but you get the drift.

The issue I had with the Packer template I believe is that it had 'NYC1' region set, which is at capacity for Digital Ocean, and you can't provision a droplet there if you wanted to, and also I think the sizeid wasn't the exact one I wanted. To find the sizeid, which is the variable that Digital Ocean uses in it's API to provision a certain size machine, I had to use Google Chrome Inspector on my 'Create Droplet' screen in my Digital Ocean conttrol panel to see what the value for size_id was for the smallest droplet. For the smallest (512MB / 1 CPU, 20GB SSD DISK, 1TB TRANSFER at $5/mo), by the way, it's 66, not 63, which is the next size up, and $10/mo. But hey, the Octohost guys perhaps recommend that level of machine to run an Octohost.

So I destroyed the droplet it created, after I realized all of this, looking at my Digital Ocean control panel. And then proceeded to finally find this 'Packer template' and modify it accordingly, to suit my needs. You're welcome, future readers whom are trying out Octohost on Digital Ocean, and run into this. Hopefully they accept my pull request to fix this.

CNAME and package.json are important files to know about when you're using Octohost for Node projects. I believe I ran into an issue where I had a domain name, but it wasn't obvious to me how I get my TLD pointed to my Octohost app. You place the CNAME in there just like Heroku or Github would expect, and put in the TLDs that the app should respond to, and Octohost sets it up correctly.

The package.json file I had to make sure to setup my "main": "index.js" key value correctly. I don't think it's documented anywhere, but I got the gist of it after looking at serveral Node projects for Octohost, and seeing what mine was missing, after my Node project wasn't starting up correctly when I pushed it to my Octohost.

When One of the Tenacles Gives You the Finger

The only remaining issue I have is that, when I run octo status on the commandline, (which I'm sure is Consul behind the scenes), even though my projects are up, Octohost reports differently: DOWN  
secret-project: DOWN  
sadkevin: DOWN  

As this makes me a (sadkevin), the sites are still up. Even when I make more pushes, the status of them don't change. Haven't looked into how to correct this at the moment.

Eyeballing Other PaaSes That Are Not Our Eight-Legged Friend

I looked at other PaaSes in my quest to have a quick way to spin up small projects on Docker.

For the life of me, I couldn't get Dokku running on my setup, not sure what I was doing wrong. Deis seems pretty good, but heavy setup, for what I was looking for (quick and easy). Flynn fell into the camp of Deis, where it's architected to be distributed, and therefore is not trivial to setup. Dawn looked a little young to mess around with. Tsuru looked more complicated to setup like Deis/Flynn. And Panamax seems really awesome, but when starting up templates (sets of containers) from the Registry, some never came up, or slowed down my machine a bit, but it could just be me.

In the future, as the other Docker PaaS landscape shakes out, I'm sure I'll be re-evaluating some or all of these.

Foot Notes:
1. See also Docker is Driving a New Breed of PaaS)