A Puppet module for managing Chronos.
- Overview
- Setup - The basics of getting started with chronos
- Usage - Configuration options and additional functionality
- Parameters
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
This Puppet module installs the Chronos package, manages the configuration and service, and creates jobs using Chronos' HTTP API.
If you're using r10k or librarian-puppet, add the following to your Puppetfile:
mod 'puppetlabs-chronos', :git => 'git://github.com/puppetlabs/puppetlabs-chronos.git', :ref => 'v0.1.0'
- Manage Chronos configuration files
/etc/default/chronos
and files in the/etc/chronos/conf
directory with options. - Optionally setup the Chronos startup files for systemd or upstart
- Install the Chronos package and ensure the service is running
- Create jobs using the Chronos HTTP API
This module adds a new type and provider, chronos_job
, that will
automatically be copied to nodes using pluginsync.
To install Chronos on a node, simply include the Chronos class:
include chronos
The module does allow for some customizations, but please read the "limitations" section below before using them.
class { 'chronos':
zk_servers => ['10.1.1.1', '10.1.1.2', '10.1.1.1.3'],
package_deps_manage => true,
package_name => 'chronos',
service_name => 'chronos',
options => {
'http_port' => '8080',
}
}
The name of the Chronos package to install. Default: chronos
(Boolean) Should the module try to install the package? Default: true
Package version or the required state. Can be set to the package version or to one of present, installed, absent, latest, purged. Default: present
Override the provider used to install the package. Default: undef
The list of dependency packages used by the chronos_job resource. Default: 'httparty', 'json'
(Boolean) Should the module try to install dependencies? Default: true
The required state of the dependencies. Can be set to the package version or to one of present, installed, absent, latest, purged. Default: present
Override the provider used to install the dependency packages. Default: gem or pe_gem
The name of the Chronos service. Default: chronos
(Boolean) Should the module try to manage the service? Default: true
(Boolean) Should the module start and enable the service, if true, or stop and disable it, if false? Default: true
Override the service provider. Default: undef
The list of Zookeeper servers used by the Mesos services. This list will be converted to the Zookeeper URL. If the empty list is used the option will be disabled. Default ['localhost']
The list of Zookeeper servers used by Chronos to store its state. Will be equal to zk_servers unless defined. Default: undef
The default port for every Zookeeper server. Can be overrided by providing the host like this: "host:port". Default: 2181
The default zk_node used by mesos. Default: mesos
Set to the IP address Chronos service should use to talk to the Mesos master. If left as 127.0.0.1 Chronos will not be able to communicate with remote Mesos master and '0.0.0.0' cannot be used. Default: 127.0.0.1
Additional Java option to run the Chronos service with. Default: '-Xmx512m'
Set this option to the root of your custom Java distribution if you want to use one. Default: undef
Mesos principal name that Chronos should use to authenticate. Default: undef
Mesos principal password that Chronos should use to authenticate. Default: undef
Path to the files used to store the Mesos principal secret. Default: /etc/chronos/auth_secret
Path to the base of Chronos configuration. Default: /etc/chronos
Path to the configuration directory used for Chronos options. Default: /etc/chronos/conf
Path to the main Chronos configuration file. If will be used by the launcher to get environment variables from. Default: /etc/sysconfig/chronos (Debian) or /etc/default/chronos (RedHat)
File mode of all configuration files. Default: 0640
(Boolean) Should the module try to install startup files? Ypu should also set startup_system if you enable this. Default: false
Which startup system should be used. Supported: upstart, systemd Default: undef
(Boolean) Should the module try to install the launcher file? Default: false
Path to the launcher file. Default: /usr/bin/chronos
Path to the actual JAR file. Will be used in the startup files. It's expected that jar file is embedded into the launcher file unless defined. Default: undef
Run the service by this system user in the startup files. User will NOT be created. Default: undef
Run the service by this system group in the startup files. Group will NOT be created. Default: undef
The Hash of custom Chronos configuration options and their values. You can find the complete list of theese options here Default: {}
- This module will not add the Mesosphere repo to the system's package manager. It is recommended that the user manage the repo in a profile, using the puppetlabs/apt or stahnma/epel modules.
- The
chronos_job
type requires that two Ruby Gems are present on the system: httparty and json. Thechronos
class will install these gems, but the "ruby" and "ruby-dev" packages need to be managed separately. - The
zk_servers
params should be set to an empty array if Chronos is being installed on a machine that uses Mesos packages provided by Mesosphere and launcher_manage is disabled. For more information, see mesos/chronos#481
Please see the contributing guidelines.