docs/strategy.md in vagrant-orchestrate-0.4.0 vs docs/strategy.md in vagrant-orchestrate-0.4.1
- old
+ new
@@ -1,52 +1,35 @@
# Deployment Strategies
-Vagrant Orchestrate supports several deployment strategies, including parallel and
+Vagrant Orchestrate supports several deployment strategies including parallel and
blue-green. Here we'll cover how to use the various strategies as well as describing
situations when each might be useful.
-## Specifying a strategy
-
-### Command line
-
-Strategies can be passed on the command line with the `--strategy` parameter
-
- $ vagrant orchestrate push --strategy parallel
-
-### Vagrantfile configuration
-
-Alternatively, you can specify the deployment strategy in your Vagrantfile
-
- config.orchestrate.strategy = :parallel
-
-Command line parameters take precedence over Vagrantfile set configuration values.
-
## Strategies
### Serial (default)
-This will deploy to the target servers one at a time. This can be useful if you
+Deploy to the target servers one at a time. This can be useful if you
have a small number servers, or if you need to keep the majority of your servers
online in order to support your application's load.
$ vagrant orchestrate push --strategy serial
config.orchestrate.strategy = :serial
### Parallel
-This strategy will deploy to all of the target servers at the same time. This is
-useful if you want to minimize the amount of time that an overall deployment takes.
+Deploy to all of the target servers at the same time. This is
+useful if you want to minimize the total amount of time that an deployment takes.
Depending on how you've written your provisioners, this could cause downtime for
the application that is being deployed.
$ vagrant orchestrate push --strategy parallel
config.orchestrate.strategy = :parallel
### Canary
-The canary strategy will deploy to a single server, provide an opportunity to
-test the deployed server, and then deploy the remainder of the servers in parallel.
+Deploy to a single server, pause to allow for testing, and then deploy the remainder of the servers in parallel.
This is a great opportunity to test one node of your cluster before blasting your
changes out to them all. This can be particularly useful when combined with post
provision [trigger](https://github.com/emyl/vagrant-triggers) to run a smoke test.
$ vagrant orchestrate push --strategy canary
@@ -54,38 +37,60 @@
config.orchestrate.strategy = :canary
### Blue Green
The [Blue Green](http://martinfowler.com/bliki/BlueGreenDeployment.html) deployment
strategy deploys to half of the cluster in parallel, then the other half, with
-a pause in between. This doesn't manage any of your load balancing or networking
-configuraiton for you, but if your application has a healthcheck that your load
+a pause in between. This won't manage any of your load balancing or networking
+configuration for you, but if your application has a healthcheck that your load
balancer respects, it should be easy to turn it off at the start of your provisioning
and back on at the end. If your application can serve the load on half of its nodes
then this will be the best blend of getting the deployment done quickly and maintaining
-a working application.
+a running application. If the total number of target servers is odd then the smaller
+number will be deployed to first.
$ vagrant orchestrate push --strategy blue_green
config.orchestrate.strategy = :blue_green
### Canary Blue Green
-This strategy simply combines the two immediately above - deploying to a single
-server, pausing, then to half the cluster in parallel, pausing, and then the remainder,
-also in parallel. Good if you have a large number of servers and want to do a
+Combines the two immediately above - deploying to a single
+server, pausing, then to half of the remaining cluster in parallel, pausing, and then the other half,
+also in parallel. This is good if you have a large number of servers and want to do a
smoke test of a single server before committing to pushing to half of your farm.
$ vagrant orchestrate push --strategy canary_blue_green
config.orchestrate.strategy = :canary_blue_green
+## Specifying a strategy
+
+### Command line
+
+Strategies can be passed on the command line with the `--strategy` parameter
+
+ $ vagrant orchestrate push --strategy parallel
+
+### Vagrantfile configuration
+
+Alternatively, you can specify the deployment strategy in your Vagrantfile
+
+ config.orchestrate.strategy = :parallel
+
+Command line parameters take precedence over configuration values set in the Vagrantfile.
+
+
## Suppressing Prompts
In order to automate the deployment process, it can be very useful to suppress
prompts. You can achieve that in two ways:
-From the command line, add the `--force` or `-f` parameter
+From the command line, add the `--force` or `-f` parameters
$ vagrant orchestrate push --strategy canary -f
-Within your vagrantfile, set the `force_push` setting to true
+Within your Vagrantfile, set the `force_push` setting to true
config.orchestrate.force_push = true
+
+## Support for other strategies
+If you have ideas for other strategies that you think would be broadly useful,
+open an issue and we'll discuss.