Make CloudName available for Endpoints
authorMark Chappell <mchappel@redhat.com>
Wed, 28 Oct 2015 14:30:41 +0000 (15:30 +0100)
committerMark Chappell <mchappel@redhat.com>
Wed, 11 Nov 2015 08:24:10 +0000 (09:24 +0100)
CloudName is the DNS name for the public VIP this means we will likely
want it available for use in the endpoint hostnames, rather than people
needing to copy and paste the same hostname

Change-Id: Ic6d708b083244442195eee890de91bbc7e133ec2

network/endpoints/endpoint.yaml
network/endpoints/endpoint_map.yaml
overcloud-without-mergepy.yaml

index 8ffd6c4..4d6efdb 100644 (file)
@@ -19,6 +19,10 @@ parameters:
     type: string
     default: ''
     description: A suffix attached to the URL
+  CloudName:
+    type: string
+    default: ''
+    description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
 
 outputs:
   endpoint:
@@ -31,7 +35,7 @@ outputs:
       host:
         str_replace:
           template: {get_param: [EndpointMap, {get_param: EndpointName }, host]}
-          params: {IP_ADDRESS: {get_param: IP} }
+          params: {IP_ADDRESS: {get_param: IP}, CLOUDNAME: {get_param: CloudName}}
       uri:
         list_join:
           - ''
@@ -39,7 +43,7 @@ outputs:
             - '://'
             - str_replace:
                 template: {get_param: [EndpointMap, {get_param: EndpointName }, host]}
-                params: {IP_ADDRESS: {get_param: IP} }
+                params: {IP_ADDRESS: {get_param: IP}, CLOUDNAME: {get_param: CloudName }}
             - ':'
             - {get_param: [EndpointMap, {get_param: EndpointName }, port] }
             - {get_param: UriSuffix }
@@ -50,6 +54,6 @@ outputs:
             - '://'
             - str_replace:
                 template: {get_param: [EndpointMap, {get_param: EndpointName }, host]}
-                params: {IP_ADDRESS: {get_param: IP} }
+                params: {IP_ADDRESS: {get_param: IP}, CLOUDNAME: {get_param: CloudName} }
             - ':'
             - {get_param: [EndpointMap, {get_param: EndpointName }, port] }
index 9c000c3..ca16b7d 100644 (file)
@@ -72,6 +72,10 @@ parameters:
       SwiftPublic: {protocol: 'http', port: '8080', host: 'IP_ADDRESS'}
     description: Mapping of service endpoint -> protocol. Typically set
                  via parameter_defaults in the resource registry.
+  CloudName:
+    type: string
+    default: ''
+    description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
 
 resources:
 
@@ -80,18 +84,21 @@ resources:
     properties:
       EndpointName: CeilometerInternal
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: CeilometerApiVirtualIP}
   CeilometerPublic:
     type: OS::TripleO::Endpoint
     properties:
       EndpointName: CeilometerPublic
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: PublicVirtualIP}
   CeilometerAdmin:
     type: OS::TripleO::Endpoint
     properties:
       EndpointName: CeilometerAdmin
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: CeilometerApiVirtualIP}
 
   CinderInternal:
@@ -99,6 +106,7 @@ resources:
     properties:
       EndpointName: CinderInternal
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: CinderApiVirtualIP}
       UriSuffix: '/v1/%(tenant_id)s'
   CinderPublic:
@@ -106,6 +114,7 @@ resources:
     properties:
       EndpointName: CinderPublic
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: PublicVirtualIP}
       UriSuffix: '/v1/%(tenant_id)s'
   CinderAdmin:
@@ -113,6 +122,7 @@ resources:
     properties:
       EndpointName: CinderAdmin
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: CinderApiVirtualIP}
       UriSuffix: '/v1/%(tenant_id)s'
 
@@ -121,6 +131,7 @@ resources:
     properties:
       EndpointName: CinderInternal
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: CinderApiVirtualIP}
       UriSuffix: '/v2/%(tenant_id)s'
   CinderV2Public:
@@ -128,6 +139,7 @@ resources:
     properties:
       EndpointName: CinderPublic
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: PublicVirtualIP}
       UriSuffix: '/v2/%(tenant_id)s'
   CinderV2Admin:
@@ -135,6 +147,7 @@ resources:
     properties:
       EndpointName: CinderAdmin
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: CinderApiVirtualIP}
       UriSuffix: '/v2/%(tenant_id)s'
 
@@ -143,18 +156,21 @@ resources:
     properties:
       EndpointName: GlanceInternal
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: GlanceApiVirtualIP}
   GlancePublic:
     type: OS::TripleO::Endpoint
     properties:
       EndpointName: GlancePublic
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: PublicVirtualIP}
   GlanceAdmin:
     type: OS::TripleO::Endpoint
     properties:
       EndpointName: GlanceAdmin
       EndpointMap: { get_param: EndpointMap }
+      CloudName: {get_param: CloudName}
       IP: {get_param: GlanceApiVirtualIP}
 
   HeatInternal:
@@ -163,6 +179,7 @@ resources:
       EndpointName: HeatInternal
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: HeatApiVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v1/%(tenant_id)s'
   HeatPublic:
     type: OS::TripleO::Endpoint
