capistrano-sidekiq 2.0.0.beta5 → 2.2.0
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/.tool-versions +1 -1
- data/CHANGELOG.md +221 -66
- data/Gemfile +4 -0
- data/README.md +25 -5
- data/Rakefile +8 -0
- data/capistrano-sidekiq.gemspec +0 -1
- data/lib/capistrano/sidekiq/helpers.rb +60 -0
- data/lib/capistrano/sidekiq/monit.rb +2 -0
- data/lib/capistrano/sidekiq/systemd.rb +4 -1
- data/lib/capistrano/sidekiq/upstart.rb +6 -2
- data/lib/capistrano/sidekiq/version.rb +1 -1
- data/lib/capistrano/sidekiq.rb +1 -0
- data/lib/capistrano/tasks/monit.rake +63 -104
- data/lib/capistrano/tasks/sidekiq.rake +1 -7
- data/lib/capistrano/tasks/systemd.rake +209 -51
- data/lib/capistrano/tasks/upstart.rake +14 -54
- data/lib/generators/capistrano/sidekiq/monit/templates/sidekiq_monit.conf.erb +4 -8
- data/lib/generators/capistrano/sidekiq/systemd/templates/sidekiq.service.capistrano.erb +51 -7
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f55ede23a48a3ff9319774a09692f01137ae02ef54b6f27bead18518650973c
|
4
|
+
data.tar.gz: 3587deeffde5524d5390e0fc60e474c0bf1c34c048422a15a30efc8cb5460ca2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46b1223d92a931beed504100ed25debb4c1b5d0a98a0e60b279c0d283ac5356a5ed5c3d80b87dbe8220cc8faa60999ab3d1266147ff22d1968b8545e313a1f00
|
7
|
+
data.tar.gz: da0d5e2e30b0fefc4a1e37beae281bbbba52417fa4446f13bcff69bb395df9250945797f76a039ae5774574d24ca7b2d563c2f4013fa8726faaa00b3d66c857a
|
data/.tool-versions
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby
|
1
|
+
ruby 3.1.2
|
data/CHANGELOG.md
CHANGED
@@ -1,117 +1,272 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
##
|
4
|
-
- Add upstart support
|
5
|
-
- Fix monit service name
|
3
|
+
## [2.2.0](https://github.com/seuros/capistrano-sidekiq/tree/2.2.0) (2022-05-16)
|
6
4
|
|
7
|
-
|
8
|
-
- Fix deployment flow hooks
|
5
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v2.1.0...2.2.0)
|
9
6
|
|
10
|
-
|
11
|
-
- Add deploy failure handling @phillbaker
|
12
|
-
- Support custom monit filename @zocoi
|
13
|
-
- Systemd Integration @baierjan
|
14
|
-
- Fix regression in sidekiq_roles variable
|
15
|
-
- Fixed pidfile accounting per process @jsantos
|
16
|
-
- Rubocop corrections for main task @jsantos
|
7
|
+
**Merged pull requests:**
|
17
8
|
|
18
|
-
|
9
|
+
- Allow the definition of service\_unit\_name [\#297](https://github.com/seuros/capistrano-sidekiq/pull/297) ([seuros](https://github.com/seuros))
|
10
|
+
- restore sidekiq unit env vars [\#295](https://github.com/seuros/capistrano-sidekiq/pull/295) ([tayagi-aim](https://github.com/tayagi-aim))
|
11
|
+
- Fix a typo in sidekiq:restart [\#294](https://github.com/seuros/capistrano-sidekiq/pull/294) ([hoppergee](https://github.com/hoppergee))
|
19
12
|
|
20
|
-
-
|
21
|
-
- Convert CHANGELOG to Markdown @Tensho
|
22
|
-
- Drop support for capistrano 2.0 @Tensho
|
23
|
-
- *BREAKING CHANGE* If people used custom monit template, they should adjust it to use pid_files variable instead of processes_pids. @Tensho
|
24
|
-
- *BREAKING CHANGE* `:sidekiq_role` has been renamed to its plural form, `:sidekiq_roles`
|
13
|
+
## [v2.1.0](https://github.com/seuros/capistrano-sidekiq/tree/v2.1.0) (2022-05-15)
|
25
14
|
|
26
|
-
|
15
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v2.0.0...v2.1.0)
|
27
16
|
|
28
|
-
|
17
|
+
**Merged pull requests:**
|
29
18
|
|
30
|
-
|
19
|
+
- Fix \#253: $HOME is unexpanded in service unit file [\#291](https://github.com/seuros/capistrano-sidekiq/pull/291) ([nikochiko](https://github.com/nikochiko))
|
20
|
+
- Update Readme [\#287](https://github.com/seuros/capistrano-sidekiq/pull/287) ([lesliepoolman](https://github.com/lesliepoolman))
|
21
|
+
- Fixed sidekiq.service autostart in --user mode [\#285](https://github.com/seuros/capistrano-sidekiq/pull/285) ([michaelkhabarov](https://github.com/michaelkhabarov))
|
22
|
+
- README: Add section about older Systemd versions logging [\#284](https://github.com/seuros/capistrano-sidekiq/pull/284) ([64kramsystem](https://github.com/64kramsystem))
|
23
|
+
- Avoid using present? [\#282](https://github.com/seuros/capistrano-sidekiq/pull/282) ([frederikspang](https://github.com/frederikspang))
|
24
|
+
- Various systemd improvements - Multiple Process Support, Per Process Config, Proper Restarts with timeout and more [\#279](https://github.com/seuros/capistrano-sidekiq/pull/279) ([jclusso](https://github.com/jclusso))
|
25
|
+
- Use File.join for systemd file path [\#278](https://github.com/seuros/capistrano-sidekiq/pull/278) ([AndrewSverdrup](https://github.com/AndrewSverdrup))
|
26
|
+
- Fix bug in switch\_user and dry up common methods to a helpers module [\#272](https://github.com/seuros/capistrano-sidekiq/pull/272) ([chriscz](https://github.com/chriscz))
|
27
|
+
- Update monit integration against Sidekiq 6.0 [\#271](https://github.com/seuros/capistrano-sidekiq/pull/271) ([7up4](https://github.com/7up4))
|
28
|
+
- Added sidekiq\_service\_templates\_path to manage custom systemd templates [\#265](https://github.com/seuros/capistrano-sidekiq/pull/265) ([farnsworth](https://github.com/farnsworth))
|
29
|
+
- Add sidekiq\_config, sidekiq\_concurrency, and sidekiq\_queue support to systemd [\#262](https://github.com/seuros/capistrano-sidekiq/pull/262) ([ayn](https://github.com/ayn))
|
31
30
|
|
32
|
-
-
|
33
|
-
- `sidekiq:stop` task perpertually callable @Tensho
|
31
|
+
## [v2.0.0](https://github.com/seuros/capistrano-sidekiq/tree/v2.0.0) (2020-12-19)
|
34
32
|
|
35
|
-
|
33
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v2.0.0.beta5...v2.0.0)
|
36
34
|
|
37
|
-
|
35
|
+
**Merged pull requests:**
|
38
36
|
|
39
|
-
|
37
|
+
- Upstart update [\#261](https://github.com/seuros/capistrano-sidekiq/pull/261) ([duhast](https://github.com/duhast))
|
40
38
|
|
41
|
-
-
|
39
|
+
## [v2.0.0.beta5](https://github.com/seuros/capistrano-sidekiq/tree/v2.0.0.beta5) (2020-06-25)
|
42
40
|
|
43
|
-
|
41
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v2.0.0.beta4...v2.0.0.beta5)
|
44
42
|
|
45
|
-
|
43
|
+
**Merged pull requests:**
|
46
44
|
|
47
|
-
|
45
|
+
- Minimal working Upstart plugin [\#255](https://github.com/seuros/capistrano-sidekiq/pull/255) ([duhast](https://github.com/duhast))
|
46
|
+
- Capistrano rbenv uses bundle instead of bundler [\#252](https://github.com/seuros/capistrano-sidekiq/pull/252) ([uxxman](https://github.com/uxxman))
|
48
47
|
|
49
|
-
-
|
48
|
+
## [v2.0.0.beta4](https://github.com/seuros/capistrano-sidekiq/tree/v2.0.0.beta4) (2020-06-08)
|
50
49
|
|
51
|
-
|
50
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v2.0.0.beta3...v2.0.0.beta4)
|
52
51
|
|
53
|
-
|
54
|
-
- Unmonitor monit while deploy @Saicheg
|
52
|
+
**Merged pull requests:**
|
55
53
|
|
56
|
-
|
54
|
+
- Fix undefined method as error [\#249](https://github.com/seuros/capistrano-sidekiq/pull/249) ([kyoshidajp](https://github.com/kyoshidajp))
|
57
55
|
|
58
|
-
-
|
59
|
-
- Run Sidekiq as daemon from Monit @dpaluy
|
56
|
+
## [v2.0.0.beta3](https://github.com/seuros/capistrano-sidekiq/tree/v2.0.0.beta3) (2020-05-26)
|
60
57
|
|
61
|
-
|
58
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v2.0.0.beta2...v2.0.0.beta3)
|
62
59
|
|
63
|
-
|
60
|
+
**Merged pull requests:**
|
64
61
|
|
65
|
-
|
62
|
+
- Append logs [\#247](https://github.com/seuros/capistrano-sidekiq/pull/247) ([Paprikas](https://github.com/Paprikas))
|
63
|
+
- Add "loginctl enable-linger" command to sidekiq systemd install task [\#246](https://github.com/seuros/capistrano-sidekiq/pull/246) ([Paprikas](https://github.com/Paprikas))
|
64
|
+
- Setup error output for systemd [\#245](https://github.com/seuros/capistrano-sidekiq/pull/245) ([Paprikas](https://github.com/Paprikas))
|
65
|
+
- Use StandardOutput for logging [\#244](https://github.com/seuros/capistrano-sidekiq/pull/244) ([Paprikas](https://github.com/Paprikas))
|
66
66
|
|
67
|
-
-
|
67
|
+
## [v2.0.0.beta2](https://github.com/seuros/capistrano-sidekiq/tree/v2.0.0.beta2) (2020-05-25)
|
68
68
|
|
69
|
-
|
69
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v2.0.0.beta1...v2.0.0.beta2)
|
70
70
|
|
71
|
-
|
71
|
+
**Merged pull requests:**
|
72
72
|
|
73
|
-
|
73
|
+
- Add sidekiq\_service\_unit\_env\_vars option to pass Environment variable… [\#243](https://github.com/seuros/capistrano-sidekiq/pull/243) ([Paprikas](https://github.com/Paprikas))
|
74
74
|
|
75
|
-
-
|
75
|
+
## [v2.0.0.beta1](https://github.com/seuros/capistrano-sidekiq/tree/v2.0.0.beta1) (2020-05-12)
|
76
76
|
|
77
|
-
|
77
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v1.0.3...v2.0.0.beta1)
|
78
78
|
|
79
|
-
|
80
|
-
- Add concurrency option support @ungsophy
|
79
|
+
**Merged pull requests:**
|
81
80
|
|
82
|
-
|
81
|
+
- Release 2.0.0 [\#236](https://github.com/seuros/capistrano-sidekiq/pull/236) ([seuros](https://github.com/seuros))
|
83
82
|
|
84
|
-
-
|
83
|
+
## [v1.0.3](https://github.com/seuros/capistrano-sidekiq/tree/v1.0.3) (2019-09-02)
|
85
84
|
|
86
|
-
|
85
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v1.0.2...v1.0.3)
|
87
86
|
|
88
|
-
|
87
|
+
**Merged pull requests:**
|
89
88
|
|
90
|
-
|
89
|
+
- Point readers towards enable lingering for systemd [\#230](https://github.com/seuros/capistrano-sidekiq/pull/230) ([creativetags](https://github.com/creativetags))
|
90
|
+
- Update README\#Multiple processes example [\#215](https://github.com/seuros/capistrano-sidekiq/pull/215) ([tamaloa](https://github.com/tamaloa))
|
91
|
+
- Add upstart support for start, stop, and quiet [\#208](https://github.com/seuros/capistrano-sidekiq/pull/208) ([tmiller](https://github.com/tmiller))
|
92
|
+
- Fix monit config file name missing application [\#205](https://github.com/seuros/capistrano-sidekiq/pull/205) ([xiewenwei](https://github.com/xiewenwei))
|
91
93
|
|
92
|
-
-
|
94
|
+
## [v1.0.2](https://github.com/seuros/capistrano-sidekiq/tree/v1.0.2) (2018-04-12)
|
93
95
|
|
94
|
-
|
96
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v1.0.1...v1.0.2)
|
95
97
|
|
96
|
-
-
|
98
|
+
## [v1.0.1](https://github.com/seuros/capistrano-sidekiq/tree/v1.0.1) (2018-04-04)
|
97
99
|
|
98
|
-
|
100
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v1.0.0...v1.0.1)
|
99
101
|
|
100
|
-
|
102
|
+
**Merged pull requests:**
|
101
103
|
|
102
|
-
|
104
|
+
- Fix accounting of pidfiles per process \(when using multiple processes\) [\#197](https://github.com/seuros/capistrano-sidekiq/pull/197) ([jsantos](https://github.com/jsantos))
|
105
|
+
- fix fail rolling restart task [\#196](https://github.com/seuros/capistrano-sidekiq/pull/196) ([idekeita](https://github.com/idekeita))
|
106
|
+
- README.md - simple edit, highlight known issue with cap 3 [\#192](https://github.com/seuros/capistrano-sidekiq/pull/192) ([westonplatter](https://github.com/westonplatter))
|
107
|
+
- Systemd integration [\#171](https://github.com/seuros/capistrano-sidekiq/pull/171) ([baierjan](https://github.com/baierjan))
|
108
|
+
- update README with instructions for prepending 'bundle exec' [\#143](https://github.com/seuros/capistrano-sidekiq/pull/143) ([mistidoi](https://github.com/mistidoi))
|
109
|
+
- Add deploy failure handling to cap v2 and v3. [\#135](https://github.com/seuros/capistrano-sidekiq/pull/135) ([phillbaker](https://github.com/phillbaker))
|
110
|
+
- Support custom monit filename [\#132](https://github.com/seuros/capistrano-sidekiq/pull/132) ([zocoi](https://github.com/zocoi))
|
103
111
|
|
104
|
-
-
|
112
|
+
## [v1.0.0](https://github.com/seuros/capistrano-sidekiq/tree/v1.0.0) (2018-01-24)
|
105
113
|
|
106
|
-
|
114
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.20.0...v1.0.0)
|
107
115
|
|
108
|
-
|
116
|
+
**Merged pull requests:**
|
109
117
|
|
110
|
-
|
118
|
+
- Spring Cleanup [\#190](https://github.com/seuros/capistrano-sidekiq/pull/190) ([Tensho](https://github.com/Tensho))
|
119
|
+
- Convert CHANGELOG to Markdown + Add Unreleased Section [\#189](https://github.com/seuros/capistrano-sidekiq/pull/189) ([Tensho](https://github.com/Tensho))
|
120
|
+
- Prepend \_ Before Service Name Index [\#184](https://github.com/seuros/capistrano-sidekiq/pull/184) ([Tensho](https://github.com/Tensho))
|
121
|
+
- Christmas Eve Cleaning 🎅 [\#183](https://github.com/seuros/capistrano-sidekiq/pull/183) ([Tensho](https://github.com/Tensho))
|
111
122
|
|
112
|
-
-
|
123
|
+
## [v0.20.0](https://github.com/seuros/capistrano-sidekiq/tree/v0.20.0) (2017-08-01)
|
113
124
|
|
114
|
-
|
125
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.10.0...v0.20.0)
|
115
126
|
|
116
|
-
|
127
|
+
**Merged pull requests:**
|
117
128
|
|
129
|
+
- Use new capistrano DSL for reenable tasks [\#177](https://github.com/seuros/capistrano-sidekiq/pull/177) ([Tensho](https://github.com/Tensho))
|
130
|
+
|
131
|
+
## [v0.10.0](https://github.com/seuros/capistrano-sidekiq/tree/v0.10.0) (2016-11-25)
|
132
|
+
|
133
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.5.4...v0.10.0)
|
134
|
+
|
135
|
+
**Merged pull requests:**
|
136
|
+
|
137
|
+
- add documentation; add note to ensure shared/tmp/pids folder exists i… [\#168](https://github.com/seuros/capistrano-sidekiq/pull/168) ([elliotwesoff](https://github.com/elliotwesoff))
|
138
|
+
- Make sidekiq:stop task perpetually callable [\#164](https://github.com/seuros/capistrano-sidekiq/pull/164) ([williamn](https://github.com/williamn))
|
139
|
+
- Add missing monit default config options to README [\#155](https://github.com/seuros/capistrano-sidekiq/pull/155) ([kirrmann](https://github.com/kirrmann))
|
140
|
+
- Documenting sidekiq\_service\_name config option [\#153](https://github.com/seuros/capistrano-sidekiq/pull/153) ([bendilley](https://github.com/bendilley))
|
141
|
+
- Fixes identation and Increase documentation with info about :sidekiq\_config [\#131](https://github.com/seuros/capistrano-sidekiq/pull/131) ([ricardokdz](https://github.com/ricardokdz))
|
142
|
+
- Respect both local and global puma\_user setting everywhere [\#122](https://github.com/seuros/capistrano-sidekiq/pull/122) ([jhollinger](https://github.com/jhollinger))
|
143
|
+
|
144
|
+
## [v0.5.4](https://github.com/seuros/capistrano-sidekiq/tree/v0.5.4) (2015-10-27)
|
145
|
+
|
146
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.5.3...v0.5.4)
|
147
|
+
|
148
|
+
**Merged pull requests:**
|
149
|
+
|
150
|
+
- Change pidfile handling, always add index to pidfile name [\#116](https://github.com/seuros/capistrano-sidekiq/pull/116) ([w1mvy](https://github.com/w1mvy))
|
151
|
+
- Move Contributors to separate file. [\#115](https://github.com/seuros/capistrano-sidekiq/pull/115) ([lpaulmp](https://github.com/lpaulmp))
|
152
|
+
- Monit configuration respects options\_per\_process [\#113](https://github.com/seuros/capistrano-sidekiq/pull/113) ([kazjote](https://github.com/kazjote))
|
153
|
+
- Capistrano 2 fixes [\#109](https://github.com/seuros/capistrano-sidekiq/pull/109) ([wingrunr21](https://github.com/wingrunr21))
|
154
|
+
- Use SSHKit command\_map [\#104](https://github.com/seuros/capistrano-sidekiq/pull/104) ([hbin](https://github.com/hbin))
|
155
|
+
- Add notice that the pty bug only applies to Capistrano 3. [\#101](https://github.com/seuros/capistrano-sidekiq/pull/101) ([nTraum](https://github.com/nTraum))
|
156
|
+
- Add support for different number of processes per host on monit.cap [\#100](https://github.com/seuros/capistrano-sidekiq/pull/100) ([okoriko](https://github.com/okoriko))
|
157
|
+
- intial support for sidekiq\_user [\#97](https://github.com/seuros/capistrano-sidekiq/pull/97) ([mcb](https://github.com/mcb))
|
158
|
+
|
159
|
+
## [v0.5.3](https://github.com/seuros/capistrano-sidekiq/tree/v0.5.3) (2015-06-25)
|
160
|
+
|
161
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.5.2...v0.5.3)
|
162
|
+
|
163
|
+
**Merged pull requests:**
|
164
|
+
|
165
|
+
- Refactored template\_sidekiq method [\#90](https://github.com/seuros/capistrano-sidekiq/pull/90) ([rstrobl](https://github.com/rstrobl))
|
166
|
+
- added ability to operate without sudo [\#89](https://github.com/seuros/capistrano-sidekiq/pull/89) ([dreyks](https://github.com/dreyks))
|
167
|
+
- Revert "Add nohup when executing start\_sidekiq command, for a problem… [\#88](https://github.com/seuros/capistrano-sidekiq/pull/88) ([seuros](https://github.com/seuros))
|
168
|
+
- Add nohup when executing start\_sidekiq command, for a problem with pty. [\#76](https://github.com/seuros/capistrano-sidekiq/pull/76) ([maruware](https://github.com/maruware))
|
169
|
+
- implemented ability to split sidekiq\_roles by count of sidekiq-processes [\#45](https://github.com/seuros/capistrano-sidekiq/pull/45) ([alexyakubenko](https://github.com/alexyakubenko))
|
170
|
+
|
171
|
+
## [v0.5.2](https://github.com/seuros/capistrano-sidekiq/tree/v0.5.2) (2015-03-20)
|
172
|
+
|
173
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.5.1...v0.5.2)
|
174
|
+
|
175
|
+
**Merged pull requests:**
|
176
|
+
|
177
|
+
- Set sidekiq\_concurrency default value for cap 2 \(improves pr \#72\). [\#74](https://github.com/seuros/capistrano-sidekiq/pull/74) ([derSascha](https://github.com/derSascha))
|
178
|
+
|
179
|
+
## [v0.5.1](https://github.com/seuros/capistrano-sidekiq/tree/v0.5.1) (2015-03-18)
|
180
|
+
|
181
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.5.0...v0.5.1)
|
182
|
+
|
183
|
+
**Merged pull requests:**
|
184
|
+
|
185
|
+
- Support sidekiq\_concurrency option for capistrano 2 [\#72](https://github.com/seuros/capistrano-sidekiq/pull/72) ([mrsimo](https://github.com/mrsimo))
|
186
|
+
|
187
|
+
## [v0.5.0](https://github.com/seuros/capistrano-sidekiq/tree/v0.5.0) (2015-03-18)
|
188
|
+
|
189
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.4.0...v0.5.0)
|
190
|
+
|
191
|
+
**Merged pull requests:**
|
192
|
+
|
193
|
+
- Options per process [\#70](https://github.com/seuros/capistrano-sidekiq/pull/70) ([mrsimo](https://github.com/mrsimo))
|
194
|
+
- Try execute on the monit.conf mv command [\#69](https://github.com/seuros/capistrano-sidekiq/pull/69) ([bencrouse](https://github.com/bencrouse))
|
195
|
+
- Update sidekiq.cap [\#68](https://github.com/seuros/capistrano-sidekiq/pull/68) ([raulbrito](https://github.com/raulbrito))
|
196
|
+
- bug fix for generator. [\#66](https://github.com/seuros/capistrano-sidekiq/pull/66) ([zshannon](https://github.com/zshannon))
|
197
|
+
- Fix Readme Issues [\#63](https://github.com/seuros/capistrano-sidekiq/pull/63) ([ChuckJHardy](https://github.com/ChuckJHardy))
|
198
|
+
- Set default option for sidekiq queue in capistrano 2 script [\#62](https://github.com/seuros/capistrano-sidekiq/pull/62) ([brain-geek](https://github.com/brain-geek))
|
199
|
+
- Update Cap2 Defaults to include config file [\#61](https://github.com/seuros/capistrano-sidekiq/pull/61) ([davidlesches](https://github.com/davidlesches))
|
200
|
+
- add customizing the monit templates for sidekiq [\#60](https://github.com/seuros/capistrano-sidekiq/pull/60) ([SammyLin](https://github.com/SammyLin))
|
201
|
+
- Add queues setup in capistrano2 task [\#57](https://github.com/seuros/capistrano-sidekiq/pull/57) ([brain-geek](https://github.com/brain-geek))
|
202
|
+
|
203
|
+
## [v0.4.0](https://github.com/seuros/capistrano-sidekiq/tree/v0.4.0) (2014-11-12)
|
204
|
+
|
205
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.3.8...v0.4.0)
|
206
|
+
|
207
|
+
**Merged pull requests:**
|
208
|
+
|
209
|
+
- Test is Sidekiq actually running when starting with Capistrano 2 [\#54](https://github.com/seuros/capistrano-sidekiq/pull/54) ([Envek](https://github.com/Envek))
|
210
|
+
- use release\_path instead of current\_path [\#50](https://github.com/seuros/capistrano-sidekiq/pull/50) ([flyerhzm](https://github.com/flyerhzm))
|
211
|
+
- Typo [\#48](https://github.com/seuros/capistrano-sidekiq/pull/48) ([binyamindavid](https://github.com/binyamindavid))
|
212
|
+
- Fix descriptions of monit tasks [\#47](https://github.com/seuros/capistrano-sidekiq/pull/47) ([jgeiger](https://github.com/jgeiger))
|
213
|
+
|
214
|
+
## [v0.3.8](https://github.com/seuros/capistrano-sidekiq/tree/v0.3.8) (2014-09-22)
|
215
|
+
|
216
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.3.7...v0.3.8)
|
217
|
+
|
218
|
+
**Merged pull requests:**
|
219
|
+
|
220
|
+
- Improve @bensie pull request + unmonitor monit while deploy [\#46](https://github.com/seuros/capistrano-sidekiq/pull/46) ([Saicheg](https://github.com/Saicheg))
|
221
|
+
|
222
|
+
## [v0.3.7](https://github.com/seuros/capistrano-sidekiq/tree/v0.3.7) (2014-09-01)
|
223
|
+
|
224
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.3.6...v0.3.7)
|
225
|
+
|
226
|
+
**Merged pull requests:**
|
227
|
+
|
228
|
+
- Start Sidekiq as daemon from Monit [\#40](https://github.com/seuros/capistrano-sidekiq/pull/40) ([dpaluy](https://github.com/dpaluy))
|
229
|
+
- Sidekiq is properly restarted after a crash when deploying with Capsitrano2 [\#39](https://github.com/seuros/capistrano-sidekiq/pull/39) ([tribble](https://github.com/tribble))
|
230
|
+
|
231
|
+
## [v0.3.6](https://github.com/seuros/capistrano-sidekiq/tree/v0.3.6) (2014-08-08)
|
232
|
+
|
233
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.3.5...v0.3.6)
|
234
|
+
|
235
|
+
**Merged pull requests:**
|
236
|
+
|
237
|
+
- If :sidekiq\_config is set, Monit template should use it to start the ser... [\#35](https://github.com/seuros/capistrano-sidekiq/pull/35) ([joshmyers](https://github.com/joshmyers))
|
238
|
+
- replace deploy:restart with deploy:publishing for capistrano 3.1 [\#34](https://github.com/seuros/capistrano-sidekiq/pull/34) ([flyerhzm](https://github.com/flyerhzm))
|
239
|
+
- Fix: test with spaces ignores within [\#33](https://github.com/seuros/capistrano-sidekiq/pull/33) ([rogercampos](https://github.com/rogercampos))
|
240
|
+
- Added \_cset for :sidekiq\_tag [\#32](https://github.com/seuros/capistrano-sidekiq/pull/32) ([OscarBarrett](https://github.com/OscarBarrett))
|
241
|
+
|
242
|
+
## [v0.3.5](https://github.com/seuros/capistrano-sidekiq/tree/v0.3.5) (2014-07-25)
|
243
|
+
|
244
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.3.4...v0.3.5)
|
245
|
+
|
246
|
+
**Merged pull requests:**
|
247
|
+
|
248
|
+
- Allow use of sidekiq\_tag for capistrano2 [\#30](https://github.com/seuros/capistrano-sidekiq/pull/30) ([OscarBarrett](https://github.com/OscarBarrett))
|
249
|
+
|
250
|
+
## [v0.3.4](https://github.com/seuros/capistrano-sidekiq/tree/v0.3.4) (2014-07-09)
|
251
|
+
|
252
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/v0.1.0...v0.3.4)
|
253
|
+
|
254
|
+
**Merged pull requests:**
|
255
|
+
|
256
|
+
- Added concurrency option [\#26](https://github.com/seuros/capistrano-sidekiq/pull/26) ([ungsophy](https://github.com/ungsophy))
|
257
|
+
- Fix bug with process index in monit task [\#21](https://github.com/seuros/capistrano-sidekiq/pull/21) ([0x616E676572](https://github.com/0x616E676572))
|
258
|
+
- You can now use signals to quiet/stop sidekiq, much faster. [\#18](https://github.com/seuros/capistrano-sidekiq/pull/18) ([penso](https://github.com/penso))
|
259
|
+
- Check that current\_path exists before stopping [\#16](https://github.com/seuros/capistrano-sidekiq/pull/16) ([alexdunae](https://github.com/alexdunae))
|
260
|
+
- search pid files in correct directory [\#12](https://github.com/seuros/capistrano-sidekiq/pull/12) ([levinalex](https://github.com/levinalex))
|
261
|
+
- Rolling restart [\#7](https://github.com/seuros/capistrano-sidekiq/pull/7) ([jlecour](https://github.com/jlecour))
|
262
|
+
|
263
|
+
## [v0.1.0](https://github.com/seuros/capistrano-sidekiq/tree/v0.1.0) (2014-03-24)
|
264
|
+
|
265
|
+
[Full Changelog](https://github.com/seuros/capistrano-sidekiq/compare/07b9d97f5bcf08af43baec0924bb088a6486f31c...v0.1.0)
|
266
|
+
|
267
|
+
**Merged pull requests:**
|
268
|
+
|
269
|
+
- Cleaner version checking [\#6](https://github.com/seuros/capistrano-sidekiq/pull/6) ([ghost](https://github.com/ghost))
|
270
|
+
- More robust version checking [\#4](https://github.com/seuros/capistrano-sidekiq/pull/4) ([jlecour](https://github.com/jlecour))
|
271
|
+
- More explicit start command [\#3](https://github.com/seuros/capistrano-sidekiq/pull/3) ([jlecour](https://github.com/jlecour))
|
272
|
+
- Improve pid and log files settings [\#1](https://github.com/seuros/capistrano-sidekiq/pull/1) ([jlecour](https://github.com/jlecour))
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -20,15 +20,15 @@ And then execute:
|
|
20
20
|
require 'capistrano/sidekiq'
|
21
21
|
install_plugin Capistrano::Sidekiq # Default sidekiq tasks
|
22
22
|
# Then select your service manager
|
23
|
-
install_plugin Capistrano::Sidekiq::Systemd
|
24
|
-
# or
|
23
|
+
install_plugin Capistrano::Sidekiq::Systemd
|
24
|
+
# or
|
25
25
|
install_plugin Capistrano::Sidekiq::Upstart # tests needed
|
26
|
-
# or
|
26
|
+
# or
|
27
27
|
install_plugin Capistrano::Sidekiq::Monit # tests needed
|
28
28
|
```
|
29
29
|
|
30
30
|
|
31
|
-
Configurable options
|
31
|
+
Configurable options - Please ensure you check your version's branch for the available settings - shown here with defaults:
|
32
32
|
|
33
33
|
```ruby
|
34
34
|
:sidekiq_roles => :app
|
@@ -36,8 +36,19 @@ Configurable options, shown here with defaults:
|
|
36
36
|
:sidekiq_pid => File.join(shared_path, 'tmp', 'pids', 'sidekiq.pid') # ensure this path exists in production before deploying.
|
37
37
|
:sidekiq_env => fetch(:rack_env, fetch(:rails_env, fetch(:stage)))
|
38
38
|
:sidekiq_log => File.join(shared_path, 'log', 'sidekiq.log')
|
39
|
+
# single config
|
40
|
+
:sidekiq_config => 'config/sidekiq.yml'
|
41
|
+
# per process config - process 1, process 2,... etc.
|
42
|
+
:sidekiq_config => [
|
43
|
+
'config/sidekiq_config1.yml',
|
44
|
+
'config/sidekiq_config2.yml'
|
45
|
+
]
|
46
|
+
:sidekiq_concurrency => 25
|
47
|
+
:sidekiq_queue => %w(default high low)
|
48
|
+
:sidekiq_processes => 1 # number of systemd processes you want to start
|
39
49
|
|
40
50
|
# sidekiq systemd options
|
51
|
+
:sidekiq_service_templates_path => 'config/deploy/templates' # to be used if a custom template is needed (filaname should be #{fetch(:sidekiq_service_unit_name)}.service.capistrano.erb or sidekiq.service.capistrano.erb
|
41
52
|
:sidekiq_service_unit_name => 'sidekiq'
|
42
53
|
:sidekiq_service_unit_user => :user # :system
|
43
54
|
:sidekiq_enable_lingering => true
|
@@ -50,10 +61,11 @@ Configurable options, shown here with defaults:
|
|
50
61
|
:monit_bin => '/usr/bin/monit'
|
51
62
|
:sidekiq_monit_default_hooks => true
|
52
63
|
:sidekiq_monit_group => nil
|
53
|
-
:sidekiq_service_name => "sidekiq_#{fetch(:application)}"
|
64
|
+
:sidekiq_service_name => "sidekiq_#{fetch(:application)}"
|
54
65
|
|
55
66
|
:sidekiq_user => nil #user to run sidekiq as
|
56
67
|
```
|
68
|
+
See `capistrano/sidekiq/helpers.rb` for other undocumented configuration settings.
|
57
69
|
|
58
70
|
## Known issues with Capistrano 3
|
59
71
|
|
@@ -86,6 +98,14 @@ If your deploy user has no need in `sudo` for using monit, you can disable it as
|
|
86
98
|
set :sidekiq_monit_use_sudo, false
|
87
99
|
```
|
88
100
|
|
101
|
+
## Configuring the log files on systems with less recent Systemd versions
|
102
|
+
|
103
|
+
The template used by this project assumes a recent version of Systemd (v240+, e.g. Ubuntu 20.04).
|
104
|
+
|
105
|
+
On systems with a less recent version, the `append:` functionality is not supported, and the Sidekiq log messages are sent to the syslog.
|
106
|
+
|
107
|
+
It's possible to workaround this limitation by configuring the system logger to filter the Sidekiq messages; see [wiki](/../../wiki/Configuring-append-mode-log-files-via-Syslog-NG).
|
108
|
+
|
89
109
|
## Contributing
|
90
110
|
|
91
111
|
1. Fork it
|
data/Rakefile
CHANGED
@@ -1 +1,9 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
+
require 'github_changelog_generator/task'
|
3
|
+
|
4
|
+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
5
|
+
config.user = 'seuros'
|
6
|
+
config.project = 'capistrano-sidekiq'
|
7
|
+
config.issues = false
|
8
|
+
config.future_release = '2.2.0'
|
9
|
+
end
|
data/capistrano-sidekiq.gemspec
CHANGED
@@ -0,0 +1,60 @@
|
|
1
|
+
module Capistrano
|
2
|
+
module Sidekiq::Helpers
|
3
|
+
|
4
|
+
def sidekiq_require
|
5
|
+
if fetch(:sidekiq_require)
|
6
|
+
"--require #{fetch(:sidekiq_require)}"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def sidekiq_config
|
11
|
+
if fetch(:sidekiq_config)
|
12
|
+
"--config #{fetch(:sidekiq_config)}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def sidekiq_concurrency
|
17
|
+
if fetch(:sidekiq_concurrency)
|
18
|
+
"--concurrency #{fetch(:sidekiq_concurrency)}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def sidekiq_queues
|
23
|
+
Array(fetch(:sidekiq_queue)).map do |queue|
|
24
|
+
"--queue #{queue}"
|
25
|
+
end.join(' ')
|
26
|
+
end
|
27
|
+
|
28
|
+
def sidekiq_logfile
|
29
|
+
fetch(:sidekiq_log)
|
30
|
+
end
|
31
|
+
|
32
|
+
def switch_user(role)
|
33
|
+
su_user = sidekiq_user(role)
|
34
|
+
if su_user == role.user
|
35
|
+
yield
|
36
|
+
else
|
37
|
+
as su_user do
|
38
|
+
yield
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def sidekiq_user(role = nil)
|
44
|
+
if role.nil?
|
45
|
+
fetch(:sidekiq_user)
|
46
|
+
else
|
47
|
+
properties = role.properties
|
48
|
+
properties.fetch(:sidekiq_user) || # local property for sidekiq only
|
49
|
+
fetch(:sidekiq_user) ||
|
50
|
+
properties.fetch(:run_as) || # global property across multiple capistrano gems
|
51
|
+
role.user
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def expanded_bundle_path
|
56
|
+
backend.capture(:echo, SSHKit.config.command_map[:bundle]).strip
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
@@ -1,10 +1,13 @@
|
|
1
1
|
module Capistrano
|
2
2
|
class Sidekiq::Systemd < Capistrano::Plugin
|
3
|
+
include Sidekiq::Helpers
|
4
|
+
|
3
5
|
def set_defaults
|
4
|
-
set_if_empty :sidekiq_service_unit_name, 'sidekiq'
|
6
|
+
set_if_empty :sidekiq_service_unit_name, 'sidekiq' # This will change in version 3.0.0 to {application}-sidekiq
|
5
7
|
set_if_empty :sidekiq_service_unit_user, :user # :system
|
6
8
|
set_if_empty :sidekiq_enable_lingering, true
|
7
9
|
set_if_empty :sidekiq_lingering_user, nil
|
10
|
+
set_if_empty :sidekiq_service_templates_path, 'config/deploy/templates'
|
8
11
|
end
|
9
12
|
|
10
13
|
def define_tasks
|
@@ -1,11 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Capistrano
|
2
4
|
class Sidekiq::Upstart < Capistrano::Plugin
|
5
|
+
include Sidekiq::Helpers
|
6
|
+
|
3
7
|
def set_defaults
|
4
|
-
set_if_empty :sidekiq_service_unit_name, 'sidekiq'
|
8
|
+
set_if_empty :sidekiq_service_unit_name, 'sidekiq' # This will change in version 3.0.0 to {application}-sidekiq
|
5
9
|
end
|
6
10
|
|
7
11
|
def define_tasks
|
8
|
-
eval_rakefile File.expand_path('
|
12
|
+
eval_rakefile File.expand_path('../tasks/upstart.rake', __dir__)
|
9
13
|
end
|
10
14
|
end
|
11
15
|
end
|