add vncproxy, scheduler options for osops-utils

This commit is contained in:
rpedde
2012-05-29 09:28:29 -05:00
parent 7dd649c7c9
commit f62c3e1558
5 changed files with 38 additions and 46 deletions

View File

@@ -102,6 +102,11 @@ when "fedora"
"nova_compute_service" => "openstack-nova-compute",
"nova_network_packages" => ["openstack-nova"],
"nova_network_service" => "openstack-nova-network",
"nova_scheduler_packages" => ["openstack-nova"],
"nova_scheduler_service" => "openstack-nova-scheduler",
"nova_vncproxy_packages" => ["openstack-nova"],
"nova_vncproxy_service" => "openstack-nova-vncproxy",
"nova_vncproxy_consoleauth_packages" => ["openstack-nova"],
"libvirt_packages" => ["libvirt"],
"libvirt_service" => "libvirtd",
"common_packages" => ["openstack-nova"],
@@ -123,9 +128,15 @@ when "ubuntu"
"nova_compute_service" => "nova-compute",
"nova_network_packages" => ["nova-network"],
"nova_network_service" => "nova-network",
"nova_scheduler_packages" => ["nova-scheduler"],
"nova_scheduler_service" => "nova-scheduler",
"nova_vncproxy_packages" => ["nova-vncproxy"],
"nova_vncproxy_service" => "nova-vncproxy",
"nova_vncproxy_consoleauth_packages" => ["nova-consoleauth"],
"nova_vncproxy_consoleauth_service" => "nova-consoleauth",
"libvirt_packages" => ["libvirt-bin"],
"libvirt_service" => "libvirt-bin",
"common_packages" => ["nova-common"],
"package_overrides" => "-o Dpkg::Options::='--force-confold'-o Dpkg::Options::='--force-confdef'"
"package_overrides" => "-o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef'"
}
end

View File

@@ -58,7 +58,7 @@ template "/etc/nova/api-paste.ini" do
variables(
"component" => node["package_component"],
"keystone_api_ipaddress" => ks_admin_endpoint["host"],
"admin_port" => keystone_admin_port,
"admin_port" => ks_admin_endpoint["port"],
"service_port" => ks_service_endpoint["port"],
"admin_token" => keystone["admin_token"]
)

View File

@@ -35,7 +35,7 @@ end
mysql_info = get_settings_by_role("mysql-master", "mysql")
rabbit_info = get_settings_by_role("rabbitmq-server", "rabbitmq")
nova_setup_info = get_settings_by_recipe("nova\:\:nova-setup", "nova")
nova_setup_info = get_settings_by_recipe("nova\\:\\:nova-setup", "nova")
keystone = get_settings_by_role("keystone", "keystone")
# find the node attribute endpoint settings for the server holding a given role

View File

@@ -7,9 +7,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,18 +19,7 @@
include_recipe "nova::nova-common"
# Distribution specific settings go here
if platform?(%w{fedora})
# Fedora
nova_scheduler_package = "openstack-nova"
nova_scheduler_service = "openstack-nova-scheduler"
nova_scheduler_package_options = ""
else
# All Others (right now Debian and Ubuntu)
nova_scheduler_package = "nova-scheduler"
nova_scheduler_service = nova_scheduler_package
nova_scheduler_package_options = "-o Dpkg::Options::='--force-confold' --force-yes"
end
platform_options = node["nova"]["platform"]
directory "/var/lock/nova" do
owner "nova"
@@ -39,12 +28,15 @@ directory "/var/lock/nova" do
action :create
end
package nova_scheduler_package do
action :upgrade
options nova_scheduler_package_options
platform_options["nova_scheduler_packages"].each do |pkg|
package pkg do
action :upgrade
options platform_options["nova_scheduler_service"]
end
end
service nova_scheduler_service do
service "nova-scheduler" do
service_name platform_options["nova_scheduler_service"]
supports :status => true, :restart => true
action :enable
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed

View File

@@ -19,35 +19,22 @@
include_recipe "nova::nova-common"
# Distribution specific settings go here
if platform?(%w{fedora})
# Fedora
# TODO(breu): fedora doesn't have a working vncproxy yet. Once they fix it include it here
# TODO(breu): fedora packages consoleauth but they don't include systemd startup scripts
nova_vncproxy_package = "openstack-nova"
nova_vncproxy_service = "openstack-nova-vncproxy"
nova_vncproxy_consoleauth_package = "openstack-nova"
#nova_vncproxy_consoleauth_service = ""
#nova_vncproxy_package_options = ""
else
# All Others (right now Debian and Ubuntu)
nova_vncproxy_package = "nova-vncproxy"
nova_vncproxy_service = nova_vncproxy_package
nova_vncproxy_consoleauth_package = "nova-consoleauth"
nova_vncproxy_consoleauth_service = nova_vncproxy_consoleauth_package
nova_vncproxy_package_options = "-o Dpkg::Options::='--force-confold' --force-yes"
end
platform_options = node["nova"]["platform"]
case node["platform"]
when "ubuntu","debian"
package nova_vncproxy_package do
action :upgrade
options nova_vncproxy_package_options
platform_options["nova_vncproxy_packages"].each do |pkg|
package pkg do
action :upgrade
options platform_options["nova_vncproxy_service"]
end
end
# required for vnc console authentication
package nova_vncproxy_consoleauth_package do
action :upgrade
platform_options["nova_vncproxy_consoleauth_packages"].each do |pkg|
package pkg do
action :upgrade
end
end
execute "Fix permission Bug" do
@@ -56,15 +43,17 @@ when "ubuntu","debian"
only_if { File.readlines("/etc/init/nova-vncproxy.conf").grep(/exec.*nova$/).size > 0 }
end
service nova_vncproxy_service do
service "nova-vncproxy" do
# TODO(breu): remove the platform specifier when fedora fixes their vncproxy package
service_name platform_options["nova_vncproxy_service"]
supports :status => true, :restart => true
action :enable
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed
end
service nova_vncproxy_consoleauth_service do
service "nova-consoleauth" do
# TODO(breu): remove the platform specifier when fedora fixes their vncproxy package
service_name platform_options["nova_vncproxy_consoleauth_service"]
supports :status => true, :restart => true
action :enable
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed