cap_blue_green_deploy 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +29 -30
- data/cap_blue_green_deploy.gemspec +2 -2
- data/lib/cap_blue_green_deploy/version.rb +1 -1
- metadata +2 -19
- data/docs/1.server_clean.png +0 -0
- data/docs/2.deploy_setup.png +0 -0
- data/docs/3.1.releases.three_deploys.png +0 -0
- data/docs/3.2.three_deploys.png +0 -0
- data/docs/4.1.releases.deploy_blue_green_live.png +0 -0
- data/docs/4.2.deploy_blue_green_live.png +0 -0
- data/docs/5.1.releases.two_deploy.png +0 -0
- data/docs/5.2.two_deploy.png +0 -0
- data/docs/6.1.releases.deploy_blue_green_live.png +0 -0
- data/docs/6.2.deploy_blue_green_live.png +0 -0
- data/docs/7.1.releases.deploy_blue_green_rollback.png +0 -0
- data/docs/7.2.deploy_blue_green_rollback.png +0 -0
- data/docs/8.1.releases.one_deploy.png +0 -0
- data/docs/8.2.one_deploy.png +0 -0
- data/docs/9.1.deploy_blue_green_live.png +0 -0
- data/docs/architecture.png +0 -0
- data/docs/custom_variables.png +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3e3e1744c0fc7c61f47d25e238b02797aae91182
|
|
4
|
+
data.tar.gz: 56d05bc64558c69179dda6b5c4cfd37190c62c56
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8986ae6c060a1e08ce779bed6c1baea3a16ea9da7b3f1970d6beb9d614be87a58f3ca778365d7de93f399a70aba236674d45c58ca0ec228f7e11808ae60e81c1
|
|
7
|
+
data.tar.gz: 1e2af67c9ddf389db9a747ff0c2b073c7ec5648387d8b370edf70298ef5a3b51c3c573f0c5f351537dc421ef61867634da46e5cd2ec03e99c537d99b0631519a
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -11,9 +11,9 @@ Learn more about
|
|
|
11
11
|
|
|
12
12
|
**Cap Blue Green Deployment** is a non canonical Blue Green solution, based on symlinks. Instead of having **blue** and **green**, we have **pre** and **live**. Pre is always validation environment and live it's production environment.
|
|
13
13
|
|
|
14
|
-

|
|
15
15
|
|
|
16
|
-
You can do as many deploys you need to **pre** without affecting
|
|
16
|
+
You can do as many deploys as you need to **pre** without affecting your **live** env. Changing symlinks you can easily put your code from validation to production environment.
|
|
17
17
|
|
|
18
18
|
## Prerequisite
|
|
19
19
|
|
|
@@ -42,32 +42,26 @@ And then, require the gem script under your capistrano configuration file (Capfi
|
|
|
42
42
|
### Understanding the deploy folder:
|
|
43
43
|
|
|
44
44
|
- **current**: Pre environment. Used to test and validate your application.
|
|
45
|
-
- **current_live**: Live environment.
|
|
45
|
+
- **current_live**: Live environment. Your production access goes here. *This dir name can be customized in custom variables, see below*
|
|
46
46
|
- **previous_live**: Last live release. Used to do the rollback action of current_live. *This dir name can be customized in custom variables, see below*
|
|
47
47
|
|
|
48
48
|
### Deploy Commands:
|
|
49
49
|
|
|
50
50
|
* **Going to Pre** `cap deploy:blue_green:pre`
|
|
51
51
|
|
|
52
|
-
This command is an alias for `cap deploy` default task. It will run the deploy process and
|
|
52
|
+
This command is an alias for `cap deploy` default task. It will run the deploy process and create the `current` release
|
|
53
53
|
|
|
54
54
|
* **Going to Live** `cap deploy:blue_green:live`
|
|
55
55
|
|
|
56
|
-
This command will change symlinks of `current_live` dir to
|
|
56
|
+
This command will change symlinks of `current_live` dir to use the same release path of `current` dir. And also create the `previous_live` symlink to track the last current live release used.
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
If `current_live` already exists, the `previous_live` dir will be created/updated, copying the same symlink of `current live` release, to keep traking the last valid release.
|
|
61
|
-
|
|
62
|
-
Finally, the command will create/update the `current_live` symlink, copying the same symlink of `current` release.
|
|
63
|
-
|
|
64
|
-
* **Rollbacking** `cap deploy:blue_green:rollback`
|
|
58
|
+
* **Rolling back** `cap deploy:blue_green:rollback`
|
|
65
59
|
|
|
66
60
|
This command will change the `current_live` symlink to use the same destination of `previous_live` symlink.
|
|
67
61
|
|
|
68
62
|
* **Cleanup** `cap deploy:blue_green:cleanup`
|
|
69
63
|
|
|
70
|
-
This is the same behavior of the default capistrano cleanup `deploy:cleanup`, but the `current_live` and `previous_live` releases will be preserved and not removed.
|
|
64
|
+
This is the same behavior of the default capistrano cleanup `deploy:cleanup`, but the `current`, `current_live` and `previous_live` releases will be preserved and not removed.
|
|
71
65
|
|
|
72
66
|
**This lib automatically rewrite the default deploy:cleanup to use this new cleanup function.**
|
|
73
67
|
|
|
@@ -75,7 +69,7 @@ And then, require the gem script under your capistrano configuration file (Capfi
|
|
|
75
69
|
|
|
76
70
|
* **Custom Variables**
|
|
77
71
|
|
|
78
|
-
You can change the default
|
|
72
|
+
You can change the default values by overwriting them in your capistrano file. The default values are:
|
|
79
73
|
- keep_releases: 5
|
|
80
74
|
- blue_green_live_dir: "current_live"
|
|
81
75
|
- blue_green_previous_dir: "previous_live"
|
|
@@ -87,40 +81,45 @@ And then, require the gem script under your capistrano configuration file (Capfi
|
|
|
87
81
|
- `set :blue_green_previous_dir, "previous_live"`
|
|
88
82
|
|
|
89
83
|
**1. Starting with clean server**
|
|
90
|
-

|
|
84
|
+

|
|
91
85
|
|
|
92
86
|
**2. Running `cap deploy:setup` to prepare the server**
|
|
93
|
-

|
|
87
|
+

|
|
94
88
|
|
|
95
89
|
**3. Running `cap deploy` three times to populate the release folder (cleanup code removes one old release)**
|
|
96
|
-

|
|
97
|
-

|
|
90
|
+

|
|
91
|
+

|
|
98
92
|
|
|
99
93
|
**4. Going to live `cap deploy:blue_green:live` (current_live dir will be created. No changes in releases dir)**
|
|
100
|
-

|
|
101
|
-

|
|
94
|
+

|
|
95
|
+

|
|
102
96
|
|
|
103
97
|
**5. Running two more deploy with `cap deploy` (current_live will not change. Cleanup remove one old release.)**
|
|
104
|
-

|
|
105
|
-

|
|
98
|
+

|
|
99
|
+

|
|
106
100
|
|
|
107
101
|
**6. Going to live again with `cap deploy:blue_green:live` (At this time, previous_live will be created, targeting the current_live release before change it. No changes in releases dir)**
|
|
108
|
-

|
|
109
|
-

|
|
102
|
+

|
|
103
|
+

|
|
110
104
|
|
|
111
105
|
**7. Something goes wrong... Rollbacking with `cap deploy:blue_green:rollback` (The current_live will change to target the same release of previous_live. No changes in releases dir)**
|
|
112
|
-

|
|
113
|
-

|
|
106
|
+

|
|
107
|
+

|
|
114
108
|
|
|
115
109
|
**8. Running one more deploy with `cap deploy` (current_live and previous_live will not change. Cleanup remove one old release.)***
|
|
116
|
-

|
|
117
|
-

|
|
110
|
+

|
|
111
|
+

|
|
118
112
|
|
|
119
113
|
**9. Going to live again with `cap deploy:blue_green:live`**
|
|
120
|
-

|
|
114
|
+

|
|
121
115
|
|
|
122
116
|
**Changing current_live and previous_live variables to use custom names (custom_live_path, custom_rollback_path)**
|
|
123
|
-

|
|
117
|
+

|
|
118
|
+
|
|
119
|
+
## Contributors
|
|
120
|
+
|
|
121
|
+
- [Emerson Macedo](https://github.com/emerleite)
|
|
122
|
+
- [Celio Latorraca](https://github.com/celiofonseca)
|
|
124
123
|
|
|
125
124
|
## Contributing
|
|
126
125
|
|
|
@@ -10,10 +10,10 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.email = ["biribarj@gmail.com"]
|
|
11
11
|
spec.description = "Blue-Green deployment solution for Capistrano, using symbolic links between releases."
|
|
12
12
|
spec.summary = "Blue-Green deployment solution for Capistrano"
|
|
13
|
-
spec.homepage = ""
|
|
13
|
+
spec.homepage = "https://github.com/rafaelbiriba/cap_blue_green_deploy"
|
|
14
14
|
spec.license = "MIT"
|
|
15
15
|
|
|
16
|
-
spec.files = `git ls-files`.split($/)
|
|
16
|
+
spec.files = `git ls-files`.split($/).reject{ |f| f =~ /docs/ }
|
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
19
|
spec.require_paths = ["lib"]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cap_blue_green_deploy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rafael Biriba
|
|
@@ -119,23 +119,6 @@ files:
|
|
|
119
119
|
- README.md
|
|
120
120
|
- Rakefile
|
|
121
121
|
- cap_blue_green_deploy.gemspec
|
|
122
|
-
- docs/1.server_clean.png
|
|
123
|
-
- docs/2.deploy_setup.png
|
|
124
|
-
- docs/3.1.releases.three_deploys.png
|
|
125
|
-
- docs/3.2.three_deploys.png
|
|
126
|
-
- docs/4.1.releases.deploy_blue_green_live.png
|
|
127
|
-
- docs/4.2.deploy_blue_green_live.png
|
|
128
|
-
- docs/5.1.releases.two_deploy.png
|
|
129
|
-
- docs/5.2.two_deploy.png
|
|
130
|
-
- docs/6.1.releases.deploy_blue_green_live.png
|
|
131
|
-
- docs/6.2.deploy_blue_green_live.png
|
|
132
|
-
- docs/7.1.releases.deploy_blue_green_rollback.png
|
|
133
|
-
- docs/7.2.deploy_blue_green_rollback.png
|
|
134
|
-
- docs/8.1.releases.one_deploy.png
|
|
135
|
-
- docs/8.2.one_deploy.png
|
|
136
|
-
- docs/9.1.deploy_blue_green_live.png
|
|
137
|
-
- docs/architecture.png
|
|
138
|
-
- docs/custom_variables.png
|
|
139
122
|
- lib/cap_blue_green_deploy.rb
|
|
140
123
|
- lib/cap_blue_green_deploy/init.rb
|
|
141
124
|
- lib/cap_blue_green_deploy/tasks.rb
|
|
@@ -153,7 +136,7 @@ files:
|
|
|
153
136
|
- spec/lib/cap_blue_green_deploy/tasks/rollback_spec.rb
|
|
154
137
|
- spec/lib/cap_blue_green_deploy/tasks_spec.rb
|
|
155
138
|
- spec/spec_helper.rb
|
|
156
|
-
homepage:
|
|
139
|
+
homepage: https://github.com/rafaelbiriba/cap_blue_green_deploy
|
|
157
140
|
licenses:
|
|
158
141
|
- MIT
|
|
159
142
|
metadata: {}
|
data/docs/1.server_clean.png
DELETED
|
Binary file
|
data/docs/2.deploy_setup.png
DELETED
|
Binary file
|
|
Binary file
|
data/docs/3.2.three_deploys.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/docs/5.2.two_deploy.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/docs/8.2.one_deploy.png
DELETED
|
Binary file
|
|
Binary file
|
data/docs/architecture.png
DELETED
|
Binary file
|
data/docs/custom_variables.png
DELETED
|
Binary file
|