chef-boneyard / push-jobs-cookbook

Development repository for Chef Cookbook push-jobs
https://supermarket.chef.io/cookbooks/push-jobs
Apache License 2.0
21 stars 43 forks source link

Fix GH-128 - default recipe fails on Amazon Linux with Chef 13 #129

Closed zts closed 7 years ago

zts commented 7 years ago

Description

This PR adds Amazon Linux support to this cookbook for Chef 13. On Chef 12, the platform_family for that distribution was "rhel", so it worked without modification.

I chose to use Upstart as the init service, as this has been used by Amazon Linux for a number of years. To make this work, I had to explicitly specify the service provider within service_upstart.rb as Chef 13 is selecting the sysvinit provider on that distribution. This looks a little gross, but should not change behaviour for any other distribution.

I added an Amazon Linux suite to the kitchen-dokken configuration to work through these issues, but I'm not sure whether it's appropriate to add that in this PR as it isn't a supported platform for push-jobs (the contribution guidelines didn't give any hints).

Credit to @donone-apex for the initial commit in this PR, and motivation for finishing it. I'm happy for him to cherry-pick the commits in this branch if the preference is to instead complete the WIP PR 127.

Issues Resolved

https://github.com/chef-cookbooks/push-jobs/issues/128

Check List

zts commented 7 years ago

I'm perplexed by the chefspec failures reported by TravisCI - I can't reproduce them locally, and this PR doesn't/shouldn't change which service provider is used on Ubuntu 14.04 (the platform mocked in those tests).

donone-apex commented 7 years ago

LGTM, going to close https://github.com/chef-cookbooks/push-jobs/pull/127 in favor of this one.

cheeseplus commented 7 years ago

The failure in TravisCI is something I'm fixing in another PR, this is good to go.