Forge Home

dcos

Manage DC/OS nodes

26,678 downloads

300 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.0 (latest)
  • 0.6.0
  • 0.5.1
  • 0.5.0
  • 0.4.3
  • 0.4.1
  • 0.4.0
  • 0.3.1
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.0
released Jun 22nd 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
  • Puppet >= 6.21.0 < 9.0.0
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'deric-dcos', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add deric-dcos
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install deric-dcos --version 1.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

deric/dcos — version 1.0.0 Jun 22nd 2024

puppet-dcos

Puppet
Forge Test Puppet Forge
Downloads

DC/OS nodes management

Features

  • installation from bootstrap server
  • manage agent's attributes
  • provide dcos-version command (and export dcos_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}"

Mesos Resources

Resources offered by Mesos could be limited using MESOS_RESOURCES ENV variable.

Resources attribute:

dcos::agent::resources:
  cpus:
    type: SCALAR
    scalar:
      value: 7.0

will be converted to JSON string that will be passed to mesos-agent

[
  {
    "name": "cpus",
    "type": "SCALAR",
    "scalar": {
      "value": 7.0
    }
  }
]

NOTE: DC/OS merges MESOS_RESOURCES with allocated disk resources.

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.