puppet-dcos
DC/OS nodes management
Features
- installation from bootstrap server
- manage agent's attributes
- provide
dcos-version
command (and exportdcos_version
fact e.g. to PuppetDB) - support running DC/OS on Debian based systems
Installation from bootstrap server
When bootstrap URL is given, Puppet will try to install DC/OS (in case that there's no previous installation in /opt/mesosphere
):
dcos::bootstrap_url: 'http://192.168.1.1:9090'
# checksum of dcos_install.sh
dcos::install_checksum:
type: 'sha1'
hash: '43d6a53813bd9c68e26d0b3b8d8338182017dbb8'
then simply include DC/OS into node's definition. For master node:
include dcos::master
For agent:
include dcos::agent
Puppet will fetch $bootstrap_script
(defaults to dcos_install.sh
) and attempt to run Advanced installation e.g. bash dcos_install.sh slave
.
Role slave_public
can be also configured in Hiera backend:
dcos::agent::public: true
You can also provide checksums for installation script:
class {'dcos':
bootstrap_url => 'http://192.168.1.1:9090',
install_checksum => {
type => 'sha1',
hash => '43d6a53813bd9c68e26d0b3b8d8338182017dbb8'
},
}
Usage
Private DC/OS agent:
class{'dcos::agent': }
Public agent:
class{'dcos::agent':
public => true
}
Agent accepts mesos
hash with ENV
variables that will override defaults in /opt/mesosphere/etc/mesos-slave-common
.
Disabling CFS on agent node:
class{'dcos::agent':
mesos => {
'MESOS_CGROUPS_ENABLE_CFS' => false
}
}
Master node:
class{'dcos::master':
mesos => {
'MESOS_QUORUM' => 2,
'MESOS_max_completed_frameworks' => 50,
'MESOS_max_completed_tasks_per_framework' => 1000,
'MESOS_max_unreachable_tasks_per_framework' => 1000,
}
}
mesos
hash will create a file /opt/mesosphere/etc/mesos-master-extras
overriding default ENV
variables.
attributes:
dcos::agent::attributes:
dc: us-east
storage: SATA
also existing facts can be easily used:
dcos::agent::attributes:
arch: "%{::architecture}"
hostname: "%{::fqdn}"
YAML (Hiera/lookup) configuration
Simply use supported parameters:
dcos::agent::mesos:
MESOS_CGROUPS_ENABLE_CFS: false
dcos::master::mesos:
MESOS_QUORUM: 2
Limitations
Currently doesn't manage Docker dependency at all. Make sure appropriate Docker version is running before installing DC/OS.