Merge "Adds horizon to pacemaker when puppet-pacemaker is enabled"
[apex-tripleo-heat-templates.git] / puppet / compute-puppet.yaml
index 7005981..96b0084 100644 (file)
@@ -1,4 +1,4 @@
-heat_template_version: 2014-10-16
+heat_template_version: 2015-04-30
 
 description: >
   OpenStack hypervisor node configured via Puppet.
 
 description: >
   OpenStack hypervisor node configured via Puppet.
@@ -110,13 +110,13 @@ parameters:
       network) - if changing this either use different post-install network
       scripts or be sure to keep 'datacentre' as a mapping network name.
     type: string
       network) - if changing this either use different post-install network
       scripts or be sure to keep 'datacentre' as a mapping network name.
     type: string
-    default: ""
+    default: "datacentre:br-ex"
   NeutronEnableTunnelling:
     type: string
     default: "True"
   NeutronFlatNetworks:
     type: string
   NeutronEnableTunnelling:
     type: string
     default: "True"
   NeutronFlatNetworks:
     type: string
-    default: ''
+    default: 'datacentre'
     description: >
       If set, flat networks to configure in neutron plugins.
   NeutronHost:
     description: >
       If set, flat networks to configure in neutron plugins.
   NeutronHost:
@@ -132,14 +132,14 @@ parameters:
       The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the
       Neutron documentation for permitted values. Defaults to permitting any
       VLAN on the 'datacentre' physical network (See NeutronBridgeMappings).
       The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the
       Neutron documentation for permitted values. Defaults to permitting any
       VLAN on the 'datacentre' physical network (See NeutronBridgeMappings).
-    type: string
+    type: comma_delimited_list
   NeutronPassword:
     default: unset
     description: The password for the neutron service account, used by neutron agents.
     type: string
     hidden: true
   NeutronPhysicalBridge:
   NeutronPassword:
     default: unset
     description: The password for the neutron service account, used by neutron agents.
     type: string
     hidden: true
   NeutronPhysicalBridge:
-    default: ''
+    default: 'br-ex'
     description: An OVS bridge to create for accessing external networks.
     type: string
   NeutronPublicInterface:
     description: An OVS bridge to create for accessing external networks.
     type: string
   NeutronPublicInterface:
@@ -168,11 +168,13 @@ parameters:
         The mechanism drivers for the Neutron tenant network. To specify multiple
         values, use a comma separated string, like so: 'openvswitch,l2_population'
     type: string
         The mechanism drivers for the Neutron tenant network. To specify multiple
         values, use a comma separated string, like so: 'openvswitch,l2_population'
     type: string
+  # Not relevant for Computes, should be removed
   NeutronAllowL3AgentFailover:
     default: 'True'
     description: Allow automatic l3-agent failover
     type: string
   NeutronAllowL3AgentFailover:
     default: 'True'
     description: Allow automatic l3-agent failover
     type: string
-  NeutronL3HA: #FIXME this isn't wired in
+  # Not relevant for Computes, should be removed
+  NeutronL3HA:
     default: 'False'
     description: Whether to enable l3-agent HA
     type: string
     default: 'False'
     description: Whether to enable l3-agent HA
     type: string
@@ -195,6 +197,10 @@ parameters:
   NovaComputeLibvirtType:
     type: string
     default: ''
   NovaComputeLibvirtType:
     type: string
     default: ''
+  NovaEnableRbdBackend:
+    default: false
+    description: Whether to enable or not the Rbd backend for Nova
+    type: boolean
   NovaPassword:
     default: unset
     description: The password for the nova service account, used by nova-api.
   NovaPassword:
     default: unset
     description: The password for the nova service account, used by nova-api.
@@ -218,6 +224,16 @@ parameters:
     default: guest
     description: The username for RabbitMQ
     type: string
     default: guest
     description: The username for RabbitMQ
     type: string
+  RabbitClientUseSSL:
+    default: false
+    description: >
+        Rabbit client subscriber parameter to specify
+        an SSL connection to the RabbitMQ host.
+    type: string
+  RabbitClientPort:
+    default: 5672
+    description: Set rabbit subscriber port, change this if using SSL
+    type: number
   SnmpdReadonlyUserName:
     default: ro_snmp_user
     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
   SnmpdReadonlyUserName:
     default: ro_snmp_user
     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
@@ -231,6 +247,20 @@ parameters:
     default: 'false'
     description: Set to true to enable package installation via Puppet
     type: boolean
     default: 'false'
     description: Set to true to enable package installation via Puppet
     type: boolean
+  ServiceNetMap:
+    default: {}
+    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:
 
 
 resources:
 
@@ -246,15 +276,46 @@ resources:
       networks:
         - network: ctlplane
       user_data_format: SOFTWARE_CONFIG
       networks:
         - network: ctlplane
       user_data_format: SOFTWARE_CONFIG
