Merge "Haproxy configuration"
[apex-tripleo-heat-templates.git] / overcloud-source.yaml
index 52e2f37..a5784f0 100644 (file)
@@ -21,6 +21,10 @@ Parameters:
     Default: tgtadm
     Description: The iSCSI helper to use with cinder.
     Type: String
+  CinderLVMLoopDeviceSize:
+    Default: 5000
+    Description: The size of the loopback file used by the cinder LVM driver.
+    Type: Number
   ExtraConfig:
     Default: {}
     Description: |
@@ -67,6 +71,14 @@ Parameters:
     Default: baremetal
     Description: Flavor for compute nodes to request when deploying.
     Type: String
+  GlancePort:
+    Default: 9292
+    Description: Glance port.
+    Type: String
+  GlanceProtocol:
+    Default: http
+    Description: Protocol to use when connecting to glance, set to https for SSL.
+    Type: String
   GlancePassword:
     Default: unset
     Description: The password for the glance service account, used by the glance services.
@@ -117,6 +129,15 @@ Parameters:
     Description: The password for the ceilometer service account.
     Type: String
     NoEcho: true
+  SnmpdReadonlyUserName:
+    Default: ro_snmp_user
+    Description: The user name for SNMPd with readonly rights running on all Overcloud nodes
+    Type: String
+  SnmpdReadonlyUserPassword:
+    Default: unset
+    Description: The user password for SNMPd with readonly rights running on all Overcloud nodes
+    Type: String
+    NoEcho: true
   CloudName:
     Default: ''
     Description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
@@ -217,10 +238,41 @@ Parameters:
     Description: The image ID for live-updates to the overcloud compute nodes.
     Default: ''
   MysqlInnodbBufferPoolSize:
-    Description: Specifies the size of the buffer pool in megabytes.
+    Description: >
+        Specifies the size of the buffer pool in megabytes. Setting to
+        zero should be interpreted as "no value" and will defer to the
+        lower level default.
     Type: Number
-    Default: 100
+    Default: 0
+  ControlVirtualInterface:
+    Default: 'br-ex'
+    Description: Interface where virtual ip will be assigned.
+    Type: String
+  ControlFixedIPs:
+    Default: []
+    Description: Should be used for arbitrary ips.
+    Type: Json
+  KeystoneCACertificate:
+    Default: ''
+    Description: Keystone self-signed certificate authority certificate.
+    Type: String
+  KeystoneSigningCertificate:
+    Default: ''
+    Description: Keystone certificate for verifying token validity.
+    Type: String
+  KeystoneSigningKey:
+    Default: ''
+    Description: Keystone key for signing tokens.
+    Type: String
+    NoEcho: true
 Resources:
+  ControlVirtualIP:
+    Type: OS::Neutron::Port
+    Properties:
+      name: control_virtual_ip
+      network_id: {Ref: NeutronControlPlaneID}
+      fixed_ips:
+        Ref: ControlFixedIPs
   RabbitCookie:
     Type: OS::Heat::RandomString
     Properties:
@@ -232,14 +284,14 @@ Resources:
     Path: nova-compute-instance.yaml
     SubKey: Resources.NovaCompute0Deploy
     Parameters:
-        NovaApiHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
-        KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
-        RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
-        NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
-        GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
-        NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/nova']]}
-        CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/ceilometer']]}
-        NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/neutron']]}
+        NovaApiHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
+        KeystoneHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
+        RabbitHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
+        NeutronHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
+        GlanceHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
+        NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/nova']]}
+        CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/ceilometer']]}
+        NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/neutron']]}
         NeutronNetworkType: "gre"
         NeutronEnableTunnelling: "True"
         NeutronFlatNetworks:
@@ -322,6 +374,7 @@ Resources:
   controllerConfig:
     Type: OS::Heat::StructuredConfig
     Properties:
+      group: os-apply-config
       config:
         completion-signal: {get_input: deploy_signal_id}
         admin-password:
@@ -331,9 +384,24 @@ Resources:
         bootstack:
           public_interface_ip:
             Ref: NeutronPublicInterfaceIP
+        bootstrap_host:
+          bootstrap_nodeid:
+            Fn::Select:
+            - 0
+            - Fn::Select:
+              - 0
+              - Merge::Map:
+                  controller0:
+                  - Fn::Select:
+                    - name
+                    - Fn::GetAtt:
+                      - controller0
+                      - show
+          nodeid: {get_input: bootstack_nodeid}
         cinder:
           db: mysql://cinder:unset@localhost/cinder
-          volume_size_mb: '5000'
+          volume_size_mb:
+            Ref: CinderLVMLoopDeviceSize
           service-password:
             Ref: CinderPassword
           iscsi-helper:
@@ -342,10 +410,16 @@ Resources:
           get_input: controller_host
         db-password: unset
         glance:
+          registry:
+            host: {get_input: controller_virtual_ip}
           backend: swift
           db: mysql://glance:unset@localhost/glance
           host:
             get_input: controller_host
