-
Notifications
You must be signed in to change notification settings - Fork 1
/
CONFIGURE.txt
62 lines (44 loc) · 1.95 KB
/
CONFIGURE.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Configuring the Ruby, Perl, and Apache processes.
With the addition of Perl and Apache workers, there's been a slight change to the director.yml configuration
file. Each configuration now requires a key 'type' that specifies what type of worker
you are trying to start. Here's a example of a configuration for each in the director.yml file:
Ruby (rake) worker:
collector_high:
pidfile: "tmp/pids/collector_high.pid"
command: "collector:high:start_detached"
phonehome: "director_console@drone"
restart:
try: 3
seconds: 600
type: "ruby"
NOTE: the only change to the Ruby settings is the addition of the 'type' key. For Ruby workers need to set
this to 'ruby'. Note: all lower case.
Perl worker:
manager1:
command: "test1.pl"
basedir: "/Users/dbryson/projects/worker_framework/src"
phonehome: "director_console@dave-brysons-macbook-pro"
restart:
try: 3
seconds: 600
type: "perl"
Apache Monitor:
apache:
basedir: "FULL PATH TO THE DIRECTORY CONTAINING THE SHELL RESTART SCRIPT. Ex: /home/user/script"
command: "NAME OF THE *SHELL* SCRIPT TO USE. Ex: restart_apache.sh"
url: "URL OF THE WEB SERVER TO MONITOR. Ex: http://drone.mitre.org/"
phonehome: "director_console@drone"
restart:
try: 3
seconds: 600
type: "http"
There are a couple differences here in the configuration keys:
command: this should be the name of the perl or apache restart script to run.
basedir: this is the root directory where the perl/apache script lives. This should be a full path to the
script and the Perl/Apache script DOES NOT need to live under the "applications" folder. It can be
anywhere on the OS that's readable/executable
type: should be "perl" or "http" (for the apache monitor)
To start a worker with a Perl script it's the same as starting a Rake worker. Example:
./bin/node -A drone -C manager1
where 'drone' is the application with the config/director.yml file and 'manager1' is the configuration key
for the script.