cookbook 'uptime', '= 0.1.0'
uptime (3) Versions 0.1.0 Follow0
Installs/Configures fzaninotto/uptime
cookbook 'uptime', '= 0.1.0', :supermarket
knife supermarket install uptime
knife supermarket download uptime
uptime cookbook
This cookbook installs and runs the uptime http service monitoring application and runs it as a non-privileged user.
Supported Platforms
ubuntu - see TODO for notes on running with other platforms
Attributes
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['app_uptime']['repo']['url']</tt></td>
<td>String</td>
<td>Git URL for cloning the application source from</td>
<td><tt>"https://github.com/fzaninotto/uptime.git"</tt></td>
</tr>
<tr>
<td><tt>['app_uptime']['repo']['ref']</tt></td>
<td>String</td>
<td>Git Ref (branch/tag/commit sha) to be checked out</td>
<td><tt>"d9cc96cc835b65577e9bc8c94625eb2706a1b923"</tt></td>
</tr>
<tr>
<td><tt>['app_uptime']['url']</tt></td>
<td>String</td>
<td>URL (with optional port) to bind to - should be 1024 or higher as runs unprivileged</td>
<td><tt>"http://#{node['fqdn']}:3000"</tt></td>
</tr>
<tr>
<td><tt>['app_uptime']['plugins']</tt></td>
<td>Array</td>
<td>An array of bundled plugin names to load</td>
<td><tt>['console', 'patternMatcher', 'httpOptions', 'email']</tt></td>
</tr>
<tr>
<td><tt>['app_uptime']['monitor']</tt></td>
<td>Hash</td>
<td>Keys for any option under the 'monitor' section of config.yml may be set</td>
<td><tt>{"pollingInterval": 10000, "timeout": 5000}</tt></td>
</tr>
<tr>
<td><tt>['app_uptime']['analyzer']</tt></td>
<td>Hash</td>
<td>Keys for any option under the 'analyzer' section of config.yml may be set</td>
<td><tt>{"updateInterval": 60000, "qosAggregationInterval": 600000, "pingHistory": 8035200000}</tt></td>
</tr>
<tr>
<td><tt>['app_uptime']['mongo']['user']</tt></td>
<td>String</td>
<td>MongoDB username</td>
<td><tt>"uptime"</tt></td>
</tr>
<tr>
<td><tt>['app_uptime']['mongo']['password']</tt></td>
<td>String</td>
<td>MongoDB password</td>
<td><tt>A secure randomly generated value by openssl</tt></td>
</tr>
</table>
Usage
uptime::default
Include uptime::default
in your node's run_list
:
{ "run_list": [ "recipe[uptime::default]" ] }
TODO
- Support service configurations for running the uptime process on other platforms
- Add an optional nginx proxy recipe
Testing
This cookbook is tested on ubuntu 12.04 and 14.04
This cookbook has a test kitchen setup to converge the recipes on those platforms locally.
To run those tests:
Setup:
- Install the ruby development dependencies:
gem install bundler && bundle install
- Install vagrant
- Install VirtualBox
vagrant plugin install vagrant-omnibus
vagrant plugin install vagrant-berkshelf
Run:
# Code linting (also run on CI)
rake style
# Integration tests (Not currently run on CI)
kitchen verify all
Contributing
- Fork the repository on Github
- Create a named feature branch (i.e.
add-new-recipe
) - Write you change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request
License and Authors
License: Apachev2
Author:: Jeremy Olliver (jeremy.olliver@gmail.com)
Dependent cookbooks
build-essential >= 0.0.0 |
git >= 0.0.0 |
openssl >= 0.0.0 |
nodejs >= 0.0.0 |
mongodb >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.