From bc3adb98a5165f18d54b46ac375d60434fbf28e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionu=C8=9B=20Ar=C8=9B=C4=83ri=C8=99i?= Date: Wed, 27 Feb 2013 18:28:56 +0100 Subject: [PATCH] add suse as supported and fix users and package names Change-Id: I2cc7e96f2fd8e252bccb83505ccd701698d203fb --- attributes/default.rb | 16 +++++++++++++--- metadata.rb | 2 +- recipes/libvirt.rb | 1 + 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index 403ca71c..7415e96a 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -37,8 +37,14 @@ default["openstack-compute"]["service_role"] = "admin" # that is in the paste INI files. default["openstack-compute"]["pki"]["signing_dir"] = "/tmp/nova-signing-dir" -default["openstack-compute"]["user"] = "nova" -default["openstack-compute"]["group"] = "nova" +case platform +when "fedora", "redhat", "centos", "ubuntu" + default["openstack-compute"]["user"] = "nova" + default["openstack-compute"]["group"] = "nova" +when "suse" + default["openstack-compute"]["user"] = "openstack-nova" + default["openstack-compute"]["group"] = "openstack-nova" +end # Logging stuff default["openstack-compute"]["syslog"]["use"] = false @@ -179,7 +185,7 @@ default["openstack-compute"]["api"]["auth"]["cache_dir"] = "/var/cache/nova/api" default["openstack-compute"]["ceilometer-api"]["auth"]["cache_dir"] = "/var/cache/nova/ceilometer-api" case platform -when "fedora", "redhat", "centos" # :pragma-foodcritic: ~FC024 - won't fix this +when "fedora", "redhat", "centos", "suse" # :pragma-foodcritic: ~FC024 - won't fix this default["openstack-compute"]["platform"] = { "api_ec2_packages" => ["openstack-nova-api"], "api_ec2_service" => "openstack-nova-api", @@ -210,6 +216,10 @@ when "fedora", "redhat", "centos" # :pragma-foodcritic: ~FC024 - won't fix this "iscsi_helper" => "ietadm", "package_overrides" => "" } + if platform == "suse" + default["openstack-compute"]["platform"]["common_packages"] = ["openstack-nova"] + end + when "ubuntu" default["openstack-compute"]["platform"] = { "api_ec2_packages" => ["nova-api-ec2"], diff --git a/metadata.rb b/metadata.rb index 1808257d..03b2edc4 100644 --- a/metadata.rb +++ b/metadata.rb @@ -20,7 +20,7 @@ recipe "openstack-compute::nova-setup", "Sets up the nova database on the mysql recipe "openstack-compute::scheduler", "Installs nova scheduler service" recipe "openstack-compute::vncproxy", "Installs and configures the vncproxy service for console access to VMs" -%w{ ubuntu fedora redhat centos }.each do |os| +%w{ ubuntu fedora redhat centos suse }.each do |os| supports os end diff --git a/recipes/libvirt.rb b/recipes/libvirt.rb index 69f18b87..f6ac6eec 100644 --- a/recipes/libvirt.rb +++ b/recipes/libvirt.rb @@ -76,6 +76,7 @@ template "/etc/libvirt/libvirtd.conf" do ) notifies :restart, "service[libvirt-bin]", :immediately + not_if { platform? "suse" } end template "/etc/default/libvirt-bin" do