diff --git a/.kitchen.yml b/.kitchen.yml index 9870362..20dd438 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -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] diff --git a/Berksfile b/Berksfile index 54c9d88..57c4aec 100644 --- a/Berksfile +++ b/Berksfile @@ -1,4 +1,4 @@ -site :opscode +source 'https://supermarket.chef.io' metadata group :integration do diff --git a/metadata.rb b/metadata.rb index 7eee14e..6fce9be 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,14 +1,14 @@ -name "supervisor" -maintainer "Noah Kantrowitz" -maintainer_email "noah@coderanger.net" -license "Apache 2.0" -description "Installs supervisor and provides resources to configure services" -version "0.4.12" +name 'supervisor' +maintainer 'Noah Kantrowitz' +maintainer_email 'noah@coderanger.net' +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 diff --git a/recipes/default.rb b/recipes/default.rb index b2df96f..f3a1c93 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -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") @@ -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 @@ -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