Tutum deploy
Fig like deployment utility that uses Tutum.co API to manage multiple nodes and clusters.
Getting started
$ docker install kelonye/tutum-deploy
Then create a shortcut command as:
$ alias td=$(docker run kelonye/tutum-deploy -v .:/opt/app)
Or install using npm
$ npm install -g tutum-deploy
Create a tutum.yaml
conf in the root of your project.
---
clusters:
- name: us
region: nyc1 # digital ocean
type: 512mb
nodes: 4
- name: eu
region: ams2 # digital ocean
type: 512mb
nodes: 4
services:
- name: db
image: mongodb
containers: 1
- name: web
image: user/web
build: lib/web # Build user/web image on this path. Path should contain a Dockerfile.
containers: 1
ports:
- guest: 80
host: 80
name: http
protocol: tcp
published: true
env:
- PORT: 80
require: # Links.
- db
- Sign up at Tutum.co
- Log into Tutum
- Link a platform e.g. Digital Ocean
- Click on the menu on the upper right corner of the screen
- Select Account info
- Select Api Key
- Set the following env vars:
- TUTUM_USER
- TUTUM_APIKEY
- Deploy!
$ td build
$ td push
$ td up
Variables
The configuration file can contain variables:
- name: "{{APP_NAME}}"
image: dockerfile/mongodb
containers: 1
Values are then passed by prefixing variable names with TUTUM_
:
$ TUTUM_APP_NAME=dev td up
Service status
Use td ps
to get the status of services.
$ td ps
tutum:deploy getting cluster app +0ms
tutum:deploy cluster app state: Deployed +2s
tutum:deploy getting service mongodb +1ms
tutum:deploy cluster mongodb state: Running +2s
tutum:deploy getting service user/web +1ms
tutum:deploy cluster user/web state: Running +2s
Custom nodes
To manage custom nodes, add a nodes
section as in the example below:
nodes:
- uuid: 12345
clusters:
- name: us
region: nyc1 # digital ocean
type: 512mb
nodes: 4
- name: eu
region: ams2 # digital ocean
type: 512mb
nodes: 4
services:
...
Examples
Test
$ make test
Todos
- Tests
- Removing a service entry should also delete it in Tutum/Host
Licence
MIT