eyenx

eyenx

yet another geek

03 Oct 2014
tutum ftw

I’m using tutum.co now

Visit it now if you don’t know about this yet: tutum.co

tutum logo

docker.io

The whole Docker thing caught my eye very fast. I started messing around with dockerfiles, building my custom images, running some containers, just for fun.

After some time I heard DigitalOcean was making the CoreOS image available for their droplets.

I also started messing around with CoreOS. It is very simple to set up, given the good tutorial available on DigitalOcean.

But it wasn’t something I could migrate to in minutes. I needed more time to make the service stable.

Tutum comes up with a new service

Last week I received an email from Tutum announcing their new service available at http://dashboard.tutum.co. Their objective was to stop doing actual hosting and concentrate on the management of docker containers.

They also announced their native support with DigitalOcean. I was looking forward to try it out.

node clusters and service clusters

The idea of Tutum is to serve as a managing application for deployment of entire container clusters. They also give you a private docker repository for free, which is nice.

After connecting my Tutum account with the DigitalOcean one, I deployed my first node cluster.

node dashboard

The next step was to deploy a service.

dockerfile

I looked a long time at some already built jekyll dockerfiles, but none of them seemed to match my expectations.

For some days or weeks I was idling. So I decided to just use my own dockerfile for my blog. As starting image I tried using base/archlinux.

λ ~/dev/docker/eyenx.ch ls -1
Dockerfile
nginx.conf
start
λ ~/dev/docker/eyenx.ch cat start Dockerfile
su - http -c "git pull ; jekyll build" -s /bin/bash ; nginx
FROM base/archlinux
MAINTAINER eye@eyenx.ch

RUN pacman -Syyu --noconfirm
RUN pacman -S --noconfirm ruby nginx git python2 base-devel
RUN rm -rf /var/cache/pacman/pkg/*

RUN gem install --install-dir /usr/lib/ruby/gems/2.1.0 --no-user-install \
  jekyll \
  kramdown \
  therubyracer


RUN chown http.http -R /srv/http
RUN su - http -c "git clone http://github.com/eyenx/eyenx.ch . ; \
jekyll build" -s /bin/bash

COPY nginx.conf /etc/nginx/nginx.conf
COPY start /start
RUN chmod +x /start

CMD /start

EXPOSE 80


The nginx.conf shouldn’t be such a hassle for you.

build it! push it! deploy it!

After building the image, trying it out and pushing it to the private repository of tutum.co, I could finally deploy my first service.

service dashboard

To try some stuff out, I even deployed it loadbalanced. And it is really easy to accomplish.

  • deploy custom docker image, exposing dynamic ports on the node (leaving everything as it is)
  • launch new service
  • chose tutum/haproxy as image
  • expose port 80 on the node
  • full access API Role & Link to custom service
  • done

Also, this tutorial helped a lot.

I’m still on boring VPS for now

Probably you aren’t reading this content from a deployed container right now. I haven’t switched yet.

I’m still trying everything out and also waiting for Tutum to make some more steps. At the moment, the Tutum-deployed service is available at http://dev.eyenx.ch.