gor
Version information
This version is compatible with:
- ,
Start using this module
Add this module to your Puppetfile:
mod 'meltwater-gor', '0.4.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-gor
Puppet module for Gor.
Installs Gor, configures an upstart job with the appropriate arguments, and starts the service.
Example usage
Pass some arguments:
class { '::gor':
args => {
'-input-raw' => 'localhost:7999',
'-output-http-header' => 'User-Agent: gor',
'-output-http' => 'https://staging.example.com',
'-output-http-redirects' => 2,
'-output-http-timeout' => '120s'
},
}
The same argument can be specified multiple times by passing an array:
class { '::gor':
args => {
…
'-output-http-method' => [
'GET', 'HEAD', 'OPTIONS'
],
},
}
To install a specific version of the Gor package: check https://github.com/buger/gor/releases
class { '::gor':
version => '0.14.1',
digest_string => '0c0335a323c416569f030f46a7541045',
digest_type => 'md5',
…
}
To install a specific version of the Gor package from a custom source url: check https://github.com/buger/gor/releases
class { '::gor':
version => '0.15.1',
source_url => 'https://github.com/buger/gor/releases/download/v0.15.1/gor_v0.15.1_x64.tar.gz'
digest_string => 'ced467f51da7491a227b871c9894d351',
digest_type => 'md5',
…
}
To install gor to a different bin location:
class { '::gor':
binary_path => '/usr/bin', # default: '/usr/local/bin'
…
}
To set custom environment variables in the start scripts:
class { '::gor':
envvars => {
'GODEBUG' => 'netdns=go',
'FOO' => 'bar',
}
…
}
To run gor under a normal user account and limit gor's memory usage:
class { '::gor':
memory_limit => '100M',
runuser => 'gor',
…
}
To prevent the service from starting:
class { '::gor':
manage_service => false,
…
}
To install the Gor package with a gor service but that can only be started manually:
class { '::gor':
version => '0.14.1',
digest_string => 'ced467f51da7491a227b871c9894d351',
digest_type => 'md5',
manage_service => false,
args => {
'-input-raw' => 'localhost:7999',
'-output-http-header' => 'User-Agent: gor',
'-output-http' => 'https://staging.example.com',
'-output-http-redirects' => 2,
'-output-http-timeout' => '120s'
},
}
To install the Gor package with a gor service running that always send requests to https://staging.example.com
class { '::gor':
version => '0.14.1',
digest_string => 'ced467f51da7491a227b871c9894d351',
digest_type => 'md5',
args => {
'-input-raw' => 'localhost:7999',
'-output-http-header' => 'User-Agent: gor',
'-output-http' => 'https://staging.example.com',
'-output-http-redirects' => 2,
'-output-http-timeout' => '120s'
},
}
License
See LICENSE file.
2016-07-27 Release 0.3.0
- Support command-line options which don't have values
- Support Puppet 3.8
- Upgrade test dependencies
- Support ability to pass in environment variables
- Support explicitly setting binary path
2014-03-26 Release 0.2.0
- Disable
hasrestart
to pick up argument changes.
2014-01-16 Release 0.1.2
- File extension for upstart config.
2014-01-16 Release 0.1.1
- Sort argument hash order.
2014-01-16 Release 0.1.0
- Expose
service_ensure
param. - Allow an argument to be called multiple times.
2014-01-07 Release 0.0.1
- Initial release.
Dependencies
- puppetlabs-stdlib (>= 2.2.0)
- camptocamp-archive (>= 0.8.1)
The MIT License (MIT) Copyright (c) 2014 Government Digital Service Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.