Skip to content

moonape1226/puppet-nomad

This branch is up to date with RiANOl/puppet-nomad:master.

Folders and files

NameName
Last commit message
Last commit date
Feb 14, 2016
Dec 1, 2016
Aug 17, 2017
Aug 17, 2017
Jun 6, 2019
Dec 2, 2016
Dec 2, 2016
Mar 9, 2017
Feb 14, 2016
Dec 2, 2016
Feb 24, 2016
Mar 9, 2017
Mar 9, 2017
Feb 14, 2016
Feb 14, 2016
Mar 30, 2016
Feb 14, 2016
Sep 3, 2018

Repository files navigation

puppet-nomad

What This Module Affects

  • Installs the nomad daemon (via url or package)
    • If installing from zip, you must ensure the unzip utility is available.
  • Optionally installs a user to run it under
  • Installs a configuration file (/etc/nomad/config.json)
  • Manages the nomad service via upstart, sysv, or systemd

Usage

To set up a single nomad server, with several agents attached: On the server:

class { '::nomad':
	config_hash = {
    'region'     => 'us-west',
    'datacenter' => 'ptk',
    'log_level'  => 'INFO',
    'bind_addr'  => '0.0.0.0',
    'data_dir'   => '/opt/nomad',
    'server'     => {
      'enabled'          => true,
      'bootstrap_expect' => 3,
    }
  }
}

On the agent(s):

class { 'nomad':
  config_hash   => {
    'region'     => 'us-west',
    'datacenter' => 'ptk',
    'log_level'  => 'INFO',
    'bind_addr'  => '0.0.0.0',
    'data_dir'   => '/opt/nomad',
    'client'     => {
      'enabled'    => true,
      'servers'    => [
        "nomad01.your-org.pvt:4647",
        "nomad02.your-org.pvt:4647",
        "nomad03.your-org.pvt:4647"
      ]
    }
  },
}

Disable install and service components:

class { '::nomad':
  install_method => 'none',
  init_style     => false,
  manage_service => false,
  config_hash   => {
    'region'     => 'us-west',
    'datacenter' => 'ptk',
    'log_level'  => 'INFO',
    'bind_addr'  => '0.0.0.0',
    'data_dir'   => '/opt/nomad',
    'client'     => {
      'enabled'    => true,
      'servers'    => [
        "nomad01.your-org.pvt:4647",
        "nomad02.your-org.pvt:4647",
        "nomad03.your-org.pvt:4647"
      ]
    }
  },
}

Limitations

Depends on the JSON gem, or a modern ruby. (Ruby 1.8.7 is not officially supported)

Development

Open an issue or fork and open a Pull Request

Acknowledgement

Must of this module was refactored from Kyle Anderson's great consul module available on the puppet forge. Go give him stars and likes and what not -- he deserves them!

About

Puppet module for managing Nomad

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 53.8%
  • Puppet 24.7%
  • Shell 16.2%
  • HTML 4.9%
  • Makefile 0.4%