mdsol / mesos_cookbook

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

Use mesosphere apt repository for package installation. #61

Closed sethdmoore closed 9 years ago

sethdmoore commented 9 years ago

Instead of using remote_file and dpkg -i to install the package, add Mesosphere's Debian repository and apt-get install from there.

This removes the dependency on mdsol/mesos_cookbook's attributes file when used as a wrapper cookbook and allows for updating the version of mesos as soon as it's published to the repo

Tests already exist in mesos_install_spec.rb for package installation.

rayrod2030 commented 9 years ago

Thanks for the patch and this looks like a great change. I'm in the process of testing it.

rayrod2030 commented 9 years ago

Looks like this change fails when tested against Debian 7.8 and Mesos 0.19.0. Mesosphere defines a Debian 7.1 package in their downloads list and we have the package defined in the metadata but it looks like when installing packages from their apt repo that it can't find Mesos 0.19.0 for Debian 7.8. Any suggestions on how we can get around this or should we just remove Debian 7 support altogether for Mesos 0.19.0 in this cookbook?

sethdmoore commented 9 years ago

I've tested and confirmed, but this is (in my opinion) a non-issue because 0.19.1 is available and is a bug-fix version.

There have been significant changes to Mesos since 0.19.0 including major show-stopping bug fixes.

root@0-19-0-debian-78:/home/vagrant# cat /etc/debian_version 
7.8

root@0-19-0-debian-78:/home/vagrant# apt-cache policy mesos
mesos:
  Installed: (none)
  Candidate: 0.21.1-1.2.debian77
  Version table:
     0.21.1-1.2.debian77 0
        500 http://repos.mesosphere.io/debian/ wheezy/main amd64 Packages
     0.21.1-1.1.debian77 0
        500 http://repos.mesosphere.io/debian/ wheezy/main amd64 Packages
     0.21.0-1.0.debian77 0
        500 http://repos.mesosphere.io/debian/ wheezy/main amd64 Packages
     0.20.1-1.0.debian75 0
        500 http://repos.mesosphere.io/debian/ wheezy/main amd64 Packages
     0.20.0-1.0.debian75 0
        500 http://repos.mesosphere.io/debian/ wheezy/main amd64 Packages
     0.19.1-1.0.debian75 0
        500 http://repos.mesosphere.io/debian/ wheezy/main amd64 Packages

In any case, it's a Mesosphere repository problem more than a cookbook problem.

We could hack in some if statement for that specific Debian version / package combination and use dpkg -i like before this pull request, but I can't imagine this change will affect that many users.

I vote we drop support for Debian 7.{7..8} with mesos 0.19.0.

rayrod2030 commented 9 years ago

Good point and I agree. @harryw LGTM :+1:

I'll follow this up with an equivalent treatment for RPM's and I'll remove support for 0.19.0 for Debian 7.x from the metadata. I think eventually the metadata will remain only for ensuring compat between os, platform and mesos versions and for keeping a reference to the python eggs. Eventually we can phase out the package_url logic as it will no longer be used. Thanks @sethdmoore!