Making nova parameters configurable for nuage-metadata-agent
[apex-tripleo-heat-templates.git] / puppet / compute.yaml
index 85f7515..cdf4098 100644 (file)
@@ -29,6 +29,10 @@ parameters:
     default: false
     description: Whether to enable or not the NFS backend for Cinder
     type: boolean
+  CinderEnableRbdBackend:
+    default: false
+    description: Whether to enable or not the Rbd backend for Cinder
+    type: boolean
   Debug:
     default: ''
     description: Set to True to enable debugging on all services.
@@ -47,14 +51,6 @@ parameters:
   GlanceHost:
     type: string
     default: ''  # Has to be here because of the ignored empty value bug
-  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
   Image:
     type: string
     default: overcloud-compute
@@ -89,6 +85,11 @@ parameters:
   NeutronEnableTunnelling:
     type: string
     default: "True"
+  NeutronEnableL2Pop:
+    type: string
+    description: >
+        Enable/disable the L2 population feature in the Neutron agents.
+    default: "False"
   NeutronFlatNetworks:
     type: string
     default: 'datacentre'
@@ -149,6 +150,7 @@ parameters:
     default: 'unset'
     description: Shared secret to prevent spoofing
     type: string
+    hidden: true
   NeutronCorePlugin:
     default: 'ml2'
     description: |
@@ -201,6 +203,10 @@ parameters:
   NovaComputeLibvirtType:
     type: string
     default: ''
+  NovaComputeLibvirtVifDriver:
+    default: ''
+    description: Libvirt VIF driver configuration for the network
+    type: string
   NovaEnableRbdBackend:
     default: false
     description: Whether to enable or not the Rbd backend for Nova
@@ -213,9 +219,18 @@ parameters:
   NovaPublicIP:
     type: string
     default: ''  # Has to be here because of the ignored empty value bug
-  NtpServer:
+  NovaOVSBridge:
+    default: 'br-int'
+    description: Name of integration bridge used by Open vSwitch
     type: string
+  NovaSecurityGroupAPI:
+    default: 'neutron'
+    description: The full class name of the security API class
+    type: string
+  NtpServer:
     default: ''
+    description: Comma-separated list of ntp servers
+    type: comma_delimited_list
   RabbitHost:
     type: string
     default: ''  # Has to be here because of the ignored empty value bug
@@ -256,6 +271,11 @@ parameters:
     description: Mapping of service_name -> network name. Typically set
                  via parameter_defaults in the resource registry.
     type: json
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
   UpdateIdentifier:
     default: ''
     type: string
@@ -265,6 +285,18 @@ parameters:
   Hostname:
     type: string
     default: '' # Defaults to Heat created hostname
+  NetworkDeploymentActions:
+    type: comma_delimited_list
+    description: >
+      Heat action when to apply network configuration changes
+    default: ['CREATE']
+  CloudDomain:
+    default: ''
+    type: string
+    description: >
+      The DNS domain used for the hosts. This should match the dhcp_domain
+      configured in the Undercloud neutron. Defaults to localdomain.
+
 
 resources:
 
@@ -339,6 +371,7 @@ resources:
     properties:
       config: {get_resource: NetworkConfig}
       server: {get_resource: NovaCompute}
+      actions: {get_param: NetworkDeploymentActions}
       input_values:
         bridge_name: {get_param: NeutronPhysicalBridge}
         interface_name: {get_param: NeutronPublicInterface}
@@ -361,6 +394,7 @@ resources:
             - '"%{::osfamily}"'
             - common
             - cisco_n1kv_data  # Optionally provided by ComputeExtraConfigPre
+            - nova_nuage_data  # Optionally provided by ComputeExtraConfigPre
           datafiles:
             compute_extraconfig:
               mapped_data: {get_param: NovaComputeExtraConfig}
@@ -381,11 +415,15 @@ resources:
                 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::compute::neutron::libvirt_vif_driver: {get_input: nova_compute_libvirt_vif_driver}
                 nova_api_host: {get_input: nova_api_host}
                 nova::compute::vncproxy_host: {get_input: nova_public_ip}
                 nova::compute::rbd::ephemeral_storage: {get_input: nova_enable_rbd_backend}
+                rbd_persistent_storage: {get_input: cinder_enable_rbd_backend}
                 nova_password: {get_input: nova_password}
                 nova::compute::vncserver_proxyclient_address: {get_input: nova_vnc_proxyclient_address}
+                nova::network::neutron::neutron_ovs_bridge: {get_input: nova_ovs_bridge}
+                nova::network::neutron::security_group_api: {get_input: nova_security_group_api}
                 ceilometer::debug: {get_input: debug}
                 ceilometer::rabbit_userid: {get_input: rabbit_username}
                 ceilometer::rabbit_password: {get_input: rabbit_password}
@@ -400,7 +438,7 @@ resources:
                 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_user: {get_input: rabbit_username}
                 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}
@@ -414,10 +452,11 @@ resources:
                 neutron::plugins::ml2::vni_ranges: {get_input: neutron_vni_ranges}
                 neutron_bridge_mappings: {get_input: neutron_bridge_mappings}
                 neutron::agents::ml2::ovs::enable_tunneling: {get_input: neutron_enable_tunneling}
+                neutron::agents::ml2::ovs::l2_population: {get_input: neutron_enable_l2pop}
                 neutron_physical_bridge: {get_input: neutron_physical_bridge}
                 neutron_public_interface: {get_input: neutron_public_interface}
                 nova::network::neutron::neutron_admin_password: {get_input: neutron_password}
-                nova::network::neutron::neutron_url: {get_input: neutron_url}
+                nova::network::neutron::neutron_url: {get_input: neutron_internal_url}
                 nova::network::neutron::neutron_admin_auth_url: {get_input: neutron_admin_auth_url}
                 neutron_router_distributed: {get_input: neutron_router_distributed}
                 neutron_agent_mode: {get_input: neutron_agent_mode}
@@ -427,9 +466,11 @@ resources:
                 neutron::plugins::ml2::type_drivers: {get_input: neutron_type_drivers}
                 neutron_mechanism_drivers: {get_input: neutron_mechanism_drivers}
                 neutron_public_interface_raw_device: {get_input: neutron_public_interface_raw_device}
+                keystone_public_api_virtual_ip: {get_input: keystone_vip}
                 admin_password: {get_input: admin_password}
                 ntp::servers: {get_input: ntp_servers}
                 tripleo::packages::enable_install: {get_input: enable_package_install}
+                tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
 
   NovaComputeDeployment:
     type: OS::TripleO::SoftwareDeployment
@@ -442,30 +483,22 @@ resources:
         debug: {get_param: Debug}
         nova_compute_driver: {get_param: NovaComputeDriver}
         nova_compute_libvirt_type: {get_param: NovaComputeLibvirtType}
+        nova_compute_libvirt_vif_driver: {get_param: NovaComputeLibvirtVifDriver}
         nova_public_ip: {get_param: NovaPublicIP}
         nova_api_host: {get_param: NovaApiHost}
         nova_password: {get_param: NovaPassword}
         nova_enable_rbd_backend: {get_param: NovaEnableRbdBackend}
+        cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend}
         nova_vnc_proxyclient_address: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaVncProxyNetwork]}]}
+        nova_ovs_bridge: {get_param: NovaOVSBridge}
+        nova_security_group_api: {get_param: NovaSecurityGroupAPI}
         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: KeystonePublicApiVirtualIP}
-              - ':5000/v2.0'
+        ceilometer_agent_auth_url: {get_param: [EndpointMap, KeystoneInternal, uri]}
         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
-        glance_api_servers:
-          list_join:
-            - ''
-            - - {get_param: GlanceProtocol}
-              - '://'
-              - {get_param: GlanceHost}
-              - ':'
-              - {get_param: GlancePort}
+        glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
         neutron_flat_networks: {get_param: NeutronFlatNetworks}
         neutron_host: {get_param: NeutronHost}
         neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
@@ -497,6 +530,7 @@ resources:
                 - {get_param: NeutronNetworkVLANRanges}
         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
+        neutron_enable_l2pop: {get_param: NeutronEnableL2Pop}
         neutron_physical_bridge: {get_param: NeutronPhysicalBridge}
         neutron_public_interface: {get_param: NeutronPublicInterface}
         neutron_password: {get_param: NeutronPassword}
@@ -522,29 +556,24 @@ resources:
                 - {get_param: NeutronTypeDrivers}
         neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers}
         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
-        neutron_url:
-          list_join:
-            - ''
-            - - 'http://'
-              - {get_param: NeutronHost}
-              - ':9696'
-        neutron_admin_auth_url:
-          list_join:
-            - ''
-            - - 'http://'
-              - {get_param: KeystoneAdminApiVirtualIP}
-              - ':35357/v2.0'
+        neutron_internal_url: {get_param: [EndpointMap, NeutronInternal, uri]}
+        neutron_admin_auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri]}
+        keystone_vip: {get_param: KeystonePublicApiVirtualIP}
         admin_password: {get_param: AdminPassword}
         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"]'
-            params:
-              server: {get_param: NtpServer}
+        ntp_servers: {get_param: NtpServer}
         enable_package_install: {get_param: EnablePackageInstall}
+        enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
+
+  # Resource for site-specific injection of root certificate
+  NodeTLSCAData:
+    depends_on: NovaComputeDeployment
+    type: OS::TripleO::NodeTLSCAData
+    properties:
+      server: {get_resource: NovaCompute}
 
   # Hook for site-specific additional pre-deployment config, e.g extra hieradata
   ComputeExtraConfigPre:
@@ -553,6 +582,14 @@ resources:
     properties:
         server: {get_resource: NovaCompute}
 
+  # Hook for site-specific additional pre-deployment config,
+  # applying to all nodes, e.g node registration/unregistration
+  NodeExtraConfig:
+    depends_on: [ComputeExtraConfigPre, NodeTLSCAData]
+    type: OS::TripleO::NodeExtraConfig
+    properties:
+        server: {get_resource: NovaCompute}
+
   UpdateConfig:
     type: OS::TripleO::Tasks::PackageUpdate
 
@@ -586,9 +623,10 @@ outputs:
       Server's IP address and hostname in the /etc/hosts format
     value:
       str_replace:
-        template: "IP HOST.localdomain HOST"
+        template: "IP HOST.DOMAIN HOST"
         params:
           IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ComputeHostnameResolveNetwork]}]}
+          DOMAIN: {get_param: CloudDomain}
           HOST: {get_attr: [NovaCompute, name]}
   nova_server_resource:
     description: Heat resource handle for the Nova compute server
@@ -600,4 +638,6 @@ outputs:
       list_join:
       - ','
       - - {get_attr: [NovaComputeDeployment, deploy_stdout]}
+        - {get_attr: [NodeTLSCAData, deploy_stdout]}
         - {get_attr: [ComputeExtraConfigPre, deploy_stdout]}
+        - {get_param: UpdateIdentifier}