ConsenSys/storm

Name: storm

Owner: ConsenSys

Description: Cluster deployment and cloud management tool with docker-machine

Created: 2016-01-12 06:19:42.0

Updated: 2018-01-01 19:06:37.0

Pushed: 2016-02-29 16:18:05.0

Homepage: null

Size: 226

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

docker-storm

Build Status PyPI [](https://imagelayers.io/?images=caktux/storm:latest,caktux/storm:alpine 'Get your own badge on imagelayers.io')

Multi-cloud load-balanced deployments.

asciicast

Installation
With pip
install docker-storm
With Docker Using images from Docker Hub

Alpine-based (~50 MB download / ~170 MB virtual size):

er pull caktux/storm:alpine

Ubuntu-based (~155 MB download / ~400 MB virtual size):

er pull caktux/storm
Building with docker-compose
clone https://github.com/ConsenSys/storm.git
torm
er-compose build
Bare-metal install
 apt-get install build-essential pkg-config python python-dev
clone https://github.com/ConsenSys/storm.git
torm
ualenv venv  # optional
ce venv/bin/activate  # optional
install .

You will also need the latest releases of docker-machine, docker-compose and docker.

Configuration
Credentials

Create and add your credentials in the ~/.storm folder with proper permissions.

AWS

Standard credentials in ~/.storm/aws/credentials

dentials]
access_key_id = <ACCESS_KEY_ID>
secret_access_key = <SECRET_ACCESS_KEY>
Azure

Add your subscription ID in ~/.storm/azure/subscription-id

r -p ~/.storm/azure
 "YOUR_SUBSCRIPTION_ID" > ~/.storm/azure/subscription-id

And your certificate as ~/.storm/azure/certificate.pem

DigitalOcean

Add your token in ~/.storm/digitalocean/token

r -p ~/.storm/digitalocean
 "YOUR_TOKEN" > ~/.storm/digitalocean/token
Networking

docker-machine opens the ports it needs to function, but more ports are needed for the overlay networks and the services you will deploy.

docker-storm will also open the following ports for overlay networks and Consul to function properly:

| Protocol | Port | Description | | ——– | —————————— | —————— | | udp | 4789 | Data plane (VXLAN) | | tcp/udp | 7946 | Control plane | | tcp | 8300, 8301+udp, 8302+udp, 8500 | Consul |

Until automated port opening is implemented for deployed services, a few other default ports get opened (80, 443, 8545) and you'll have to open custom services' ports manually.

Certificate for HTTPS

Add your SSL/TLS certificate for HAProxy in ~/.storm/certificate.pem

Running with Docker
Using docker-compose
er-compose run storm
Using docker
er build -t storm .
er run -v ~/.storm:/root/.storm -it storm
Usage
cker-storm --help
e: docker-storm [-h] [-v] [--debug DEBUG]
                [{launch,deploy,repair,env,ls,ps,up,scale,stop,rm,teardown}]
                [parameters [parameters ...]]

tional arguments:
aunch,deploy,repair,env,ls,ps,up,scale,stop,rm,teardown}
                    Storm commands for deployments and maintenance
rameters            Optional parameters per command

onal arguments:
, --help            show this help message and exit
, --version         show program's version number and exit
debug DEBUG         Debug (default: False)
Deployments

Example storm.yml:

name: storm.consensys.net
_balancers: 2

overy:
ure:
scale: 1
size: Small
s:
scale: 1
size: t2.micro
vpc: vpc-c2cb97a7
gitalocean:
scale: 1
size: 512mb

s:
ure:
-
  scale: 1
  size: Small
  location: West Europe
-
  scale: 1
  size: Small
  location: East US
s:
scale: 3
size: t2.small
vpc: vpc-c2cb97a7
gitalocean:
scale: 3
size: 1gb

oy:
llo:
services:
  app:
    scale: 5
th:
services:
  geth:
    scale: 5
Repairing cluster

Not implemented yet

This command will compare currently running instances with your storm.yml definitions, launch missing instances and containers, and repair the state of your cluster.

er-storm repair
Quick instance launch
er-storm launch aws quick-instance-name
Environment shortcuts

Just like with docker-machine, you can set your Docker environment variables but much more easily, using the index of launched instances instead of their full names.

For single instances:

 $(docker-storm env 0)

With swarm flag:

 $(docker-storm env swarm)

For discovery instances:

 $(docker-storm env discovery 0)
ps shortcut for Swarm
er-storm ps [-- -a]
ls shortcut

This is really just an alias for docker-machine ls --filter label=com.storm.managed=true which filters for machines managed by docker-storm.

er-storm ls
Cleanup Stopping machines
er-storm stop <machine> [<machines>, ...]
Removing instances
er-storm rm [instance]
Removing all instances

Add all to also remove discovery instances.

er-storm teardown [all]

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.