Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

Chef 13 compatibility #108

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
driver:
name: vagrant
require_chef_omnibus: true

chef_versions:
- 11
- 12
require_chef_omnibus: 13

platforms:
- name: ubuntu-12.04
run_list:
- recipe[apt]
- name: ubuntu-10.04
run_list:
- recipe[apt]
- name: centos-6.4
- name: ubuntu-16.04
- name: ubuntu-14.04
- name: debian-9
- name: debian-8

suites:
- name: default
run_list:
- recipe[apt]
- recipe[supervisor]
2 changes: 1 addition & 1 deletion Berksfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site :opscode
source 'https://supermarket.chef.io'
metadata

group :integration do
Expand Down
18 changes: 9 additions & 9 deletions metadata.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name "supervisor"
maintainer "Noah Kantrowitz"
maintainer_email "[email protected]"
license "Apache 2.0"
description "Installs supervisor and provides resources to configure services"
version "0.4.12"
name 'supervisor'
maintainer 'Noah Kantrowitz'
maintainer_email '[email protected]'
license 'Apache 2.0'
description 'Installs supervisor and provides resources to configure services'
version '0.5.0'

recipe "supervisor", "Installs and configures supervisord"
recipe 'supervisor', 'Installs and configures supervisord'

depends "python"
depends 'poise-python', '~> 1.6.0'

%w{ ubuntu debian redhat centos fedora amazon smartos raspbian }.each do |os|
%w( ubuntu debian redhat centos fedora amazon smartos raspbian ).each do |os|
supports os
end
10 changes: 7 additions & 3 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
# limitations under the License.
#

include_recipe "python"
# Install
python_runtime 'supervisor' do
version '2'
end

# foodcritic FC023: we prefer not having the resource on non-smartos
if platform_family?("smartos")
Expand All @@ -26,8 +29,9 @@
end
end

python_pip "supervisor" do
python_package "supervisor" do
action :upgrade
python 'supervisor'
version node['supervisor']['version'] if node['supervisor']['version']
end

Expand Down Expand Up @@ -85,7 +89,7 @@
variables({
# TODO: use this variable in the debian platform-family template
# instead of altering the PATH and calling "which supervisord".
:supervisord => "#{node['python']['prefix_dir']}/bin/supervisord"
:supervisord => "/usr/local/bin/supervisord"
})
end

Expand Down