mdsol / mesos_cookbook

Chef cookbook for installing Apache Mesos
Other
78 stars 71 forks source link

Support version os matrix #50

Closed rayrod2030 closed 9 years ago

rayrod2030 commented 9 years ago

This pull request makes some major changes to the Mesos cookbook and I am submitting it for peer review as these changes break backward compatibility and therefore should be considered only for version 3.0.0 of this cookbook. The following is a run down of my changes:

  1. Updated our mesosphere package metadata logic to now use a hash of all available mesosphere packages across all available operating systems This metadata contains package url, python egg url and package checksum. This change now explicitly supports the following matrix:

    Mesos versions:
    • 0.19.0
    • 0.19.1
    • 0.20.0
    • 0.20.1
    • 0.21.0
      Operating Systems:
    • Ubuntu 14.04 LTS
    • Ubuntu 13.10
    • Ubuntu 12.04 LTS
    • Debian Wheezy 7.x
    • Centos 6.4, 6.5. 6.6
    • RHEL 6.4, 6.5

    The cookbook will now bark at you and fail to converge if you request a Mesos version on an operating system that is not defined in the package metadata hash however the hash can very easily be updated by users to support new Mesos versions, operating systems and custom package download locations.

  2. Updated the primary way to set options that configure mesos-master and mesos-slave processes. The primary style of configuration is now to generate files within /etc/mesos-master and /etc/mesos-slave directories containing the values for the options. Flags or switches are also supported and are recognized for any attributes that are boolean or "truthy" ex. 'true', 'false', 'yes', 'no'. Setting environment variables in /etc/default/mesos, /etc/default/mesos-master and /etc/default/mesos-slave is still supported but no longer the default configuration style.
  3. Added validation to ensure that only supported options can be passed to Mesos as options. All options for currently supported versions are maintained in a hash and keep users from breaking their running Mesos process by passing an unsupported option or flag. This option list is maintained here: https://docs.google.com/spreadsheets/d/1IER03xhtOSj9unW5AYIqn-tu-laAHlPSOYhM6xw4QHg
  4. Updated serverspec tests to cover more scenarios between mesos-master and mesos-slaves and ensure proper communication with zookeeper.
  5. Updated kitchen config files to support our new set of operating systems and created a test suite for each supported version to create our testing matrix. Also updated the AWS EC2 kitchen config as well as adding a DigitalOcean kitchen config for testing across cloud providers.
  6. Updated all code to be compliant with rubocop and foodcritic rules.
  7. Update Medidata copyright year to 2015.
  8. All test suites were run against vagrant, ec2 and digital ocean instances to ensure working code and proper mesos configuration.
rayrod2030 commented 9 years ago

By the way forgot to mention that if you guys feel good about this PR I'll go ahead update the README to match the change in functionality.

harryw commented 9 years ago

Looks great @rayrod2030 - do you want to update the README in this PR? That would make sense.

rayrod2030 commented 9 years ago

Sure I'll push an updated README today.

rayrod2030 commented 9 years ago

@harryw Pushed a revised README along with additional docs in attributes/default.rb.

ghost commented 9 years ago

:+1: I'll let this settle in during my slumber, and if I feel the same way tomorrow morning, I'll merge.

ghost commented 9 years ago

:+1:, still letting the dust settle though...