File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
chef/cookbooks/designate/recipes Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1616# Recipe:: api
1717#
1818
19+ package "openstack-designate-producer"
20+
1921keystone_settings = KeystoneHelper . keystone_settings ( node , @cookbook_name )
2022
2123designate_port = node [ :designate ] [ :api ] [ :bind_port ]
9799
98100designate_service "central"
99101designate_service "api"
102+ designate_service "producer" unless ha_enabled
Original file line number Diff line number Diff line change 2222
2323include_recipe "crowbar-pacemaker::haproxy"
2424
25+ service_transaction_objects = [ ]
26+
2527haproxy_loadbalancer "designate-api" do
2628 address network_settings [ :api ] [ :ha_bind_host ]
2729 port network_settings [ :api ] [ :ha_bind_port ]
3032 "designate-server" , "api_port" )
3133 action :nothing
3234end . run_action ( :create )
35+
36+ op = { }
37+ op [ "monitor" ] = { }
38+ op [ "monitor" ] [ "interval" ] = "10s"
39+
40+ designate_producer_primitive = "designate-producer"
41+ pacemaker_primitive designate_producer_primitive do
42+ agent "systemd:openstack-designate-producer"
43+ op op
44+ action :update
45+ only_if { CrowbarPacemakerHelper . is_cluster_founder? ( node ) }
46+ end
47+ service_transaction_objects << "pacemaker_primitive[#{ designate_producer_primitive } ]"
48+
49+ designate_producer_loc = openstack_pacemaker_controller_only_location_for designate_producer_primitive
50+ service_transaction_objects << "pacemaker_location[#{ designate_producer_loc } ]"
51+
52+ pacemaker_transaction "designate producer service" do
53+ cib_objects service_transaction_objects
54+ # note that this will also automatically start the resources
55+ action :commit_new
56+ only_if { CrowbarPacemakerHelper . is_cluster_founder? ( node ) }
57+ end
58+
59+ crowbar_pacemaker_sync_mark "create-designate_producer"
You can’t perform that action at this time.
0 commit comments