Skip to content

Instantly share code, notes, and snippets.

@tanepiper
Created February 4, 2012 01:39
Show Gist options
  • Select an option

  • Save tanepiper/1734337 to your computer and use it in GitHub Desktop.

Select an option

Save tanepiper/1734337 to your computer and use it in GitHub Desktop.
hypothetical stagecoach cluster management commands

commands

remote

Save hub locations and passwords by name. Inspired by git remote.

$ stagecoach remote add mysite --hub=localhost:6000 --password=beepboop

hub

Set up a git http server to listen on and the upnode control interface.

$ stagecoach hub 6000

drone

Create a

$ stagecoach drone mysite

router

Create a bouncy http proxy to route requests through.

$ stagecoach router mysite 80

push

Contacts the hub to compute the git resource and does a git push:

$ stagecoach push mysite

deploy

Deploy a particular version:

$ stagecoach deploy auth@0.1.5

Deploy the latest version:

$ stagecoach deploy web

Deploy a version based on a git hash:

$ stagecoach deploy auth@35819ef7d025999cae31566b449212b2cadaf3fd

Deploy more than 1 instance:

$ stagecoach deploy web@0.2.2 --instances=2

Deploy to specific hosts:

$ stagecoach deploy web@0.2.2 --host=10.0.0.4 --host=10.0.0.6

list

List the running processes by name@version with the commit hash and IP addresses that the services are deployed to.

$ stagecoach list mysite
web@0.2.0    40548daf17f7d25ec0f1925b97d24bc05043e4ed
    10.0.0.4 10.0.0.6
 
web@0.2.2    35819ef7d025999cae31566b449212b2cadaf3fd
    10.0.0.4

auth@0.1.5    8046c32c018dbf8ae4b9a67fc3e9047132d4f12d
    10.0.0.6

auth@0.2.0    35819ef7d025999cae31566b449212b2cadaf3fd
    10.0.0.4

logger@0.0.2  8046c32c018dbf8ae4b9a67fc3e9047132d4f12d
    10.0.0.6

servers

List the running services grouped by machine.

$ stagecoach servers mysite
10.0.0.4
    web@0.2.0     40548daf17f7d25ec0f1925b97d24bc05043e4ed
    web@0.2.2     35819ef7d025999cae31566b449212b2cadaf3fd
    auth@0.2.0    35819ef7d025999cae31566b449212b2cadaf3fd

10.0.0.6
    web@0.2.0     40548daf17f7d25ec0f1925b97d24bc05043e4ed
    auth@0.1.5    8046c32c018dbf8ae4b9a67fc3e9047132d4f12d
    logger@0.0.2  8046c32c018dbf8ae4b9a67fc3e9047132d4f12d

deps

Show the dependency graph of the cluster.

$ stagecoach deps mysite
web@0.2.0
├─┬ auth@0.1.5
│ └── logger@0.0.2
└── logger@0.0.2

web@0.2.2
├─┬ auth@0.2.0
│ └── logger@0.0.2
└── logger@0.0.2

auth@0.1.5
└── logger@0.0.2

auth@0.2.0
└── logger@0.0.2

logger@0.0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment