Merge "Add services to ServiceNetMap to select hostnames resolution network"
[apex-tripleo-heat-templates.git] / puppet / controller-puppet.yaml
index ff3f933..9f531ef 100644 (file)
@@ -49,6 +49,11 @@ parameters:
     description: The password for the cinder service and db account, used by cinder-api.
     type: string
     hidden: true
+  CinderBackendConfig:
+    default: {}
+    description: Contains parameters to configure Cinder backends. Typically
+                 set via parameter_defaults in the resource registry.
+    type: json
   CloudName:
     default: ''
     description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
@@ -67,15 +72,14 @@ parameters:
     default: ''
     description: Set to True to enable debugging on all services.
     type: string
+  EnableFencing:
+    default: false
+    description: Whether to enable fencing in Pacemaker or not.
+    type: boolean
   EnableGalera:
     default: true
     description: Whether to use Galera instead of regular MariaDB.
     type: boolean
-  EnablePacemaker:
-    default: false
-    description: If enabled services will be monitored by Pacemaker; it
-      will manage VIPs as well, in place of Keepalived.
-    type: boolean
   EnableCephStorage:
     default: false
     description: Whether to deploy Ceph Storage (OSD) on the Controller
@@ -122,6 +126,38 @@ parameters:
           }
         }
     type: json
+  FencingConfig:
+    default: {}
+    description: |
+      Pacemaker fencing configuration. The JSON should have
+      the following structure:
+        {
+          "devices": [
+            {
+              "agent": "AGENT_NAME",
+              "host_mac": "HOST_MAC_ADDRESS",
+              "params": {"PARAM_NAME": "PARAM_VALUE"}
+            }
+          ]
+        }
+      For instance:
+        {
+          "devices": [
+            {
+              "agent": "fence_xvm",
+              "host_mac": "52:54:00:aa:bb:cc",
+              "params": {
+                "multicast_address": "225.0.0.12",
+                "port": "baremetal_0",
+                "manage_fw": true,
+                "manage_key_file": true,
+                "key_file": "/etc/fence_xvm.key",
+                "key_file_password": "abcdef"
+              }
+            }
+          ]
+        }
+    type: json
   Flavor:
     description: Flavor for control nodes to request when deploying.
     type: string
@@ -226,6 +262,10 @@ parameters:
     type: string
     hidden: true
     default: ''  # Has to be here because of the ignored empty value bug
+  NeutronExternalNetworkBridge:
+    description: Name of bridge used for external network traffic.
+    type: string
+    default: 'br-ex'
   NeutronBridgeMappings:
     description: >
       The OVS logical->physical bridge mappings to use. See the Neutron
@@ -248,6 +288,10 @@ parameters:
     default: 'False'
     description: Whether to enable l3-agent HA
     type: string
+  NeutronDhcpAgentsPerNetwork:
+    type: number
+    default: 3
+    description: The number of neutron dhcp agents to schedule per network
   NeutronDVR:
     default: 'False'
     description: Whether to configure Neutron Distributed Virtual Routers
@@ -368,6 +412,9 @@ parameters:
     default: 5672
     description: Set rabbit subscriber port, change this if using SSL
     type: number
+  RedisVirtualIP:
+    type: string
+    default: ''  # Has to be here because of the ignored empty value bug
   SnmpdReadonlyUserName:
     default: ro_snmp_user
     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
@@ -446,6 +493,15 @@ parameters:
     description: Mapping of service_name -> network name. Typically set
                  via parameter_defaults in the resource registry.
     type: json
+  UpdateIdentifier:
+    default: ''
+    type: string
+    description: >
+      Setting to a previously unused value during stack-update will trigger
+      package update on all nodes
+  Hostname:
+    type: string
+    default: '' # Defaults to Heat created hostname
 
 resources:
 
@@ -460,6 +516,7 @@ resources:
         - network: ctlplane
       user_data_format: SOFTWARE_CONFIG
       user_data: {get_resource: NodeUserData}
+      name: {get_param: Hostname}
 
   NodeUserData:
     type: OS::TripleO::NodeUserData
@@ -519,7 +576,6 @@ resources:
   NetworkDeployment:
     type: OS::TripleO::SoftwareDeployment
     properties:
-      signal_transport: NO_SIGNAL
       config: {get_resource: NetworkConfig}
       server: {get_resource: Controller}
       input_values:
@@ -528,8 +584,8 @@ resources:
 
   ControllerDeployment:
     type: OS::TripleO::SoftwareDeployment
+    depends_on: NetworkDeployment
     properties:
-      signal_transport: NO_SIGNAL
       config: {get_resource: ControllerConfig}
       server: {get_resource: Controller}
       input_values:
@@ -564,6 +620,7 @@ resources:
         cinder_password: {get_param: CinderPassword}
         cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
         cinder_iscsi_helper: {get_param: CinderISCSIHelper}
+        cinder_backend_config: {get_param: CinderBackendConfig}
         cinder_dsn:
           list_join:
             - ''
@@ -621,6 +678,7 @@ resources:
             - - 'http://'
               - {get_param: KeystonePublicApiVirtualIP}
               - ':5000/v2.0/'
+        enable_fencing: {get_param: EnableFencing}
         enable_galera: {get_param: EnableGalera}
         enable_ceph_storage: {get_param: EnableCephStorage}
         enable_swift_storage: {get_param: EnableSwiftStorage}
@@ -638,6 +696,7 @@ resources:
         neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers}
         neutron_allow_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
         neutron_l3_ha: {get_param: NeutronL3HA}
+        neutron_dhcp_agents_per_network: {get_param: NeutronDhcpAgentsPerNetwork}
         neutron_network_vlan_ranges:
           str_replace:
             template: "['RANGES']"
@@ -647,6 +706,7 @@ resources:
                 - "','"
                 - {get_param: NeutronNetworkVLANRanges}
         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
+        neutron_external_network_bridge: {get_param: NeutronExternalNetworkBridge}
         neutron_public_interface: {get_param: NeutronPublicInterface}
         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
         neutron_public_interface_default_route: {get_param: NeutronPublicInterfaceDefaultRoute}
@@ -678,6 +738,12 @@ resources:
         ceilometer_backend: {get_param: CeilometerBackend}
         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
         ceilometer_password: {get_param: CeilometerPassword}
+        ceilometer_coordination_url:
+          list_join:
+            - ''
+            - - 'redis://'
+              - {get_param: RedisVirtualIP}
+              - ':6379'
         ceilometer_dsn:
           list_join:
             - ''
@@ -695,6 +761,7 @@ resources:
               - '@'
               - {get_param: MysqlVirtualIP}
               - '/nova'
+        fencing_config: {get_param: FencingConfig}
         pcsd_password: {get_param: PcsdPassword}
         rabbit_username: {get_param: RabbitUserName}
         rabbit_password: {get_param: RabbitPassword}
@@ -734,13 +801,14 @@ resources:
         keystone_admin_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}]}
         mongo_db_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MongoDbNetwork]}]}
         neutron_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]}
-        neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronLocalIp]}]}
+        neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
         ceilometer_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
         nova_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]}
         nova_metadata_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]}
         horizon_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, HorizonNetwork]}]}
         rabbitmq_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, RabbitMqNetwork]}]}
         redis_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, RedisNetwork]}]}
+        redis_vip: {get_param: RedisVirtualIP}
         memcached_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MemcachedNetwork]}]}
         mysql_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MysqlNetwork]}]}
         ceph_cluster_network: {get_attr: [NetIpSubnetMap, net_ip_map, {get_param: [ServiceNetMap, CephClusterNetwork]}]}
@@ -766,6 +834,7 @@ resources:
             - vip_data # provided by vip-config
             - '"%{::osfamily}"'
             - common
+            - cinder_netapp_data # Optionally provided by ControllerExtraConfigPre
           datafiles:
             common:
               raw_data: {get_file: hieradata/common.yaml}
@@ -783,7 +852,9 @@ resources:
                 bootstack_nodeid: {get_input: bootstack_nodeid}
 
                 # Pacemaker
+                enable_fencing: {get_input: enable_fencing}
                 hacluster_pwd: {get_input: pcsd_password}
+                tripleo::fencing::config: {get_input: fencing_config}
 
                 # Swift
                 swift::proxy::proxy_local_net_ip: {get_input: swift_proxy_network}
@@ -818,6 +889,7 @@ resources:
                 cinder::debug: {get_input: debug}
                 cinder_enable_iscsi_backend: {get_input: cinder_enable_iscsi_backend}
                 cinder::glance::glance_api_servers: {get_input: glance_api_servers}
+                cinder_backend_config: {get_input: CinderBackendConfig}
 
                 # Glance
                 glance::api::bind_port: {get_input: glance_port}
@@ -895,6 +967,7 @@ resources:
                 neutron::server::auth_uri: {get_input: keystone_auth_uri}
                 neutron::server::identity_uri: {get_input: keystone_identity_uri}
                 neutron::server::database_connection: {get_input: neutron_dsn}
