capistrano-data_plane_api 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -0
- data/lib/capistrano/data_plane_api/tasks.rb +14 -8
- data/lib/capistrano/data_plane_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4faba9abcbdade44273ce9e244148c0f3db5cf0f1fcc1e0e26ec3205e106106
|
4
|
+
data.tar.gz: 8b9c5d8c6354d63acbe2a762e7d0638113bb0ec098c0b469d350baa1e50f8024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37b5c6a6de1247e213abb40b263dcf0e6885a4905726a3e8c7b53a0ea1c15539bf153058c1a4132a80dfa07e4d91bb0c5e965cac5bc5e4402b3f29763e4be2d4
|
7
|
+
data.tar.gz: 23af4d6cf4f822ddee20b9bc157b9ef9a3379369d7331f909f6fada1b34059ed857b202ae41f1e84b3c17fc80a4a2ab52efc9147ebf70796900443bc08a403f6
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -155,6 +155,8 @@ add this line to your `Capfile`
|
|
155
155
|
require 'capistrano/data_plane_api'
|
156
156
|
```
|
157
157
|
|
158
|
+
These tasks will only run when the `:web` role is added to the deployment stage.
|
159
|
+
|
158
160
|
## Hooks
|
159
161
|
|
160
162
|
If you used the installer, your app is already
|
@@ -188,6 +190,8 @@ deploy
|
|
188
190
|
data_plane_api:server:set_ready
|
189
191
|
```
|
190
192
|
|
193
|
+
These tasks will only run when the `:web` role is added to the deployment stage.
|
194
|
+
|
191
195
|
## Development
|
192
196
|
|
193
197
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -6,25 +6,31 @@ namespace :data_plane_api do
|
|
6
6
|
namespace :server do
|
7
7
|
desc "Set the server's admin state to DRAIN through the HAProxy Data Plane API"
|
8
8
|
task :set_drain do
|
9
|
-
|
9
|
+
on roles :web do
|
10
|
+
next if ::Capistrano::DataPlaneApi.no_haproxy?
|
10
11
|
|
11
|
-
|
12
|
+
::Capistrano::DataPlaneApi.server_set_drain fetch(:stage), force: ::Capistrano::DataPlaneApi.force_haproxy?
|
13
|
+
end
|
12
14
|
end
|
13
15
|
|
14
16
|
desc "Set the server's admin state to READY through the HAProxy Data Plane API"
|
15
17
|
task :set_ready do
|
16
|
-
|
18
|
+
on roles :web do
|
19
|
+
next if ::Capistrano::DataPlaneApi.no_haproxy?
|
17
20
|
|
18
|
-
|
19
|
-
|
21
|
+
sleep 3
|
22
|
+
::Capistrano::DataPlaneApi.server_set_ready fetch(:stage)
|
23
|
+
end
|
20
24
|
end
|
21
25
|
|
22
26
|
desc "Set the server's admin state to MAINT through the HAProxy Data Plane API"
|
23
27
|
task :set_maint do
|
24
|
-
|
28
|
+
on roles :web do
|
29
|
+
next if ::Capistrano::DataPlaneApi.no_haproxy?
|
25
30
|
|
26
|
-
|
27
|
-
|
31
|
+
sleep 3
|
32
|
+
::Capistrano::DataPlaneApi.server_set_maint fetch(:stage), force: true
|
33
|
+
end
|
28
34
|
end
|
29
35
|
end
|
30
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-data_plane_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mateusz Drewniak
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: data_plane_api
|