cf-blue-green
Advanced tools
Comparing version
{ | ||
"name": "cf-blue-green", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "zero-downtime deployment for Cloud Foundry applications", | ||
@@ -5,0 +5,0 @@ "repository": { |
# Cloud Foundry blue-green deployment | ||
Allows zero-downtime deployments of applications within Cloud Foundry. | ||
Allows zero-downtime deployments of applications within Cloud Foundry, with no additional setup needed. | ||
## Usage | ||
Requires [the `cf` CLI](https://docs.cloudfoundry.org/devguide/installcf/install-go-cli.html). | ||
1. [Install the `cf` CLI](https://github.com/cloudfoundry/cli/releases), v6.12.0 or v6.12.1. | ||
* See [Notes](#cf-cli) below for more info about the version restriction. | ||
1. Run `npm install -g cf-blue-green`. | ||
* Requires Node.js, to make distribution easy. If you don't want to install it, simply: | ||
1. Download [the script](bin/cf-blue-green). | ||
1. Run `chmod a+x cf-blue-green`. | ||
1. Move the file somewhere in your PATH. | ||
* See [Notes](#manual-installation) below for non-Node installation. | ||
1. Run `cf-blue-green <appname>` (instead of `cf-push`) from your application directory to deploy. | ||
This creates a copy of your already-running application, and safely switches traffic over to it. No additional setup needed! | ||
This creates a copy of your already-running application, and safely switches traffic over to it. It's recommended that you try this script on a non-production application environment first, just to ensure that everything is switched over properly. | ||
It's recommended that you try this script on a non-production application environment first, just to ensure that everything is switched over properly. | ||
## Notes | ||
### CF CLI | ||
The reasons for the tight version restriction on the CF CLI is: | ||
* < 6.12.0 [doesn't respect the `buildpack` parameter](https://www.pivotaltracker.com/n/projects/892938/stories/96041780). | ||
* 6.12.2+ has [an unresolved bug](https://www.pivotaltracker.com/n/projects/892938/stories/100594158) (as of this writing) that breaks `cf-blue-green` | ||
To downgrade to 6.12.1 on Mac, if you use [Homebrew](http://brew.sh/): | ||
```bash | ||
brew uninstall cloudfoundry-cli | ||
brew install https://raw.githubusercontent.com/pivotal/homebrew-tap/b39786b30125187bfa37a71eebef88222aa2c435/cloudfoundry-cli.rb | ||
``` | ||
### Manual installation | ||
The script is distributed via NPM, but doesn't actually require Node.js beyond that. If you don't want to install Node, simply: | ||
1. Download [the script](bin/cf-blue-green). | ||
1. Run `chmod a+x cf-blue-green`. | ||
1. Move the file somewhere in your PATH. | ||
### Manifests | ||
`cf-blue-green` creates a temporary manifest from your live application, meaning that it ignores the `manifest.yml` in your directory, if you have one. To deploy any changes to your manifest, use `cf push` directly. | ||
## Resources | ||
@@ -21,0 +44,0 @@ |
Sorry, the diff of this file is not supported yet
7056
24.23%51
82.14%