thinking-sphinx-monit 1.0 → 1.0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 300dc2fd9d4e326914bcb2b2afc79ee0965bd4b3
|
4
|
+
data.tar.gz: 66197d1062459534c8a169b4f76c743c462a22ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50888d55d11726142c0f950f156b916c3786ce944c29a655dae04952d47f359e3810227e4cdf9029fea2062e591cc8822451ae1244ef911d95b380177f2da10c
|
7
|
+
data.tar.gz: c4dc3b147b66dae5af424d6594cfa1f6ad46d7a527f2f32620879d94b6ab2de16a021b105392ed3f25b5edd78aa2e1c856112d84f60d32a2ddde30d71984bae1
|
data/README.md
CHANGED
@@ -18,7 +18,12 @@ Add to your capfile following line:
|
|
18
18
|
# Capfile
|
19
19
|
require 'thinking_sphinx_monit/capistrano'
|
20
20
|
```
|
21
|
-
|
21
|
+
Before any other action please first deploy your app to server (needed for all stages which you want to use):
|
22
|
+
```ruby
|
23
|
+
cap <stage> deploy
|
24
|
+
```
|
25
|
+
|
26
|
+
Then you can specify thinking sphinx hooks in your deploy.rb, for example like this:
|
22
27
|
```ruby
|
23
28
|
before 'deploy:updating', 'thinking_sphinx:stop'
|
24
29
|
after 'deploy:published', 'thinking_sphinx:start'
|
@@ -31,7 +36,7 @@ before 'thinking_sphinx:stop', 'thinking_sphinx_monit:unmonitor'
|
|
31
36
|
after 'thinking_sphinx:start', 'thinking_sphinx_monit:monitor'
|
32
37
|
```
|
33
38
|
|
34
|
-
Of course you can do everything manually
|
39
|
+
Of course you can do everything manually:
|
35
40
|
```ruby
|
36
41
|
cap thinking_sphinx_monit:config # Generates Thinking Sphinx monit-service
|
37
42
|
cap thinking_sphinx_monit:monitor # Monitor Thinking Sphinx monit-service
|
@@ -12,7 +12,7 @@ namespace :thinking_sphinx_monit do
|
|
12
12
|
on roles(fetch(:thinking_sphinx_roles)) do |role|
|
13
13
|
within current_path do
|
14
14
|
with rails_env: fetch(:thinking_sphinx_rails_env) do
|
15
|
-
execute :rake, "ts_monit:config[#{role.user},#{fetch(:thinking_sphinx_use_sudo)},#{fetch(:tmp_dir)},#{fetch(:thinking_sphinx_monit_conf_dir)},#{fetch(:thinking_sphinx_monit_bin)},#{ts_monit_service_name}
|
15
|
+
execute :rake, "ts_monit:config[#{role.user},#{fetch(:thinking_sphinx_use_sudo)},#{fetch(:tmp_dir)},#{fetch(:thinking_sphinx_monit_conf_dir)},#{fetch(:thinking_sphinx_monit_bin)},#{ts_monit_service_name}]"
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
@@ -3,13 +3,12 @@ require 'thinking-sphinx'
|
|
3
3
|
namespace :ts_monit do
|
4
4
|
|
5
5
|
desc 'Generates Thinking Sphinx monit-service'
|
6
|
-
task :config, [:user, :sudo, :tmp_dir, :monit_conf_dir, :monit_bin, :service_name
|
6
|
+
task :config, [:user, :sudo, :tmp_dir, :monit_conf_dir, :monit_bin, :service_name] => [:environment] do |_, args|
|
7
7
|
@searchd = searchd
|
8
8
|
@config_path = config.configuration_file
|
9
9
|
@ts_pid_file = config.searchd.pid_file
|
10
10
|
@user = args.user
|
11
11
|
@service_name = args.service_name
|
12
|
-
@rails_env = args.env
|
13
12
|
template_sphinx 'ts_monit.conf', "#{args.tmp_dir}/ts_monit.conf"
|
14
13
|
sudo_if_needed args.sudo, "mv #{args.tmp_dir}/ts_monit.conf #{args.monit_conf_dir}"
|
15
14
|
sudo_if_needed args.sudo, "#{args.monit_bin} reload"
|
@@ -3,5 +3,5 @@
|
|
3
3
|
#
|
4
4
|
check process <%= @service_name %>
|
5
5
|
with pidfile "<%= @ts_pid_file %>"
|
6
|
-
start program = "/usr/bin/sudo -iu <%= @user %> /bin/bash -c '<%= @searchd %> --pidfile --config <%= @config_path %>
|
7
|
-
stop program = "/usr/bin/sudo -iu <%= @user %> /bin/bash -c '<%= @searchd %> --pidfile --config <%= @config_path %> --stopwait
|
6
|
+
start program = "/usr/bin/sudo -iu <%= @user %> /bin/bash -c '<%= @searchd %> --pidfile --config <%= @config_path %>'"
|
7
|
+
stop program = "/usr/bin/sudo -iu <%= @user %> /bin/bash -c '<%= @searchd %> --pidfile --config <%= @config_path %> --stopwait'"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thinking-sphinx-monit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michal Mrozek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|