Add Ceph RGW listener to HAProxy
authorGiulio Fidente <gfidente@redhat.com>
Tue, 30 Aug 2016 12:17:42 +0000 (14:17 +0200)
committerGiulio Fidente <gfidente@redhat.com>
Wed, 31 Aug 2016 12:35:03 +0000 (14:35 +0200)
Shares the same (ssl)port with Swift Proxy

Change-Id: I2e1de1a3fa6ad62895a1e972e43858f23c08bbea

manifests/haproxy.pp
manifests/profile/base/keystone.pp

index a79bf14..e1f5d50 100644 (file)
 #  (optional) Enable or not Zaqar Api binding
 #  Defaults to hiera('zaqar_api_enabled', false)
 #
+# [*ceph_rgw*]
+#  (optional) Enable or not Ceph RadosGW binding
+#  Defaults to hiera('ceph_rgw_enabled', false)
+#
 # [*opendaylight*]
 #  (optional) Enable or not OpenDaylight binding
 #  Defaults to hiera('opendaylight_api_enabled', false)
 #    'trove_api_ssl_port' (Defaults to 13779)
 #    'zaqar_api_port' (Defaults to 8888)
 #    'zaqar_api_ssl_port' (Defaults to 13888)
+#    'ceph_rgw_port' (Defaults to 8080)
+#    'ceph_rgw_ssl_port' (Defaults to 13808)
 #  Defaults to {}
 #
 class tripleo::haproxy (
@@ -333,6 +339,7 @@ class tripleo::haproxy (
   $redis_password            = undef,
   $midonet_api               = false,
   $zaqar_api                 = hiera('zaqar_api_enabled', false),
+  $ceph_rgw                  = hiera('ceph_rgw_enabled', false),
   $opendaylight              = hiera('opendaylight_api_enabled', false),
   $service_ports             = {}
 ) {
@@ -381,6 +388,8 @@ class tripleo::haproxy (
     trove_api_ssl_port => 13779,
     zaqar_api_port => 8888,
     zaqar_api_ssl_port => 13888,
+    ceph_rgw_port => 8080,
+    ceph_rgw_ssl_port => 13808,
   }
   $ports = merge($default_service_ports, $service_ports)
 
@@ -935,6 +944,17 @@ class tripleo::haproxy (
     }
   }
 
+  if $ceph_rgw {
+    ::tripleo::haproxy::endpoint { 'ceph_rgw':
+      public_virtual_ip => $public_virtual_ip,
+      internal_ip       => hiera('ceph_rgw_vip', $controller_virtual_ip),
+      service_port      => $ports[ceph_rgw_port],
+      ip_addresses      => hiera('ceph_rgw_node_ips', $controller_hosts_real),
+      server_names      => $controller_hosts_names_real,
+      public_ssl_port   => $ports[ceph_rgw_ssl_port],
+    }
+  }
+
   $opendaylight_api_vip = hiera('opendaylight_api_vip', $controller_virtual_ip)
   $opendaylight_bind_opts = {
     "${opendaylight_api_vip}:8081" => [],
index 354d24c..6c5d7fb 100644 (file)
@@ -81,6 +81,9 @@ class tripleo::profile::base::keystone (
     if hiera('ceilometer_api_enabled', false) {
       include ::ceilometer::keystone::auth
     }
+    if hiera('ceph_rgw_enabled', false) {
+      include ::ceph::rgw::keystone::auth
+    }
     if hiera('cinder_api_enabled', false) {
       include ::cinder::keystone::auth
     }