add novnc and glance to support ha
Change-Id: I4ca69efc58988a031c8d81d44c2471c627119537
This commit is contained in:
parent
697caf28e8
commit
36ff13c7a2
@ -152,6 +152,13 @@ default['haproxy']['services'] = {
|
|||||||
"balance" => "source",
|
"balance" => "source",
|
||||||
"options" => [ "option tcpka", "option httpchk", "option tcplog"]
|
"options" => [ "option tcpka", "option httpchk", "option tcplog"]
|
||||||
},
|
},
|
||||||
|
"novncproxy" => {
|
||||||
|
"role" => "os-compute-single-controller",
|
||||||
|
"frontend_port" => "6080",
|
||||||
|
"backend_port" => "6080",
|
||||||
|
"balance" => "source",
|
||||||
|
"options" => [ "option tcpka", "option http-server-close", "option tcplog"]
|
||||||
|
},
|
||||||
"nova_metadata_api" => {
|
"nova_metadata_api" => {
|
||||||
"role" => "os-compute-single-controller",
|
"role" => "os-compute-single-controller",
|
||||||
"frontend_port" => "8775",
|
"frontend_port" => "8775",
|
||||||
|
@ -76,7 +76,12 @@ node['haproxy']['services'].each do |name, service|
|
|||||||
pool = ["options httpchk #{node['haproxy']['httpchk']}"] if node['haproxy']['httpchk']
|
pool = ["options httpchk #{node['haproxy']['httpchk']}"] if node['haproxy']['httpchk']
|
||||||
pool = service[:options]
|
pool = service[:options]
|
||||||
servers = pool_members.uniq.map do |s|
|
servers = pool_members.uniq.map do |s|
|
||||||
"#{s[:hostname]} #{s[:ipaddress]}:#{service[:backend_port]} check inter 2000 rise 2 fall 5"
|
# novncproxy cannot to be checked
|
||||||
|
if name.eql?("novncproxy")
|
||||||
|
"#{s[:hostname]} #{s[:ipaddress]}:#{service[:backend_port]}"
|
||||||
|
else
|
||||||
|
"#{s[:hostname]} #{s[:ipaddress]}:#{service[:backend_port]} check inter 2000 rise 2 fall 5"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
haproxy_lb name do
|
haproxy_lb name do
|
||||||
|
@ -77,7 +77,8 @@ node['openstack']['services'].each_key do |service|
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if mydata['ha']['status'].eql?('enable')
|
node.set["openstack"]["ha"]["status"] = mydata['ha']['status']
|
||||||
|
if node["openstack"]["ha"]["status"].eql?('enable')
|
||||||
node.set["openstack"]["identity"]["bind_interface"] = mydata['networking']['control']['interface']
|
node.set["openstack"]["identity"]["bind_interface"] = mydata['networking']['control']['interface']
|
||||||
node.set["openstack"]["image"]["api"]["bind_interface"] = mydata['networking']['control']['interface']
|
node.set["openstack"]["image"]["api"]["bind_interface"] = mydata['networking']['control']['interface']
|
||||||
node.set["openstack"]["image"]["registry"]["bind_interface"] = mydata['networking']['control']['interface']
|
node.set["openstack"]["image"]["registry"]["bind_interface"] = mydata['networking']['control']['interface']
|
||||||
|
@ -149,6 +149,12 @@ else
|
|||||||
bind_address = address_for node["openstack"]["image"]["api"]["bind_interface"]
|
bind_address = address_for node["openstack"]["image"]["api"]["bind_interface"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if node["openstack"]["ha"]["status"].eql?('enable')
|
||||||
|
registry_ip_address = address_for node["openstack"]["image"]["registry"]["bind_interface"]
|
||||||
|
else
|
||||||
|
registry_ip_address = registry_endpoint.host
|
||||||
|
end
|
||||||
|
|
||||||
template "/etc/glance/glance-api.conf" do
|
template "/etc/glance/glance-api.conf" do
|
||||||
source "glance-api.conf.erb"
|
source "glance-api.conf.erb"
|
||||||
owner node["openstack"]["image"]["user"]
|
owner node["openstack"]["image"]["user"]
|
||||||
@ -157,7 +163,8 @@ template "/etc/glance/glance-api.conf" do
|
|||||||
variables(
|
variables(
|
||||||
:api_bind_address => bind_address,
|
:api_bind_address => bind_address,
|
||||||
:api_bind_port => api_endpoint.port,
|
:api_bind_port => api_endpoint.port,
|
||||||
:registry_ip_address => registry_endpoint.host,
|
# :registry_ip_address => registry_endpoint.host,
|
||||||
|
:registry_ip_address => registry_ip_address,
|
||||||
:registry_port => registry_endpoint.port,
|
:registry_port => registry_endpoint.port,
|
||||||
:sql_connection => sql_connection,
|
:sql_connection => sql_connection,
|
||||||
:glance_flavor => glance_flavor,
|
:glance_flavor => glance_flavor,
|
||||||
|
@ -139,7 +139,7 @@
|
|||||||
"haproxy": {
|
"haproxy": {
|
||||||
"vip": "",
|
"vip": "",
|
||||||
"roles": {
|
"roles": {
|
||||||
"os-controller": ["dashboard_http","dashboard_https","keystone_admin", "keystone_public_internal","nova_ec2_api","nova_compute_api","cinder_api","neutron_api","novnc"],
|
"os-controller": ["dashboard_http","dashboard_https","keystone_admin", "keystone_public_internal","nova_ec2_api","nova_compute_api","cinder_api","neutron_api","novncproxy"],
|
||||||
"os-image": ["glance_api","glance_registry_cluster"]
|
"os-image": ["glance_api","glance_registry_cluster"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user