{"id":15013947,"url":"https://github.com/deric/puppet-mesos","last_synced_at":"2025-10-23T15:22:03.110Z","repository":{"id":8079129,"uuid":"9492253","full_name":"deric/puppet-mesos","owner":"deric","description":"Puppet module for managing Mesos nodes","archived":false,"fork":false,"pushed_at":"2020-01-04T08:14:41.000Z","size":518,"stargazers_count":69,"open_issues_count":4,"forks_count":59,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-12T05:53:26.478Z","etag":null,"topics":["mesos","puppet"],"latest_commit_sha":null,"homepage":"https://forge.puppetlabs.com/deric/mesos","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deric.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-17T07:52:57.000Z","updated_at":"2024-06-18T17:05:43.000Z","dependencies_parsed_at":"2022-09-02T13:41:05.234Z","dependency_job_id":null,"html_url":"https://github.com/deric/puppet-mesos","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deric%2Fpuppet-mesos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deric%2Fpuppet-mesos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deric%2Fpuppet-mesos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deric%2Fpuppet-mesos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deric","download_url":"https://codeload.github.com/deric/puppet-mesos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525156,"owners_count":21118616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mesos","puppet"],"created_at":"2024-09-24T19:44:59.277Z","updated_at":"2025-10-23T15:22:03.020Z","avatar_url":"https://github.com/deric.png","language":"Ruby","funding_links":[],"categories":["Deployment"],"sub_categories":["Puppet"],"readme":"# Mesos Puppet Module\n[![Puppet\nForge](http://img.shields.io/puppetforge/v/deric/mesos.svg)](https://forge.puppetlabs.com/deric/mesos) [![Build Status](https://travis-ci.org/deric/puppet-mesos.png)](https://travis-ci.org/deric/puppet-mesos) [![Puppet Forge\nDownloads](http://img.shields.io/puppetforge/dt/deric/mesos.svg)](https://forge.puppetlabs.com/deric/mesos/scores)\n\n*COMPATIBILITY NOTE:* current version (0.6.x) requires `puppetlabs-apt \u003e= 2.1.0` which has significantly refactored API (doesn't matter if you don't wanna use Mesosphere APT repo).\n\n| `deric-mesos`| Puppet 3.x    | Puppet 4.x   | Puppet 5.x |\n| ------------ | ------------- |--------------| -----------|\n| `0.9.x`      | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| `1.x.x`      | :x:           | :heavy_check_mark: | :heavy_check_mark: |\n\nFor installing master\n\n```puppet\nclass{'mesos':\n  repo =\u003e 'mesosphere',\n  zookeeper =\u003e [ '192.168.1.1', '192.168.1.2', '192.168.1.3'],\n}\n\nclass{'mesos::master':\n  work_dir =\u003e '/var/lib/mesos',\n  options =\u003e {\n    quorum   =\u003e 2\n  }\n}\n```\nFrom ZooKeeper array an URI is created `zk://192.168.1.1:2181,192.168.1.2:2181,192.168.1.3:2181/mesos`. In order to customize this use either `server:port` or see `zk_path` and `zk_default_port` variable.\n\nExample slave configuration:\n\n```puppet\nclass{'mesos::slave':\n  attributes =\u003e {\n    'env' =\u003e 'production',\n  },\n  resources =\u003e {\n    'ports' =\u003e '[10000-65535]'\n  },\n  options   =\u003e {\n    'isolation'      =\u003e 'cgroups/cpu,cgroups/mem',\n    'containerizers' =\u003e 'docker,mesos',\n    'hostname'       =\u003e $::fqdn,\n  }\n}\n```\n\nfor using Hiera and other options see below.\n\n\n## Shared parameters\n\nParameters:\n\n - `zookeeper` - Array of ZooKeeper servers (with port) which is used for slaves connecting to the master and also for leader election, e.g.:\n   - single ZooKeeper: `127.0.0.1:2181` (which isn't fault tolerant)\n        - multiple ZooKeepers: `[ '192.168.1.1:2181', '192.168.1.2:2181', '192.168.1.3:2181']` (usually 3 or 5 ZooKeepers should be enough)\n        - ZooKeeper URL will be stored in `/etc/mesos/zk`, `/etc/default/mesos-master` and/or `/etc/default/mesos-slave`\n - `conf_dir` - directory with simple configuration files containing master/slave parameters (name of the file is a key, contents its value)\n        - this directory will be completely managed by Puppet\n - `env_var` - shared master/slave execution environment variables (see example under slave)\n - `version` - install specific version of Mesos\n - `manage_python` - Control whether mesos module should install python\n - `manage_zk_file` - Control whether module manages /etc/mesos/zk (default: true)\n - `manage_service` - Whether Puppet should ensure service state (applies to `mesos-master` and `mesos-slave`) (default: `true`)\n - `single_role` - When enabled each machine is expected to run either master or slave service (default: `true`)\n - `manage_service_file` Provide custom service definition - only `systemd` is supported right now (default: `false`)\n - `systemd_after` Ensures that the configured unit is started after the listed unit finished starting up (default: `network.target`)\n - `systemd_wants` If this unit gets activated, the units listed here will be activated as well (default: `network.target`)\n\n### Master\n\n  Should be as simple as this, on master node:\n\n  ```puppet\nclass{'mesos::master': }\n```\noptionally you can specify some parameters or it is possible to configure Mesos via Hiera (see below).\n\n```puppet\nclass{'mesos::master':\n  master_port =\u003e 5050,\n  work_dir =\u003e '/var/lib/mesos',\n  options =\u003e {\n    quorum   =\u003e 4\n  }\n}\n```\n\n  For slave you have to specify either `master`\n\n```puppet\nclass{'mesos::slave':\n  master =\u003e '192.168.1.1'\n}\n```\nor `zookeeper` node(s) to connect:\n```puppet\nclass{'mesos::slave':\n  zookeeper =\u003e ['192.168.1.1:2181', '192.168.1.2:2181', '192.168.1.3:2181']\n}\n```\n - `conf_dir` default value is `/etc/mesos-master` (this directory will be purged by Puppet!)\n \t- for list of supported options see `mesos-master --help`\n - `env_var` - master's execution environment variables (see example under slave)\n - `acls` - hash of mesos acls, `{\"permissive\" =\u003e true, \"register_frameworks\" =\u003e [..]}` (default: `{}`)\n - `acls_file` - path to file to store acls (default: `/etc/mesos/acls`)\n - `credentials` - array of mesos credentials, `[{'principal' =\u003e 'some-principal', 'secret' =\u003e 'some-secret'}]` (default: `[]`)\n - `credentials_file` - path to file to store credentials (default: `/etc/mesos/master-credentials`)\n - `syslog_logger` - whether to log the Mesos service's output to syslog - note that if this parameter is false then it is up to your init system to log the process's output and if Mesos fails to start properly it will not produce log files of its own (default: true)\n\n#### listen address\n\nBy default Mesos will bind to `0.0.0.0`. If you want to change the IP address Mesos is binding to, you can either provide a Puppet Fact:\n\n```puppet\nclass{'mesos::master':\n  listen_address =\u003e $::ipaddress_eth0\n}\n```\nor directly use some IP address:\n\n```puppet\nclass{'mesos::master':\n  listen_address =\u003e '192.168.1.1'\n}\n```\n\nNote that Facter 2 will contain incorrect IP address in `$::ipaddress` fact when Docker is installed. See [FACT-380](https://tickets.puppetlabs.com/browse/FACT-380) for more information.\n\nBy default no IP address is set, which means that Mesos will use IP to which translates `hostname -f` (you can influence bind address simply in `/etc/hosts`).\n\n\n### Slave\n\n - `enable` - install Mesos slave service (default: `true`)\n - `port` - slave's port for incoming connections (default: `5051`)\n - `master`- ip address of Mesos master (default: `localhost`)\n - `master_port` - Mesos master's port (default: `5050`)\n - `work_dir` - directory for storing task's temporary files (default: `/var/lib/mesos`)\n - `env_var` - slave's execution environment variables - a Hash, if you are using\n Java, you might need e.g.:\n - `principal` - mesos principal used for auththentication\n - `secret` - secret used for auththentication\n - `credentials_file` - path to file to store credentials (default: `/etc/mesos/slave-credentials`)\n - `syslog_logger` - whether to log the Mesos service's output to syslog (default: true)\n\n```puppet\nclass{'mesos::slave':\n  master  =\u003e '192.168.1.1',\n  env_var =\u003e {\n    'JAVA_HOME' =\u003e '/usr/bin/java'\n  }\n}\n```\n\nin a similar manner you can specify cgroups isolation:\n\n```puppet\nclass{'mesos::slave':\n  zookeeper  =\u003e 'zk://192.168.1.1:2181/mesos',\n  isolation  =\u003e 'cgroups/cpu,cgroups/mem',\n  cgroups    =\u003e {\n    'hierarchy' =\u003e '/sys/fs/cgroup',\n    'root'      =\u003e 'mesos',\n  }\n}\n```\n - `conf_dir` default value is `/etc/mesos-slave` (this directory will be purged by Puppet!)\n        - for list of supported options see `mesos-slave --help`\n\n## File based configuration\n\nAs Mesos configuration flags changes with each version we don't provide directly a named parameter for each flag. `mesos::property` allows to create a parameter file. e.g. configure value in `/etc/mesos-slave/hostname`:\n\n```puppet\nmesos::property { 'hostname':\n  value  =\u003e 'mesos.hostname.com',\n  dir    =\u003e '/etc/mesos-slave',\n  notify =\u003e Service['mesos-slave']\n}\n```\n\nRemove this file simply use the `ensure` parameter:\n\n```puppet\nmesos::property { 'hostname':\n  ensure =\u003e absent,\n  dir    =\u003e '/etc/mesos-slave',\n  notify =\u003e Service['mesos-slave']\n}\n```\n\nThis is equivalent approach to\n\n```puppet\nclass{'mesos::slave':\n  options =\u003e {\n    'hostname' =\u003e 'mesos.hostname.com'\n  }\n}\n```\nwhich will create a file `/etc/mesos-slave/hostname` with content `mesos.hostname.com` (where `/etc/mesos-slave` is a slave's `$conf_dir`).\n\nYet another option would be to pass this value via Hiera (see the section below).\n\n\n### Boolean flags\n\nCurrent Mesos packages recognizes boolean flags like `--[no-]quiet` via files named as `/etc/mesos-slave/?quiet` for `--quiet` (true) and `/etc/mesos-slave/?no-quiet` for false value.\n\n```puppet\nclass{'mesos::slave':\n  options =\u003e {\n    'quiet' =\u003e true\n  }\n}\n```\n\n *since 0.4.1*\n\n## Mesos Standalone\n\nStandalone mode (non-HA) is useful for testing, it does not require ZooKeeper URI, nor `quorum` variable. If you are running both master and slave on the same node, make sure you disable `single_role` parameter:\n\n```puppet\nclass{'::mesos':\n  single_role =\u003e false,\n}\n```\n\n## Hiera support\n\nAll configuration could be handled by Hiera. Simple parameter are looked up by default in Puppet 3, however hashes won't get merged. In order to merge options from multiple Hiera files set `mesos::use_hiera: true`.\n\nEither specify one master\n\n```yaml\nmesos::master      : '192.168.1.1'\n```\n\n  or [Zookeeper](http://zookeeper.apache.org/) could be use for a fault-tolerant setup (multiple instances of zookeeper are separated by comma):\n\n```yaml\nmesos::zookeeper:\n  - '192.168.1.1:2181'\n  - '192.168.1.2:2181'\n  - '192.168.1.3:2181'\n```\n\nSome parameters are shared between master and slave nodes:\n\n```yaml\nmesos::master_port : 5050\nmesos::log_dir     : '/var/log/mesos'\nmesos::conf_dir    : '/etc/mesos'\nmesos::owner       : 'mesos'\nmesos::group       : 'mesos'\n```\n\nOther are master specific:\n\n```yaml\nmesos::master::cluster     : 'my_mesos_cluster'\nmesos::master::whitelist   : '*'\n```\n\nor slave specific:\n\n```yaml\nmesos:slave::env_var:\n  JAVA_HOME: '/usr/bin/java'\n```\n\nMesos service reads configuration either from ENV variables or from configuration files wich are stored in `/etc/mesos-slave` resp. `/etc/mesos-master`. Hash passed via `options` will be converted to config files. Most of the options is possible to configure this way:\n\n```yaml\nmesos::master::options:\n  webui_dir: '/usr/local/share/mesos/webui'\n  quorum: '4'\n```\n\nyou can also use facts from Puppet:\n\n```\nmesos::master::options:\n  hostname: \"%{::fqdn}\"\n```\n\n\ncgroups with Hiera:\n\n```yaml\nmesos::slave::isolation: 'cgroups/cpu,cgroups/mem'\nmesos::slave::cgroups:\n  hierarchy: '/sys/fs/cgroup'\n```\n\nLimit resources used by Mesos slave:\n\n```yaml\nmesos::slave::resources:\n  cpus: '10'\n```\n\n### Mesos CLI\n\nMesos command line interface is written in Python (currently supports 2.6 and 2.7). The CLI provides serveral useful commands like `mesos ps` ,`mesos ls`. For complete list see [CLI documentation](https://pypi.python.org/pypi/mesos.cli).\n\nBy default CLI is not installed with master nor slave, you should enable this manually by including\n\n```puppet\nclass{'mesos::cli':\n  debug            =\u003e false,\n  response_timeout =\u003e 5,\n}\n```\n\non any machine that can connect to mesos-master and mesos-slaves.\n\n\n### Python installation\n\nPython is required for Mesos Web UI and for CLI as well. Installing Python with Mesos should be responsibility of binary packages (Mesos could be build without UI), therefore this behaviour is not enabled by default.\n\nYou can enable this feature with following:\n\n```puppet\nclass{'mesos':\n  manage_python =\u003e true\n}\n```\n\nor change Python package name, to match your needs:\n\n```puppet\nclass{'mesos':\n  manage_python =\u003e true,\n  python_package =\u003e 'python-dev'\n}\n```\n\n\n### Software repository\n\nSoftware repositories could be enabled by defining a source:\n\n```yaml\nmesos::repo: 'mesosphere'\nmesos::manage_repo: true\n```\n\nor in Puppet code:\n\n```puppet\nclass{'mesos':\n  repo        =\u003e 'mesosphere',\n  manage_repo =\u003e true,\n}\n```\n\nby default this feature is enabled and right we support [mesosphere.io](http://mesosphere.io) repositories for:\n\n  * Debian/Ubuntu\n  * RedHat/CentOS\n\nFeel free to send PR for other distributions/package sources.\n\n#### Custom APT repository\n\nDefault APT repository is configured following way:\n\n```puppet\nclass{'mesos':\n  repo =\u003e {\n    location =\u003e \"http://repos.mesosphere.io/${osfamily}\",\n    release  =\u003e $::lsbdistcodename,\n    repos    =\u003e 'main',\n    key      =\u003e {\n      'id'     =\u003e '81026D0004C44CF7EF55ADF8DF7D54CBE56151BF',\n      'server' =\u003e 'keyserver.ubuntu.com',\n    },\n    include  =\u003e {\n      'src' =\u003e false\n    },\n  }\n}\n```\nwhere the `repo` hash is passsed to `apt::source` (from offcial [apt module](https://github.com/puppetlabs/puppetlabs-apt#add-an-apt-source-to-etcaptsourceslistd)).\n\nIn case you want to override some settings, only the modified values needs to be passed e.g.:\n\n```puppet\nclass{'mesos':\n  repo =\u003e {\n    location =\u003e \"http://myrepo.example.com\",\n    key      =\u003e {\n      'id'     =\u003e '{mykey}',\n      'server' =\u003e 'keyserver.ubuntu.com',\n    },\n  }\n}\n```\n\n*since 0.8.2*\n\n### Overriding service providers\n\nSome Mesos packages does not respect conventions on given OS for starting services. For both `mesos::master` and `mesos::slave` you can specify mechanism which will be used for starting services.\n\n```puppet\nclass{'mesos::master':\n  service_provider =\u003e 'upstart'\n}\n```\n\nIf you want to create the service resource yourself, set `service_provider` to `none`.\n\nSome reasonable values are:\n\n  * `init`\n  * `upstart` - e.g. Ubuntu\n  * `systemd`\n  * `runit`\n  * `none` - service won't be installed\n  * `undef` - (default) detected provider by Puppet\n\nA custom `systemd` configuration example:\n\n```puppet\nclass{'mesos::master':\n  service_provider    =\u003e 'systemd',\n  manage_service_file =\u003e true,\n  systemd_wants       =\u003e 'network.target zookeeper.service',\n  systemd_after       =\u003e 'network.target zookeeper.service',\n}\n```\n\n### Packages\n\nYou can build package by yourself and upload package to your software repository. Or use packages from mesosphere.io:\n\n  * Debian/Ubuntu\n    * [mesosphere packages](http://mesosphere.io/downloads/)\n  * RedHat/CentOS\n    * [mesosphere packages](http://mesosphere.io/downloads/)\n\n## Requirements\n\n  * Puppet \u003e 3.0 and \u003c 5.0\n\n## Dependencies\n\n  * [stdlib](https://forge.puppetlabs.com/puppetlabs/stdlib) version `\u003e= 4.2.0` - we need function `is_bool`\n  * [apt](https://github.com/puppetlabs/puppetlabs-apt) version `\u003e= 2.1.0` is required for Debian servers (since puppet-mesos 0.6)\n\n## Installation\n\nPreferred installation is via [puppet-librarian](https://github.com/rodjek/librarian-puppet) just add to `Puppetfile`:\n\n```ruby\nmod 'deric/mesos', '\u003e= 0.6.0'\n```\n\nfor latest version from git:\n```ruby\nmod 'deric/mesos', :git =\u003e 'git://github.com/deric/puppet-mesos.git'\n```\n\n## Acceptance testing\n\nFastest way is to run tests on prepared Docker images:\n```\nBEAKER_set=debian9-5.5 bundle exec rake acceptance\n```\nFor examining system state set Beaker's ENV variable `BEAKER_destroy=no`:\n\n```\nBEAKER_destroy=no BEAKER_set=debian9-6.3 bundle exec rake acceptance\n```\nand after finishing tests connect to container:\n\n## Links\n\nFor more information see [Mesos project](http://mesos.apache.org/)\n\n## License\n\nApache License 2.0\n\n\n## Contributors\n\nAlphabetical list of contributors (not necessarily up-to-date), generated by command `git log --format='%aN' | sort -u | sed -e 's/^/\\- /'`:\n\n- Andrew Teixeira\n- Chris Rebert\n- Felix Bechstein\n- Ian Burrell\n- Jamie Hewland\n- jfarrell\n- Jing Dong\n- Konrad Scherer\n- krall\n- Kyle Anderson\n- Maksym Melnychok\n- Oriol Fitó\n- Paul Otto\n- Rhommel Lamas\n- Sam Stoelinga\n- Sean McLaughlin\n- Sophie Haskins\n- Tadas Vilkeliskis\n- taik0\n- Tomas Barton\n- Tom Stockton\n- William Leese\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderic%2Fpuppet-mesos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderic%2Fpuppet-mesos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderic%2Fpuppet-mesos/lists"}