+      user_data: {get_resource: NodeUserData}
+      name: {get_param: Hostname}
+
+  NodeUserData:
+    type: OS::TripleO::NodeUserData
+
+  InternalApiPort:
+    type: OS::TripleO::Compute::Ports::InternalApiPort
+    properties:
+      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+
+  StoragePort:
+    type: OS::TripleO::Compute::Ports::StoragePort
+    properties:
+      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+
+  TenantPort:
+    type: OS::TripleO::Compute::Ports::TenantPort
+    properties:
+      ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+
+  NetIpMap:
+    type: OS::TripleO::Network::Ports::NetIpMap
+    properties:
+      InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
+      StorageIp: {get_attr: [StoragePort, ip_address]}
+      TenantIp: {get_attr: [TenantPort, ip_address]}
 
   NetworkConfig:
 
   NetworkConfig:
-    type: OS::TripleO::Net::SoftwareConfig
+    type: OS::TripleO::Compute::Net::SoftwareConfig
+    properties:
+      InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
+      StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
+      TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
 
   NetworkDeployment:
     type: OS::TripleO::SoftwareDeployment
     properties:
       signal_transport: NO_SIGNAL
 
   NetworkDeployment:
     type: OS::TripleO::SoftwareDeployment
     properties:
       signal_transport: NO_SIGNAL
-      config: {get_attr: [NetworkConfig, config_id]}
+      config: {get_resource: NetworkConfig}
       server: {get_resource: NovaCompute}
       input_values:
         bridge_name: {get_param: NeutronPhysicalBridge}
       server: {get_resource: NovaCompute}
       input_values:
         bridge_name: {get_param: NeutronPhysicalBridge}
@@ -269,38 +330,55 @@ resources:
           hierarchy:
             - heat_config_%{::deploy_config_name}
             - compute
           hierarchy:
             - heat_config_%{::deploy_config_name}
             - compute
+            - ceph_cluster # provided by CephClusterConfig
+            - ceph
+            - all_nodes # provided by allNodesConfig
+            - '"%{::osfamily}"'
             - common
           datafiles:
             common:
               raw_data: {get_file: hieradata/common.yaml}
             - common
           datafiles:
             common:
               raw_data: {get_file: hieradata/common.yaml}
+            ceph:
+              raw_data: {get_file: hieradata/ceph.yaml}
             compute:
               raw_data: {get_file: hieradata/compute.yaml}
             compute:
               raw_data: {get_file: hieradata/compute.yaml}
-              oac_data:
-                nova::compute::vncserver_proxyclient_address: local-ipv4
               mapped_data:
               mapped_data:
-                #nova::debug: {get_input: debug}
+                nova::debug: {get_input: debug}
+                nova::rabbit_userid: {get_input: rabbit_username}
+                nova::rabbit_password: {get_input: rabbit_password}
+                nova::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
+                nova::rabbit_port: {get_input: rabbit_client_port}
                 nova_compute_driver: {get_input: nova_compute_driver}
                 nova::compute::libvirt::libvirt_virt_type: {get_input: nova_compute_libvirt_type}
                 nova_api_host: {get_input: nova_api_host}
                 nova::compute::vncproxy_host: {get_input: nova_public_ip}
                 nova_compute_driver: {get_input: nova_compute_driver}
                 nova::compute::libvirt::libvirt_virt_type: {get_input: nova_compute_libvirt_type}
                 nova_api_host: {get_input: nova_api_host}
                 nova::compute::vncproxy_host: {get_input: nova_public_ip}
+                nova_enable_rbd_backend: {get_input: nova_enable_rbd_backend}
                 nova_password: {get_input: nova_password}
                 nova_password: {get_input: nova_password}
-                #ceilometer::debug: {get_input: debug}
+                nova::compute::vncserver_proxyclient_address: {get_input: nova_vnc_proxyclient_address}
+                ceilometer::debug: {get_input: debug}
+                ceilometer::rabbit_userid: {get_input: rabbit_username}
+                ceilometer::rabbit_password: {get_input: rabbit_password}
+                ceilometer::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
+                ceilometer::rabbit_port: {get_input: rabbit_client_port}
                 ceilometer::metering_secret: {get_input: ceilometer_metering_secret}
                 ceilometer::agent::auth::auth_password: {get_input: ceilometer_password}
                 ceilometer::metering_secret: {get_input: ceilometer_metering_secret}
                 ceilometer::agent::auth::auth_password: {get_input: ceilometer_password}
+                ceilometer::agent::auth::auth_url: {get_input: ceilometer_agent_auth_url}
                 ceilometer_compute_agent: {get_input: ceilometer_compute_agent}
                 snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
                 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
                 ceilometer_compute_agent: {get_input: ceilometer_compute_agent}
                 snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
                 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
