Puppet Class: mesos
- Inherited by:
-
mesos::install
- Defined in:
- manifests/init.pp
Overview
Class: mesos
This module manages mesos
Parameters: none
Actions:
Requires: see Modulefile
Sample Usage: class
ensure => present,
install_deps = true,
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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'manifests/init.pp', line 17
class mesos(
$ensure = 'latest',
$url = 'https://github.com/apache/mesos.git',
$mvn_url = 'http://mirrors.hostingromania.ro/apache.org/maven/maven-3/3.3.1/binaries/apache-maven-3.3.1-bin.tar.gz',
$libnlUrl = 'http://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz',
$libnlSrcDir = '/tmp/libnl3',
$libnlConfigParams = '--prefix=/usr --sysconfdir=/etc --disable-static',
$mvn_dir = '/opt/maven',
$branch = '0.22.0',
$sourceDir = '/opt/mesos',
$mesosConfigParams = '--enable-optimize',
$manage_user = true,
$user = 'root',
$install_deps = true,
$java_package = 'java-1.8.0-openjdk',
$install_master = false,
$masterServiceName = 'mesos-master',
$masterLogDir = '/var/log/mesos-master',
$masterWorkDir = '/var/lib/mesos-master',
$install_slave = false,
$network_isolation = false,
$slaveServiceName = 'mesos-slave',
$slaveLogDir = '/var/log/mesos-slave',
$slaveWorkDir = '/var/lib/mesos-slave',
$masterOptions = hiera('mesosMasterConfig',{ }),
$slaveOptions = hiera('mesosSlaveConfig',{ }),
$installDocker = true,
$dockerVersion = 'latest',
$dockerDNS = '8.8.8.8',
$dockerSocketBind = '/var/run/docker.sock',
$manage_firewall = false,
$force_install = false
) {
validate_string($url,$mvn_url,$libnlUrl,$libnlConfigParams,$branch,$java_package,$masterServiceName,$slaveServiceName,$dockerVersion,$dockerDNS,$mesosConfigParams)
validate_absolute_path($sourceDir, $masterLogDir,$masterWorkDir,$slaveLogDir,$slaveWorkDir, $libnlSrcDir,$dockerSocketBind)
validate_bool($manage_user,$install_deps,$install_master,$install_slave,$installDocker, $manage_firewall, $network_isolation, $force_install)
validate_hash($masterOptions,$slaveOptions)
if $slaveOptions != undef and $slaveOptions['IP'] != undef {
if !has_interface_with('ipaddress', $slaveOptions['IP']) {
fail('The specified IP does not belong to this host.')
}
}
if $masterOptions != undef and $masterOptions['IP'] != undef {
if !has_interface_with('ipaddress', $masterOptions['IP']) {
fail('The specified does not belong to this host.')
}
}
anchor { 'mesos:install:start': } ->
class { 'mesos::install': }->
anchor { 'mesos:install:end': }
if($install_master == true) {
anchor { 'mesos:master:start': }
mesos::resources::master{ $::fqdn: } ->
anchor { 'mesos:master:end': }
}
if($install_slave == true) {
anchor { 'mesos:slave:start': }
mesos::resources::slave{ $::fqdn: }->
anchor{ 'mesos:slave:end': }
}
}
|