Tutum deploy
Fig like deployment utility that uses Tutum.co API to manage node clusters.
Getting started
$ npm install -g tutum-deploy
Create a tutum.yaml
conf in the root of your project.
--- cluster: name: app region: ams2 # digital ocean type: 512mb nodes: 1 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
Example
See tweed.
Test
$ make test
Todos
- Tests
- Removing a service entry should also delete it in Tutum/Host
Licence
MIT