Tutum

The Story So Far

Image

Your application and all it's dependencies packaged together.

gazelle/wit:latest

OS: Debian

Language: Ruby

App: WIT

Gems + Packages

Describing the Environment

Service

tst-wit-web:
  image: 'tutum.co/gazelle/wit:latest'
  deployment_strategy: high_availability
  environment:
    - FORCE_SSL=1
    - RACK_ENV=staging
    - 'VIRTUAL_HOST=https://wit-tst.cns.gazelle.com,http://wit-tst.cns.gazelle.com'
  expose:
    - '8080'
  tags:
    - open
    - tst

Stack

tst-wit-lb:
  image: 'tutum/haproxy:latest'
  deployment_strategy: high_availability
  environment:
    - BACKEND_PORT=8080
    - 'DEFAULT_SSL_CERT=-----BEGIN PRIVATE KEY----------END CERTIFICATE-----'
    - 'OPTION=http-server-close, redispatch, httplog, dontlognull, forwardfor'
    - 'SSL_BIND_CIPHERS=ECDHE-RSA-AES128-GCM-SHA256'
    - 'STATS_AUTH=admin:password'
  links:
    - tst-wit-web
  ports:
    - '80:80'
    - '443:443'
    - '1936:1936'
  restart: always
  roles:
    - global
  tags:
    - open
    - tst
tst-wit-web:
  image: 'tutum.co/gazelle/wit:latest'
  deployment_strategy: high_availability
  environment:
    - FORCE_SSL=1
    - RACK_ENV=staging
    - 'VIRTUAL_HOST=https://wit-tst.cns.gazelle.com,http://wit-tst.cns.gazelle.com'
  expose:
    - '8080'
  tags:
    - open
    - tst

Running the Environment

Node

172.31.255.255

An AWS instance that hosts containers

Docker

Daemon

tst-wit-lb

tst-wit-web

Node Cluster

A collection of nodes with the same attributes:

  • Tags
  • VPC
  • Subnet
  • Security

VPC: tutum-open-vpc

Tags: tst, open, t2large

Subnet: tutum-open-subnet

Security group: tst-tutum-vpc

172.31.255.255

172.31.255.255

172.31.255.255

172.31.255.255

172.31.255.255

172.31.255.255

Networking

Ports

172.31.255.255

tst-wit-web

serves

8080

app

container

expose

8080

as

8080

publishes

8080

Publishing Ports

172.31.255.255

A node can only publish port 8080 for one app

tst-sort-web

tst-wit-web

8080

8080

Overlay Network

172.31.255.255

A software network that treats containers like nodes

tst-wit-web

tst-multi-lb

link

8080

expose

8080

publish

8080

link

8080

tst-sort-web

Demo

CLI

> brew install tutum

> tutum login
user: gazelle
password: **********

# Tails combined log of all instances of this service
> tutum service logs -f tst-wit-web

# Connects to the running instance
> tutum container exec tst-wit-web-1 bash

# After an instance is terminated, it sticks around for a little bit, so names can clash.
# Use this to find the ID of the container.
> tutum container ps | grep tst-wit-web

> tutum container exec af2342 bash



问题?

Tutum

By blatyo

Tutum

  • 780