add vncproxy, scheduler options for osops-utils
This commit is contained in:
@@ -102,6 +102,11 @@ when "fedora"
|
|||||||
"nova_compute_service" => "openstack-nova-compute",
|
"nova_compute_service" => "openstack-nova-compute",
|
||||||
"nova_network_packages" => ["openstack-nova"],
|
"nova_network_packages" => ["openstack-nova"],
|
||||||
"nova_network_service" => "openstack-nova-network",
|
"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_packages" => ["libvirt"],
|
||||||
"libvirt_service" => "libvirtd",
|
"libvirt_service" => "libvirtd",
|
||||||
"common_packages" => ["openstack-nova"],
|
"common_packages" => ["openstack-nova"],
|
||||||
@@ -123,9 +128,15 @@ when "ubuntu"
|
|||||||
"nova_compute_service" => "nova-compute",
|
"nova_compute_service" => "nova-compute",
|
||||||
"nova_network_packages" => ["nova-network"],
|
"nova_network_packages" => ["nova-network"],
|
||||||
"nova_network_service" => "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_packages" => ["libvirt-bin"],
|
||||||
"libvirt_service" => "libvirt-bin",
|
"libvirt_service" => "libvirt-bin",
|
||||||
"common_packages" => ["nova-common"],
|
"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
|
end
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ template "/etc/nova/api-paste.ini" do
|
|||||||
variables(
|
variables(
|
||||||
"component" => node["package_component"],
|
"component" => node["package_component"],
|
||||||
"keystone_api_ipaddress" => ks_admin_endpoint["host"],
|
"keystone_api_ipaddress" => ks_admin_endpoint["host"],
|
||||||
"admin_port" => keystone_admin_port,
|
"admin_port" => ks_admin_endpoint["port"],
|
||||||
"service_port" => ks_service_endpoint["port"],
|
"service_port" => ks_service_endpoint["port"],
|
||||||
"admin_token" => keystone["admin_token"]
|
"admin_token" => keystone["admin_token"]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ end
|
|||||||
|
|
||||||
mysql_info = get_settings_by_role("mysql-master", "mysql")
|
mysql_info = get_settings_by_role("mysql-master", "mysql")
|
||||||
rabbit_info = get_settings_by_role("rabbitmq-server", "rabbitmq")
|
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")
|
keystone = get_settings_by_role("keystone", "keystone")
|
||||||
|
|
||||||
# find the node attribute endpoint settings for the server holding a given role
|
# find the node attribute endpoint settings for the server holding a given role
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -19,18 +19,7 @@
|
|||||||
|
|
||||||
include_recipe "nova::nova-common"
|
include_recipe "nova::nova-common"
|
||||||
|
|
||||||
# Distribution specific settings go here
|
platform_options = node["nova"]["platform"]
|
||||||
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
|
|
||||||
|
|
||||||
directory "/var/lock/nova" do
|
directory "/var/lock/nova" do
|
||||||
owner "nova"
|
owner "nova"
|
||||||
@@ -39,12 +28,15 @@ directory "/var/lock/nova" do
|
|||||||
action :create
|
action :create
|
||||||
end
|
end
|
||||||
|
|
||||||
package nova_scheduler_package do
|
platform_options["nova_scheduler_packages"].each do |pkg|
|
||||||
action :upgrade
|
package pkg do
|
||||||
options nova_scheduler_package_options
|
action :upgrade
|
||||||
|
options platform_options["nova_scheduler_service"]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
service nova_scheduler_service do
|
service "nova-scheduler" do
|
||||||
|
service_name platform_options["nova_scheduler_service"]
|
||||||
supports :status => true, :restart => true
|
supports :status => true, :restart => true
|
||||||
action :enable
|
action :enable
|
||||||
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed
|
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed
|
||||||
|
|||||||
@@ -19,35 +19,22 @@
|
|||||||
|
|
||||||
include_recipe "nova::nova-common"
|
include_recipe "nova::nova-common"
|
||||||
|
|
||||||
# Distribution specific settings go here
|
platform_options = node["nova"]["platform"]
|
||||||
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
|
|
||||||
|
|
||||||
case node["platform"]
|
case node["platform"]
|
||||||
when "ubuntu","debian"
|
when "ubuntu","debian"
|
||||||
package nova_vncproxy_package do
|
platform_options["nova_vncproxy_packages"].each do |pkg|
|
||||||
action :upgrade
|
package pkg do
|
||||||
options nova_vncproxy_package_options
|
action :upgrade
|
||||||
|
options platform_options["nova_vncproxy_service"]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# required for vnc console authentication
|
# required for vnc console authentication
|
||||||
package nova_vncproxy_consoleauth_package do
|
platform_options["nova_vncproxy_consoleauth_packages"].each do |pkg|
|
||||||
action :upgrade
|
package pkg do
|
||||||
|
action :upgrade
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
execute "Fix permission Bug" do
|
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 }
|
only_if { File.readlines("/etc/init/nova-vncproxy.conf").grep(/exec.*nova$/).size > 0 }
|
||||||
end
|
end
|
||||||
|
|
||||||
service nova_vncproxy_service do
|
service "nova-vncproxy" do
|
||||||
# TODO(breu): remove the platform specifier when fedora fixes their vncproxy package
|
# TODO(breu): remove the platform specifier when fedora fixes their vncproxy package
|
||||||
|
service_name platform_options["nova_vncproxy_service"]
|
||||||
supports :status => true, :restart => true
|
supports :status => true, :restart => true
|
||||||
action :enable
|
action :enable
|
||||||
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed
|
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed
|
||||||
end
|
end
|
||||||
|
|
||||||
service nova_vncproxy_consoleauth_service do
|
service "nova-consoleauth" do
|
||||||
# TODO(breu): remove the platform specifier when fedora fixes their vncproxy package
|
# 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
|
supports :status => true, :restart => true
|
||||||
action :enable
|
action :enable
|
||||||
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed
|
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed
|
||||||
|
|||||||
Reference in New Issue
Block a user