Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fleet local cluster example

  • Loading branch information...
commit 6bbe77042b3501d6ad2c044aeb55288db65123e9 1 parent 4547fca
@substack authored
Showing with 23 additions and 1 deletion.
  1. +1 −1  README.markdown
  2. +22 −0 example/local-cluster/start.sh
View
2  README.markdown
@@ -154,7 +154,7 @@ Leading `'pid#'` strings are ignored on ids so you can more easily copy the pids
from `fleet ps` output.
```
-fleet stop 1e99f4 d7048a
+$ fleet stop 1e99f4 d7048a
[3dfe17b8] stopped 1e99f4 d7048a
```
View
22 example/local-cluster/start.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+secret='beepboop'
+tmpdir=/tmp/$(node -e '(Math.random()*Math.pow(2,32)).toString(16)')
+
+echo $tmpdir
+mkdir -p $tmpdir/hub
+mkdir -p $tmpdir/drone0
+mkdir -p $tmpdir/drone1
+
+cd $tmpdir/hub
+fleet hub --secret="$secret" --port=7000 >/dev/null &
+
+echo hub listening on :7000
+
+cd $tmpdir/drone0
+fleet drone --secret="$secret" --hub=localhost:7000 >/dev/null &
+
+cd $tmpdir/drone1
+fleet drone --secret="$secret" --hub=localhost:7000 >/dev/null &
+
+fleet monitor --secret="$secret" --hub=localhost:7000
Please sign in to comment.
Something went wrong with that request. Please try again.