From 8f1a38d916326e37bc830a5c56c5d42866c8c423 Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 20 Jun 2012 10:14:45 -0700 Subject: Generate static HTML blog content out of markdown --- .../multi-server-continuous-deployment-with-fleet.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'doc/blog/module') diff --git a/doc/blog/module/multi-server-continuous-deployment-with-fleet.md b/doc/blog/module/multi-server-continuous-deployment-with-fleet.md index 9a764be3c2..7d76ad894c 100644 --- a/doc/blog/module/multi-server-continuous-deployment-with-fleet.md +++ b/doc/blog/module/multi-server-continuous-deployment-with-fleet.md @@ -15,41 +15,41 @@ slug: multi-server-continuous-deployment-with-fleet

To start using fleet, just install the fleet command with npm:

-
$ npm install -g fleet 
+
npm install -g fleet 

Then on one of your servers, start a fleet hub. From a fresh directory, give it a passphrase and a port to listen on:

-
$ fleet hub --port=7000 --secret=beepboop 
+
fleet hub --port=7000 --secret=beepboop 

Now fleet is listening on :7000 for commands and has started a git server on :7001 over http. There's no ssh keys or post commit hooks to configure, just run that command and you're ready to go!

Next set up some worker drones to run your processes. You can have as many workers as you like on a single server but each worker should be run from a separate directory. Just do:

-
$ fleet drone --hub=x.x.x.x:7000 --secret=beepboop 
+
fleet drone --hub=x.x.x.x:7000 --secret=beepboop 

where x.x.x.x is the address where the fleet hub is running. Spin up a few of these drones.

Now navigate to the directory of the app you want to deploy. First set a remote so you don't need to type --hub and --secret all the time.

-
$ fleet remote add default --hub=x.x.x.x:7000 --secret=beepboop 
+
fleet remote add default --hub=x.x.x.x:7000 --secret=beepboop 

Fleet just created a fleet.json file for you to save your settings.

From the same app directory, to deploy your code just do:

-
$ fleet deploy 
+
fleet deploy 

The deploy command does a git push to the fleet hub's git http server and then the hub instructs all the drones to pull from it. Your code gets checked out into a new directory on all the fleet drones every time you deploy.

Because fleet is designed specifically for managing applications with lots of tiny services, the deploy command isn't tied to running any processes. Starting processes is up to the programmer but it's super simple. Just use the fleet spawn command:

-
$ fleet spawn -- node server.js 8080 
+
fleet spawn -- node server.js 8080 

By default fleet picks a drone at random to run the process on. You can specify which drone you want to run a particular process on with the --drone switch if it matters.

Start a few processes across all your worker drones and then show what is running with the fleet ps command:

-
$ fleet ps
+
fleet ps
 drone#3dfe17b8
 ├─┬ pid#1e99f4
 │ ├── status:   running
@@ -68,7 +68,7 @@ drone#3dfe17b8
 
 

Fleet has many more commands that you can learn about with its git-style manpage-based help system! Just do fleet help to get a list of all the commands you can run.

-
$ fleet help
+
fleet help
 Usage: fleet <command> [<args>]
 
 The commands are:
-- 
cgit v1.2.1