-                glance_host: {get_input: glance_host}
-                glance_port: {get_input: glance_port}
-                glance_protocol: {get_input: glance_protocol}
-                keystone_host: {get_input: keystone_host}
-                #neutron::debug: {get_input: debug}
+                nova::glance_api_servers: {get_input: glance_api_servers}
+                neutron::debug: {get_input: debug}
+                neutron::rabbit_password: {get_input: rabbit_password}
+                neutron::rabbit_user: {get_input: rabbit_user}
+                neutron::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
+                neutron::rabbit_port: {get_input: rabbit_client_port}
                 neutron_flat_networks: {get_input: neutron_flat_networks}
                 neutron_host: {get_input: neutron_host}
                 neutron::agents::ml2::ovs::local_ip: {get_input: neutron_local_ip}
                 neutron_flat_networks: {get_input: neutron_flat_networks}
                 neutron_host: {get_input: neutron_host}
                 neutron::agents::ml2::ovs::local_ip: {get_input: neutron_local_ip}
+
                 neutron_tenant_network_type: {get_input: neutron_tenant_network_type}
                 neutron_tunnel_types: {get_input: neutron_tunnel_types}
                 neutron_tenant_network_type: {get_input: neutron_tenant_network_type}
                 neutron_tunnel_types: {get_input: neutron_tunnel_types}
-                neutron::network_vlan_ranges: {get_input: neutron_network_vlan_ranges}
+                neutron::plugins::ml2::network_vlan_ranges: {get_input: neutron_network_vlan_ranges}
                 neutron_bridge_mappings: {get_input: neutron_bridge_mappings}
                 neutron::agents::ml2::ovs::enable_tunneling: {get_input: neutron_enable_tunneling}
                 neutron_physical_bridge: {get_input: neutron_physical_bridge}
                 neutron_bridge_mappings: {get_input: neutron_bridge_mappings}
                 neutron::agents::ml2::ovs::enable_tunneling: {get_input: neutron_enable_tunneling}
                 neutron_physical_bridge: {get_input: neutron_physical_bridge}
@@ -312,19 +390,8 @@ resources:
                 neutron_agent_mode: {get_input: neutron_agent_mode}
                 neutron_metadata_proxy_shared_secret: {get_input: neutron_metadata_proxy_shared_secret}
                 neutron_mechanism_drivers: {get_input: neutron_mechanism_drivers}
                 neutron_agent_mode: {get_input: neutron_agent_mode}
                 neutron_metadata_proxy_shared_secret: {get_input: neutron_metadata_proxy_shared_secret}
                 neutron_mechanism_drivers: {get_input: neutron_mechanism_drivers}
-                neutron_allow_l3agent_failover: {get_input: neutron_allow_l3agent_failover}
-                neutron_allow_l3agent_failover: {get_input: neutron_allow_l3agent_failover}
                 neutron_public_interface_raw_device: {get_input: neutron_public_interface_raw_device}
                 admin_password: {get_input: admin_password}
                 neutron_public_interface_raw_device: {get_input: neutron_public_interface_raw_device}
                 admin_password: {get_input: admin_password}
-                nova::rabbit_host: {get_input: rabbit_host}
-                neutron::rabbit_host: {get_input: rabbit_host}
-                ceilometer::rabbit_host: {get_input: rabbit_host}
-                nova::rabbit_userid: {get_input: rabbit_username}
-                neutron::rabbit_user: {get_input: rabbit_username}
-                ceilometer::rabbit_userid: {get_input: rabbit_username}
-                nova::rabbit_password: {get_input: rabbit_password}
-                neutron::rabbit_password: {get_input: rabbit_password}
-                ceilometer::rabbit_password: {get_input: rabbit_password}
                 ntp::servers: {get_input: ntp_servers}
                 enable_package_install: {get_input: enable_package_install}
 
                 ntp::servers: {get_input: ntp_servers}
                 enable_package_install: {get_input: enable_package_install}
 
@@ -341,21 +408,40 @@ resources:
         nova_public_ip: {get_param: NovaPublicIP}
         nova_api_host: {get_param: NovaApiHost}
         nova_password: {get_param: NovaPassword}
         nova_public_ip: {get_param: NovaPublicIP}
         nova_api_host: {get_param: NovaApiHost}
         nova_password: {get_param: NovaPassword}
+        nova_enable_rbd_backend: {get_param: NovaEnableRbdBackend}
+        nova_vnc_proxyclient_address: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaVncProxyNetwork]}]}
         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
         ceilometer_password: {get_param: CeilometerPassword}
         ceilometer_compute_agent: {get_param: CeilometerComputeAgent}
         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
         ceilometer_password: {get_param: CeilometerPassword}
         ceilometer_compute_agent: {get_param: CeilometerComputeAgent}