+                neutron::agents::l3::external_network_bridge: {get_input: neutron_external_network_bridge}
                 neutron::agents::ml2::ovs::enable_tunneling: {get_input: neutron_enable_tunneling}
                 neutron::agents::ml2::ovs::local_ip: {get_input: neutron_local_ip}
                 neutron_flat_networks: {get_input: neutron_flat_networks}
@@ -905,6 +978,7 @@ resources:
                 neutron_mechanism_drivers: {get_input: neutron_mechanism_drivers}
                 neutron::server::allow_automatic_l3agent_failover: {get_input: neutron_allow_l3agent_failover}
                 neutron::server::l3_ha: {get_input: neutron_l3_ha}
+                neutron::dhcp_agents_per_network: {get_input: neutron_dhcp_agents_per_network}
                 neutron::plugins::ml2::network_vlan_ranges: {get_input: neutron_network_vlan_ranges}
                 neutron_bridge_mappings: {get_input: neutron_bridge_mappings}
                 neutron_public_interface: {get_input: neutron_public_interface}
@@ -934,6 +1008,7 @@ resources:
                 ceilometer::api::keystone_identity_uri: {get_input: keystone_identity_uri}
                 ceilometer::agent::auth::auth_password: {get_input: ceilometer_password}
                 ceilometer::agent::auth::auth_url: {get_input: keystone_auth_address}
+                ceilometer::agent::central::coordination_url: {get_input: ceilometer_coordination_url}
                 snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
                 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
 
@@ -954,8 +1029,10 @@ resources:
                 nova::network::neutron::neutron_admin_password: {get_input: neutron_password}
                 nova::network::neutron::neutron_url: {get_input: neutron_url}
                 nova::network::neutron::neutron_admin_auth_url: {get_input: neutron_admin_auth_url}
+                nova::vncproxy::host: {get_input: nova_api_network}
 
                 # Horizon
+                apache::ip: {get_input: horizon_network}
                 horizon::django_debug: {get_input: debug}
                 horizon::secret_key: {get_input: horizon_secret}
                 horizon::bind_address: {get_input: horizon_network}
@@ -966,6 +1043,7 @@ resources:
                 rabbitmq::erlang_cookie: {get_input: rabbit_cookie}
                 # Redis
                 redis::bind: {get_input: redis_network}
+                redis_vip: {get_input: redis_vip}
                 # Misc
                 memcached::listen_ip: {get_input: memcached_network}
                 neutron_public_interface_ip: {get_input: neutron_public_interface_ip}
@@ -976,6 +1054,25 @@ resources:
                 tripleo::loadbalancer::public_virtual_interface: {get_input: public_virtual_interface}
                 enable_package_install: {get_input: enable_package_install}
 
+  # Hook for site-specific additional pre-deployment config, e.g extra hieradata
+  ControllerExtraConfigPre:
+    depends_on: ControllerDeployment
+    type: OS::TripleO::ControllerExtraConfigPre
+    properties:
+        server: {get_resource: Controller}
+
+  UpdateConfig:
+    type: OS::TripleO::Tasks::PackageUpdate
+
+  UpdateDeployment:
+    type: OS::Heat::SoftwareDeployment
+    properties:
+      config: {get_resource: UpdateConfig}
+      server: {get_resource: Controller}
+      input_values:
+        update_identifier:
+          get_param: UpdateIdentifier
+
 outputs:
   ip_address:
     description: IP address of the server in the ctlplane network
@@ -1010,9 +1107,9 @@ outputs:
       Server's IP address and hostname in the /etc/hosts format
     value:
       str_replace:
-        template: IP HOST CLOUDNAME
+        template: IP HOST.localdomain HOST CLOUDNAME
         params:
-          IP: {get_attr: [Controller, networks, ctlplane, 0]}
+          IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ControllerHostnameResolveNetwork]}]}
           HOST: {get_attr: [Controller, name]}
           CLOUDNAME: {get_param: CloudName}
   nova_server_resource:
@@ -1033,3 +1130,10 @@ outputs:
         template: "IP:11211"
         params:
           IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MemcachedNetwork]}]}
+  config_identifier:
+    description: identifier which changes if the controller configuration may need re-applying
+    value:
+      list_join:
+      - ','
+      - - {get_attr: [ControllerDeployment, deploy_stdout]}
+        - {get_attr: [ControllerExtraConfigPre, deploy_stdout]}