Fuel Library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

radosgw.pp 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # == Class: openstack::ha::radosgw
  2. #
  3. # HA configuration for radosgw
  4. #
  5. # === Parameters
  6. #
  7. # [*internal_virtual_ip*]
  8. # (required) String. This is the ipaddress to be used for the internal facing
  9. # vip
  10. #
  11. # [*ipaddresses*]
  12. # (required) Array. This is an array of ipaddresses for the backend services
  13. # to be loadbalanced
  14. #
  15. # [*public_ssl*]
  16. # (optional) Boolean. If true, enables SSL for $public_virtual_ip
  17. # Defaults to false.
  18. #
  19. # [*public_ssl_path*]
  20. # (optional) String. Filesystem path to the file with public certificate
  21. # content
  22. # Defaults to undef
  23. #
  24. # [*public_virtual_ip*]
  25. # (required) String. This is the ipaddress to be used for the external facing
  26. # vip
  27. #
  28. # [*server_names*]
  29. # (required) Array. This is an array of server names for the haproxy service
  30. #
  31. class openstack::ha::radosgw (
  32. $internal_virtual_ip,
  33. $ipaddresses,
  34. $public_virtual_ip,
  35. $server_names,
  36. $public_ssl = false,
  37. $public_ssl_path = undef,
  38. $baremetal_virtual_ip = undef,
  39. ) {
  40. # defaults for any haproxy_service within this class
  41. Openstack::Ha::Haproxy_service {
  42. internal_virtual_ip => $internal_virtual_ip,
  43. ipaddresses => $ipaddresses,
  44. listen_port => 8080,
  45. balancermember_port => 6780,
  46. public_virtual_ip => $public_virtual_ip,
  47. server_names => $server_names,
  48. haproxy_config_options => {
  49. 'option' => ['httplog', 'httpchk HEAD /', 'forceclose', 'forwardfor', 'http-buffer-request'],
  50. 'timeout' => 'http-request 10s',
  51. 'http-request' => 'set-header X-Forwarded-Proto https if { ssl_fc }',
  52. },
  53. }
  54. openstack::ha::haproxy_service { 'object-storage':
  55. order => '130',
  56. public => true,
  57. public_ssl => $public_ssl,
  58. public_ssl_path => $public_ssl_path,
  59. }
  60. if $baremetal_virtual_ip {
  61. openstack::ha::haproxy_service { 'object-storage-baremetal':
  62. order => '135',
  63. public_virtual_ip => false,
  64. internal_virtual_ip => $baremetal_virtual_ip,
  65. }
  66. }
  67. }