+        ceilometer_agent_auth_url:
+          list_join:
+            - ''
+            - - 'http://'
+              - {get_param: KeystoneHost}
+              - ':5000/v2.0'
         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
-        glance_host: {get_param: GlanceHost}
-        glance_port: {get_param: GlancePort}
-        glance_protocol: {get_param: GlanceProtocol}
-        keystone_host: {get_param: KeystoneHost}
+        glance_api_servers:
+          list_join:
+            - ''
+            - - {get_param: GlanceProtocol}
+              - '://'
+              - {get_param: GlanceHost}
+              - ':'
+              - {get_param: GlancePort}
         neutron_flat_networks: {get_param: NeutronFlatNetworks}
         neutron_host: {get_param: NeutronHost}
         neutron_flat_networks: {get_param: NeutronFlatNetworks}
         neutron_host: {get_param: NeutronHost}
-        neutron_local_ip: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+        neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronLocalIp]}]}
         neutron_tenant_network_type: {get_param: NeutronNetworkType}
         neutron_tunnel_types: {get_param: NeutronTunnelTypes}
         neutron_tenant_network_type: {get_param: NeutronNetworkType}
         neutron_tunnel_types: {get_param: NeutronTunnelTypes}
-        neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
+        neutron_network_vlan_ranges:
+          str_replace:
+            template: "['RANGES']"
+            params:
+              RANGES:
+                list_join:
+                - "','"
+                - {get_param: NeutronNetworkVLANRanges}
         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
         neutron_physical_bridge: {get_param: NeutronPhysicalBridge}
         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
         neutron_physical_bridge: {get_param: NeutronPhysicalBridge}
@@ -365,7 +451,6 @@ resources:
         neutron_router_distributed: {get_param: NeutronDVR}
         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
         neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers}
         neutron_router_distributed: {get_param: NeutronDVR}
         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
         neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers}
-        neutron_allow_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
         neutron_url:
           list_join:
         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
         neutron_url:
           list_join:
@@ -380,9 +465,10 @@ resources:
               - {get_param: NeutronHost}
               - ':35357/v2.0'
         admin_password: {get_param: AdminPassword}
               - {get_param: NeutronHost}
               - ':35357/v2.0'
         admin_password: {get_param: AdminPassword}
-        rabbit_host: {get_param: RabbitHost}
         rabbit_username: {get_param: RabbitUserName}
         rabbit_password: {get_param: RabbitPassword}
         rabbit_username: {get_param: RabbitUserName}
         rabbit_password: {get_param: RabbitPassword}
+        rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
+        rabbit_client_port: {get_param: RabbitClientPort}
         ntp_servers:
           str_replace:
             template: '["server"]'
         ntp_servers:
           str_replace:
             template: '["server"]'
@@ -390,10 +476,31 @@ resources:
               server: {get_param: NtpServer}
         enable_package_install: {get_param: EnablePackageInstall}
 
               server: {get_param: NtpServer}
         enable_package_install: {get_param: EnablePackageInstall}
 
+  UpdateConfig:
+    type: OS::TripleO::Tasks::PackageUpdate
+
+  UpdateDeployment:
+    type: OS::Heat::SoftwareDeployment
+    properties:
+      config: {get_resource: UpdateConfig}
+      server: {get_resource: NovaCompute}
+      input_values:
+        update_identifier:
+          get_param: UpdateIdentifier
+
 outputs:
   ip_address:
     description: IP address of the server in the ctlplane network
     value: {get_attr: [NovaCompute, networks, ctlplane, 0]}
 outputs:
   ip_address:
     description: IP address of the server in the ctlplane network
     value: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+  internal_api_ip_address:
+    description: IP address of the server in the internal_api network
+    value: {get_attr: [InternalApiPort, ip_address]}
+  storage_ip_address:
+    description: IP address of the server in the storage network
+    value: {get_attr: [StoragePort, ip_address]}
+  tenant_ip_address:
+    description: IP address of the server in the tenant network
+    value: {get_attr: [TenantPort, ip_address]}
   hostname:
     description: Hostname of the server
     value: {get_attr: [NovaCompute, name]}
   hostname:
     description: Hostname of the server
     value: {get_attr: [NovaCompute, name]}
@@ -402,7 +509,7 @@ outputs:
       Server's IP address and hostname in the /etc/hosts format
     value:
       str_replace:
       Server's IP address and hostname in the /etc/hosts format
     value:
       str_replace:
-        template: "IP HOST HOST.novalocal"
+        template: "IP HOST.localdomain HOST"
         params:
           IP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
           HOST: {get_attr: [NovaCompute, name]}
         params:
           IP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
           HOST: {get_attr: [NovaCompute, name]}