swati06

ha_proxy

Mar 17th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.89 KB | None | 0 0
  1. # Copyright 2014, Rackspace US, Inc.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14.  
  15. haproxy_backend_options_http:
  16. - "forwardfor"
  17. - "httpchk"
  18. - "httplog"
  19.  
  20. haproxy_backend_options_https:
  21. - "ssl-hello-chk"
  22.  
  23. keystone_ssl_admin: "{% if keystone_ssl is defined and keystone_ssl | bool and keystone_service_adminuri_proto == 'https' %}true{% else %}false{% endif %}"
  24. keystone_ssl_internal: "{% if keystone_ssl is defined and keystone_ssl | bool and keystone_service_internaluri_proto == 'https' %}true{% else %}false{% endif %}"
  25. keystone_ssl_public: "{% if keystone_ssl is defined and keystone_ssl | bool and keystone_service_publicuri_proto == 'https' %}true{% else %}false{% endif %}"
  26.  
  27. haproxy_service_configs:
  28. - service:
  29. haproxy_service_name: galera
  30. haproxy_backend_nodes: "{{ [groups['galera_all'][0]] | default([]) }}" # list expected
  31. haproxy_backup_nodes: "{{ groups['galera_all'][1:] | default([]) }}"
  32. haproxy_port: 3306
  33. haproxy_balance_type: tcp
  34. haproxy_timeout_client: 5000s
  35. haproxy_timeout_server: 5000s
  36. haproxy_backend_options:
  37. - "mysql-check user {{ galera_monitoring_user }}"
  38. - service:
  39. haproxy_service_name: designate_api
  40. haproxy_backend_nodes: "{{ groups['designate_api'] | default([]) }}"
  41. haproxy_port: 9191
  42. haproxy_balance_type: http
  43. haproxy_backend_options:
  44. - "forwardfor"
  45. - "httpchk /versions"
  46. - "httplog"
  47. - service:
  48. haproxy_service_name: glance_api
  49. haproxy_backend_nodes: "{{ groups['glance_api'] | default([]) }}"
  50. haproxy_port: 9292
  51. haproxy_balance_type: http
  52. haproxy_backend_options:
  53. - "forwardfor"
  54. - "httpchk /versions"
  55. - "httplog"
  56. - service:
  57. haproxy_service_name: glance_registry
  58. haproxy_backend_nodes: "{{ groups['glance_registry'] | default([]) }}"
  59. haproxy_port: 9191
  60. haproxy_balance_type: http
  61. - service:
  62. haproxy_service_name: heat_api_cfn
  63. haproxy_backend_nodes: "{{ groups['heat_api_cfn'] | default([]) }}"
  64. haproxy_port: 8000
  65. haproxy_balance_type: http
  66. haproxy_backend_options:
  67. - "forwardfor"
  68. - "httpchk"
  69. - "httplog"
  70. - service:
  71. haproxy_service_name: heat_api_cloudwatch
  72. haproxy_backend_nodes: "{{ groups['heat_api_cloudwatch'] | default([]) }}"
  73. haproxy_port: 8003
  74. haproxy_balance_type: http
  75. haproxy_backend_options:
  76. - "forwardfor"
  77. - "httpchk"
  78. - "httplog"
  79. - service:
  80. haproxy_service_name: heat_api
  81. haproxy_backend_nodes: "{{ groups['heat_api'] | default([]) }}"
  82. haproxy_port: 8004
  83. haproxy_balance_type: http
  84. haproxy_backend_options:
  85. - "forwardfor"
  86. - "httpchk"
  87. - "httplog"
  88. - service:
  89. haproxy_service_name: keystone_admin
  90. haproxy_backend_nodes: "{{ groups['keystone_all'] | default([]) }}"
  91. haproxy_port: 35357
  92. haproxy_ssl: "{% if haproxy_ssl | bool and keystone_service_adminuri_proto == 'https' %}true{% else %}false{% endif %}"
  93. haproxy_balance_type: "{{ (keystone_ssl_admin | bool) | ternary('tcp', 'http') }}"
  94. haproxy_balance_alg: "{{ (keystone_ssl_admin | bool) | ternary('source', 'leastconn') }}"
  95. haproxy_backend_options: "{{ (keystone_ssl_admin | bool) | ternary(haproxy_backend_options_https, haproxy_backend_options_http) }}"
  96. - service:
  97. haproxy_service_name: keystone_service
  98. haproxy_backend_nodes: "{{ groups['keystone_all'] | default([]) }}"
  99. haproxy_bind: "{% if internal_lb_vip_address == external_lb_vip_address %}*{% else %}{{ external_lb_vip_address }}{% endif %}"
  100. haproxy_port: 5000
  101. haproxy_ssl: "{% if haproxy_ssl | bool and keystone_service_publicuri_proto == 'https' %}true{% else %}false{% endif %}"
  102. haproxy_balance_type: "{{ (keystone_ssl_public | bool) | ternary('tcp','http') }}"
  103. haproxy_balance_alg: "{{ (keystone_ssl_public | bool) | ternary('source', 'leastconn') }}"
  104. haproxy_backend_options: "{{ (keystone_ssl_public | bool) | ternary(haproxy_backend_options_https, haproxy_backend_options_http) }}"
  105. - service:
  106. haproxy_service_name: neutron_server
  107. haproxy_backend_nodes: "{{ groups['neutron_server'] | default([]) }}"
  108. haproxy_port: 9696
  109. haproxy_balance_type: http
  110. haproxy_backend_options:
  111. - "forwardfor"
  112. - "httpchk"
  113. - "httplog"
  114. - service:
  115. haproxy_service_name: nova_api_metadata
  116. haproxy_backend_nodes: "{{ groups['nova_api_metadata'] | default([]) }}"
  117. haproxy_port: 8775
  118. haproxy_balance_type: http
  119. haproxy_backend_options:
  120. - "httpchk"
  121. - "httplog"
  122. - service:
  123. haproxy_service_name: nova_api_os_compute
  124. haproxy_backend_nodes: "{{ groups['nova_api_os_compute'] | default([]) }}"
  125. haproxy_port: 8774
  126. haproxy_balance_type: http
  127. haproxy_backend_options:
  128. - "forwardfor"
  129. - "httpchk"
  130. - "httplog"
  131. - service:
  132. haproxy_service_name: nova_console
  133. haproxy_backend_nodes: "{{ groups['nova_console'] | default([]) }}"
  134. haproxy_ssl: "{% if haproxy_ssl | bool and nova_spice_html5proxy_base_proto == 'https' %}true{% else %}false{% endif %}"
  135. haproxy_port: 6082
  136. haproxy_balance_type: tcp
  137. haproxy_timeout_client: 60m
  138. haproxy_timeout_server: 60m
  139. haproxy_balance_alg: source
  140. - service:
  141. haproxy_service_name: nova_console_novnc
  142. haproxy_backend_nodes: "{{ groups['nova_console'] | default([]) }}"
  143. haproxy_ssl: "{% if haproxy_ssl | bool and nova_novncproxy_proto == 'https' %}true{% else %}false{% endif %}"
  144. haproxy_port: 6080
  145. haproxy_balance_type: tcp
  146. haproxy_timeout_client: 60m
  147. haproxy_timeout_server: 60m
  148. haproxy_balance_alg: source
  149. - service:
  150. haproxy_service_name: cinder_api
  151. haproxy_backend_nodes: "{{ groups['cinder_api'] | default([]) }}"
  152. haproxy_port: 8776
  153. haproxy_balance_type: http
  154. haproxy_backend_options:
  155. - "forwardfor"
  156. - "httpchk"
  157. - "httplog"
  158. - service:
  159. haproxy_service_name: horizon
  160. haproxy_backend_nodes: "{{ groups['horizon_all'] | default([]) }}"
  161. haproxy_port: 80
  162. haproxy_balance_type: http
  163. haproxy_backend_options:
  164. - "forwardfor"
  165. - "httpchk"
  166. - "httplog"
  167. - service:
  168. haproxy_service_name: horizon_ssl
  169. haproxy_backend_nodes: "{{ groups['horizon_all'] | default([]) }}"
  170. haproxy_port: 443
  171. haproxy_balance_type: tcp
  172. haproxy_balance_alg: source
  173. haproxy_backend_options:
  174. - "ssl-hello-chk"
  175. - service:
  176. haproxy_service_name: swift_proxy
  177. haproxy_backend_nodes: "{{ groups['swift_proxy'] | default([]) }}"
  178. haproxy_balance_alg: source
  179. haproxy_port: 8080
  180. haproxy_balance_type: http
  181. - service:
  182. haproxy_service_name: repo_all
  183. haproxy_backend_nodes: "{{ groups['pkg_repo'] | default([]) }}"
  184. haproxy_port: 8181
  185. haproxy_backend_port: 8181
  186. haproxy_balance_type: http
  187. - service:
  188. haproxy_service_name: ceilometer_api
  189. haproxy_backend_nodes: "{{ groups['ceilometer_api_container'] | default([]) }}"
  190. haproxy_port: 8777
  191. haproxy_balance_type: http
  192. - service:
  193. haproxy_service_name: aodh_api
  194. haproxy_backend_nodes: "{{ groups['aodh_api'] | default([]) }}"
  195. haproxy_port: 8042
  196. haproxy_balance_type: http
Add Comment
Please, Sign In to add comment