+          port:
+            Ref: GlancePort
+          protocol:
+            Ref: GlanceProtocol
           service-password:
             Ref: GlancePassword
           swift-store-user: service:glance
@@ -371,12 +445,14 @@ Resources:
           db: mysql://keystone:unset@localhost/keystone
           host:
             get_input: controller_host
+          ca_certificate: {Ref: KeystoneCACertificate}
+          signing_key: {Ref: KeystoneSigningKey}
+          signing_certificate: {Ref: KeystoneSigningCertificate}
         mysql:
           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
         neutron:
           flat-networks: {Ref: NeutronFlatNetworks}
-          host:
-            get_input: controller_host
+          host: {get_input: controller_virtual_ip}
           metadata_proxy_shared_secret: unset
           ovs:
             enable_tunneling: 'True'
@@ -401,13 +477,18 @@ Resources:
           metering_secret: {Ref: CeilometerMeteringSecret}
           service-password:
             Ref: CeilometerPassword
+        snmpd:
+          export_MIB: UCD-SNMP-MIB
+          readonly_user_name:
+            Ref: SnmpdReadonlyUserName
+          readonly_user_password:
+            Ref: SnmpdReadonlyUserPassword
         nova:
           compute_driver: libvirt.LibvirtDriver
           db: mysql://nova:unset@localhost/nova
           default_floating_pool:
             ext-net
-          host:
-            get_input: controller_host
+          host: {get_input: controller_virtual_ip}
           metadata-proxy: true
           service-password:
             Ref: NovaPassword
@@ -425,9 +506,58 @@ Resources:
         ntp:
           servers:
               - {server: {Ref: NtpServer}, fudge: "stratum 0"}
+        keepalived:
+          keepalive_interface:
+            Ref: NeutronPublicInterface
+          priority: 101
+        virtual_ips:
+            -
+              ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
+              interface:
+                Ref: ControlVirtualInterface
+        haproxy:
+          nodes:
+            Merge::Map:
+              controller0:
+                ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
+                name: {"Fn::Select": [ name, {"Fn::GetAtt": [controller0, show]} ] }
+          net_binds:
+            - ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
+          services:
+            - name: keystone_admin
+              port: 35357
+            - name: keystone_public
+              port: 5000
+            - name: horizon
+              port: 80
+            - name: neutron
+              port: 9696
+            - name: cinder
+              port: 8776
+            - name: glance_api
+              port: 9292
+            - name: glance_registry
+              port: 9191
+            - name: heat_api
+              port: 8004
+            - name: heat_cloudwatch
+              port: 8003
+            - name: heat_cfn
+              port: 8000
+            - name: nova_ec2
+              port: 8773
+            - name: nova_osapi
+              port: 8774
+            - name: nova_metadata
+              port: 8775
+            - name: ceilometer
+              port: 8777
+            - name: swift_proxy_server
+              port: 8080
   controllerPassthrough:
     Type: OS::Heat::StructuredConfig
     Properties:
+      group: os-apply-config
       config: {get_input: passthrough_config}
   controller0:
     Type: OS::Nova::Server
@@ -447,7 +577,13 @@ Resources:
       config: {Ref: controllerConfig}
       server: {Ref: controller0}
       input_values:
-        controller_host:  
+        bootstack_nodeid:
+          Fn::Select:
+          - name
+          - Fn::GetAtt:
+            - controller0
+            - show
+        controller_host:
           Fn::Select:
             - 0
             - Fn::Select:
@@ -459,19 +595,19 @@ Resources:
           Fn::Join:
             - ''
             - - 'http://'
-              - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
+              - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
               - ':8003'
         heat.metadata_server_url:
           Fn::Join:
             - ''
             - - 'http://'
-              - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
+              - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
               - ':8000'
         heat.waitcondition_server_url:
           Fn::Join:
             - ''
             - - 'http://'
-              - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
+              - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
               - ':8000/v1/waitcondition'
         hosts:
           Fn::Join:
@@ -529,6 +665,8 @@ Resources:
                               - show
                           - 'novalocal'
                       - {Ref: CloudName}
+        controller_virtual_ip:
+          {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
   controller0SSLDeployment:
     Type: OS::Heat::StructuredDeployment
     Properties:
@@ -538,6 +676,7 @@ Resources:
       input_values:
         ssl_certificate: {Ref: SSLCertificate}
         ssl_key: {Ref: SSLKey}
+        ssl_ca_certificate: {Ref: SSLCACertificate}
   controller0Passthrough:
     Type: OS::Heat::StructuredDeployment
     Properties:
@@ -554,10 +693,10 @@ Outputs:
       - ''
       - - http://
         - Fn::Select:
-          - 0
+          - ip_address
           - Fn::Select:
-            - ctlplane
+            - 0
             - Fn::GetAtt:
-              - controller0
-              - networks
+              - ControlVirtualIP
+              - fixed_ips
         - :5000/v2.0/