deric / puppet-mesos

Puppet module for managing Mesos nodes

Home Page:https://forge.puppetlabs.com/deric/mesos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide binary package in puppet module

samos123 opened this issue · comments

I think it would be better to add a binary package by default for the systems where there is a package available. If you want the package to be configurable you can provide a configuration for this. Doesn't seem nice to just list "have this package already installed" as a requirement.

Just to make it clear:

 ensure => 'present'

only states that Puppet will ensure, that the requested package is present. That means any version of the package is fine, if it is not installed Puppet will try to install the package. You can use ensure => '0.20' to make sure, that all nodes have the same version. It is up to you how you will distribute the package:

  • use some Mesos package repository
  • create own APT/YUM/... software repository which will be available at your system
  • use distribution which provide Mesos package by default (I'm not sure if any distro like that currently exists)

Distributing binary packages with Puppet is not a good idea, there are too many versions and too many distributions, Puppet module should be very light and as universal as possible. This approach gives users freedom of choosing preferred Mesos package.

The only thing we could do, is adding automatically package source for supported distributions, e.g. for Ubuntu/Debian:

deb http://repos.mesosphere.io/ubuntu trusty main

Is this what you meant?

Yea sorry if I wasn't clear really new to puppet, I meant we should add the repository sources when available and let the user choose which repo to use. Instead of letting the user creating his own module which adds the package source I feel it's nicer to do this in this module directly.

Yes adding that line is what I meant.

I've added experimental support for Debian repository. You can enable it via Hiera:

mesos::repo: 'mesosphere'

I can't test it right now, let me know if there are any problems.

I will probably test it tomorrow on new slaves. Nice! I started to look at how to implement this and also thought of using the same way with debian and then factor to get release information.

It seems it's not working as expected and sorry for the late reply:

Error: Failed to apply catalog: Parameter source failed on Apt_key[Add key: E56151BF from Apt::Source mesosphere]: Invalid value false. Valid values match /\Ahttps?:\/\//, /\Aftp:\/\//, /\A\/\w+/. at /etc/puppet/modules/apt/manifests/key.pp:94
Wrapped exception:
Invalid value false. Valid values match /\Ahttps?:\/\//, /\Aftp:\/\//, /\A\/\w+/.

Debugged a bit and it seems the parameter key_source can not be false but should be an URL. I fixed it by just removing the parameter key_source and it seems to be working, will sent pull request after tested to be working.