I’ve been playing with Docker for a bit of time now as my github repository can testify. I use it at work on my development machine, we use it for our Continous Integration, to spawn demonstration machines and so on…
Recently I’ve been playing a bit with Sailabove, a service by RunAbove (which seems to belong to OVH), which is still in a beta stage but really promising. The idea behind this service is to provide a way to deploy your Docker containers directly in the RunAbove cloud.
Using Sailabove is really simple as it is stated on the homepage you can find on the homepage of the project:
- Login into their private docker registry using
docker login sailabove.io
Tag & Push whatever image you have on your host, for instance a redis one
$ docker tag redis sailabove.io/YourSuperUsername/redis $ docker push sailabove.io/YourSuperUsername/redis
Install their client using
pip install sailand then launch your docker container:
$ sail services add YourSuperUsername/redis redis
And know what? That’s all! You can directly go test it on redis.YourSuperUsername.app.sailabove.io. It is that simple. The sail utility basically implements most of what you can do with the
docker command, so for instance to list all your running services, all you have to do is to issue a
sail services ps and you’ll get a nice answer which looks like the one that docker would provide you.
Let the fun begin
That’s not all. Yes it is cool to be able to deploy docker containers this way, but when you need something more complex, what will you do? Spawn them manually one after another?
No! Sailabove can cover you here too! You know what? They support docker-compose!
Let me show you with this simple example: Gitlab on docker. To deploy it you need 3 containers:
- Gitlab frontend
- a redis container
- a postgresql container
To do so, all you have to need is to proceed this way:
add all the necessaries images to your Sailabove repository either by uploading them or by referencing images from the Docker hub this way:
## Adding redis sail repositories add external YourSuperUsername/redis --source https://registry.hub.docker.com/_/redis/ ## Adding postgresql sail repositories add external YourSuperUsername/postgresql --source https://registry.hub.docker.com/u/sameersbn/postgresql/ ## Adding gitlab sail repositories add external YourSuperUsername/gitlab --source https://registry.hub.docker.com/u/sameersbn/gitlab/
docker-compose.ymlfile in your current directory:
postgresql: image: YourSuperUsername/postgresql:9.4 environment: - DB_USER=gitlab - DB_PASS=secretpassword - DB_NAME=gitlabhq_production gitlab: image: YourSuperUsername/gitlab:7.8.2 links: - redis:redisio - postgresql:postgresql ports: - "80:80" - "22:22" redis: image: YourSuperUsername/redis:latest
unleash the beast with
sail compose up YourSuperUsernameand you’ll see everything building right here in front of your twinkling eyes.
once everything is done, go to gitlab.YourSuperUsername.app.sailabove.io
Isn’t that SUPER COOL?!