forked from arunjax/cookbooks-1
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
a number of improvements and fixes to the new mms-agent recipe:
- fix the cookbook name in runit - adds 2 new attributes: mongodb.mms_agent.{install_dir, log_dir} to customize the agent - forces the use of the standard community runit cookbook - only restarts the agent service if a change has been detected - sets two new 'dynamic' attributes for reference: mongodb.mms_agent.{version, checksum} note that the last (bounce on change) required quite a bit of extra work because it always downloads the zip; most of this can be removed when the issue is resolved by the mms mongo team
- Loading branch information
1 parent
29dcbaa
commit 28aaaa6
Showing
7 changed files
with
81 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
default['mongodb']['mms_agent']['api_key'] = '' | ||
default['mongodb']['mms_agent']['secret_key'] = '' | ||
default[:mongodb][:mms_agent][:api_key] = "" | ||
default[:mongodb][:mms_agent][:secret_key] = "" | ||
|
||
default[:mongodb][:mms_agent][:install_dir] = "/usr/local/share" | ||
default[:mongodb][:mms_agent][:log_dir] = "#{node[:mongodb][:logpath]}/agent" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/bin/sh | ||
exec svlogd -tt ./main | ||
|
||
exec svlogd -tt <%= @options[:mms_agent_log_dir] %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
cd /usr/local/share/mms-agent/ | ||
cd <%= @options[:mms_agent_install_dir] %> | ||
|
||
exec 2>&1 | ||
exec chpst -u root:root python /usr/local/share/mms-agent/agent.py 2>&1 | ||
exec chpst -u root:root python <%= @options[:mms_agent_install_dir] %>/mms-agent/agent.py 2>&1 |