@@ -170,6 +187,7 @@ resources:
       EndpointName: HeatPublic
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: PublicVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v1/%(tenant_id)s'
   HeatAdmin:
     type: OS::TripleO::Endpoint
@@ -177,6 +195,7 @@ resources:
       EndpointName: HeatAdmin
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: HeatApiVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v1/%(tenant_id)s'
 
   KeystoneInternal:
@@ -185,6 +204,7 @@ resources:
       EndpointName: KeystoneInternal
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: KeystonePublicApiVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v2.0'
   KeystonePublic:
     type: OS::TripleO::Endpoint
@@ -192,6 +212,7 @@ resources:
       EndpointName: KeystonePublic
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: PublicVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v2.0'
   KeystoneAdmin:
     type: OS::TripleO::Endpoint
@@ -199,6 +220,7 @@ resources:
       EndpointName: KeystoneAdmin
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: KeystoneAdminApiVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v2.0'
   KeystoneEC2:
     type: OS::TripleO::Endpoint
@@ -206,6 +228,7 @@ resources:
       EndpointName: KeystoneInternal
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: KeystonePublicApiVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v2.0/ec2tokens'
 
   NeutronInternal:
@@ -214,18 +237,21 @@ resources:
       EndpointName: NeutronInternal
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: NeutronApiVirtualIP}
+      CloudName: {get_param: CloudName}
   NeutronPublic:
     type: OS::TripleO::Endpoint
     properties:
       EndpointName: NeutronPublic
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: PublicVirtualIP}
+      CloudName: {get_param: CloudName}
   NeutronAdmin:
     type: OS::TripleO::Endpoint
     properties:
       EndpointName: NeutronAdmin
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: NeutronApiVirtualIP}
+      CloudName: {get_param: CloudName}
 
   NovaInternal:
     type: OS::TripleO::Endpoint
@@ -233,6 +259,7 @@ resources:
       EndpointName: NovaInternal
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: NovaApiVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v2/%(tenant_id)s'
   NovaPublic:
     type: OS::TripleO::Endpoint
@@ -240,6 +267,7 @@ resources:
       EndpointName: NovaPublic
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: PublicVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v2/%(tenant_id)s'
   NovaAdmin:
     type: OS::TripleO::Endpoint
@@ -247,6 +275,7 @@ resources:
       EndpointName: NovaAdmin
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: NovaApiVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v2/%(tenant_id)s'
   NovaV3Internal:
     type: OS::TripleO::Endpoint
@@ -254,6 +283,7 @@ resources:
       EndpointName: NovaInternal
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: NovaApiVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v3'
   NovaV3Public:
     type: OS::TripleO::Endpoint
@@ -261,6 +291,7 @@ resources:
       EndpointName: NovaPublic
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: PublicVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v3'
   NovaV3Admin:
     type: OS::TripleO::Endpoint
@@ -268,6 +299,7 @@ resources:
       EndpointName: NovaAdmin
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: NovaApiVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v3'
 
   NovaEC2Internal:
@@ -276,6 +308,7 @@ resources:
       EndpointName: NovaEC2Internal
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: NovaApiVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/services/Cloud'
   NovaEC2Public:
     type: OS::TripleO::Endpoint
@@ -283,6 +316,7 @@ resources:
       EndpointName: NovaEC2Public
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: PublicVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/services/Cloud'
   NovaEC2Admin:
     type: OS::TripleO::Endpoint
@@ -290,6 +324,7 @@ resources:
       EndpointName: NovaEC2Admin
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: NovaApiVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/services/Admin'
 
   SwiftInternal:
@@ -298,6 +333,7 @@ resources:
       EndpointName: SwiftInternal
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: SwiftProxyVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v1/AUTH_%(tenant_id)s'
   SwiftPublic:
     type: OS::TripleO::Endpoint
@@ -305,6 +341,7 @@ resources:
       EndpointName: SwiftPublic
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: PublicVirtualIP}
+      CloudName: {get_param: CloudName}
       UriSuffix: '/v1/AUTH_%(tenant_id)s'
   SwiftAdmin:
     type: OS::TripleO::Endpoint
@@ -312,6 +349,7 @@ resources:
       EndpointName: SwiftAdmin
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: SwiftProxyVirtualIP}
+      CloudName: {get_param: CloudName}
       # No Suffix for the Admin interface
   SwiftS3Internal:
     type: OS::TripleO::Endpoint
@@ -319,18 +357,21 @@ resources:
       EndpointName: SwiftInternal
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: SwiftProxyVirtualIP}
+      CloudName: {get_param: CloudName}
   SwiftS3Public:
     type: OS::TripleO::Endpoint
     properties:
       EndpointName: SwiftPublic
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: PublicVirtualIP}
+      CloudName: {get_param: CloudName}
   SwiftS3Admin:
     type: OS::TripleO::Endpoint
     properties:
       EndpointName: SwiftAdmin
       EndpointMap: { get_param: EndpointMap }
       IP: {get_param: SwiftProxyVirtualIP}
+      CloudName: {get_param: CloudName}
 
 outputs:
   endpoint_map:
index 55c14dc..78886c6 100644 (file)
@@ -754,6 +754,7 @@ resources:
   EndpointMap:
     type: OS::TripleO::EndpointMap
     properties:
+      CloudName: {get_param: CloudName}
       CeilometerApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
       CinderApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]}
       GlanceApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}