Merge "Set vnc to use controller virtual_ip"
[apex-tripleo-heat-templates.git] / nova-compute-instance.yaml
index d32159a..f8b5ebe 100644 (file)
@@ -1,13 +1,13 @@
-HeatTemplateFormatVersion: '2012-12-12'
-Description: 'Nova Compute'
-Parameters:
+heat_template_version: 2013-05-23
+description: 'Nova Compute'
+parameters:
   AdminPassword:
-    Default: unset
-    Description: The password for the keystone admin account, used for monitoring, querying neutron etc.
-    Type: String
-    NoEcho: true
+    default: unset
+    description: The password for the keystone admin account, used for monitoring, querying neutron etc.
+    type: string
+    hidden: true
   ExtraConfig:
-    Description: |
+    description: |
       Additional configuration to inject into the cluster. The JSON should have
       the following structure:
         {"FILEKEY":
@@ -42,195 +42,214 @@ Parameters:
             ]
           }
         }
-    Type: Json
+    type: json
   KeyName:
-    Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
-    Type: String
-    Default: default
+    description: Name of an existing EC2 KeyPair to enable SSH access to the instances
+    type: string
+    default: default
   OvercloudComputeFlavor:
-    Description: Use this flavor
-    Type: String
-    Default: baremetal
+    description: Use this flavor
+    type: string
+    default: baremetal
   ImageUpdatePolicy:
-    Default: 'REBUILD_PRESERVE_EPHEMERAL'
-    Description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
-    Type: String
+    default: 'REBUILD_PRESERVE_EPHEMERAL'
+    description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
+    type: string
   NovaImage:
-    Type: String
-    Default: overcloud-compute
+    type: string
+    default: overcloud-compute
   NtpServer:
-    Type: String
-    Default: ''
+    type: string
+    default: ''
   KeystoneHost:
-    Type: String
+    type: string
   NeutronFlatNetworks:
-    Type: String
-    Default: ''
-    Description: If set, flat networks to configure in neutron plugins.
+    type: string
+    default: ''
+    description: If set, flat networks to configure in neutron plugins.
   NeutronHost:
-    Type: String
+    type: string
   NeutronPhysicalBridge:
-    Default: ''
-    Description: An OVS bridge to create for accessing external networks.
-    Type: String
+    default: ''
+    description: An OVS bridge to create for accessing external networks.
+    type: string
   NeutronPublicInterface:
-    Default: ''
-    Description: A port to add to the NeutronPhysicalBridge.
-    Type: String
+    default: ''
+    description: A port to add to the NeutronPhysicalBridge.
+    type: string
   RabbitHost:
-    Type: String
+    type: string
   RabbitUserName:
-    Type: String
+    type: string
   RabbitPassword:
-    Type: String
-    NoEcho: true
+    type: string
+    hidden: true
   CeilometerComputeAgent:
-    Description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
-    Type: String
-    Default: ''
-    AllowedValues: ['', Present]
+    description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
+    type: string
+    default: ''
+    constraints:
+    - allowed_values: ['', Present]
   CeilometerMeteringSecret:
-    Default: unset
-    Description: Secret shared by the ceilometer services.
-    Type: String
-    NoEcho: true
+    default: unset
+    description: Secret shared by the ceilometer services.
+    type: string
+    hidden: true
   CeilometerPassword:
-    Default: unset
-    Description: The password for the ceilometer service account.
-    Type: String
-    NoEcho: true
+    default: unset
+    description: The password for the ceilometer service account.
+    type: string
+    hidden: true
   SnmpdReadonlyUserName:
-    Default: ro_snmp_user
-    Description: The user name for SNMPd with readonly rights running on all Overcloud nodes
-    Type: String
+    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
+    default: unset
+    description: The user password for SNMPd with readonly rights running on all Overcloud nodes
+    type: string
+    hidden: true
   NovaComputeDriver:
-    Type: String
-    Default: libvirt.LibvirtDriver
+    type: string
+    default: libvirt.LibvirtDriver
   NovaComputeLibvirtType:
-    Type: String
-    Default: ''
+    type: string
+    default: ''
   NovaApiHost:
-    Type: String
+    type: string
   NovaPassword:
-    Default: unset
-    Description: The password for the nova service account, used by nova-api.
-    Type: String
-    NoEcho: true
+    default: unset
+    description: The password for the nova service account, used by nova-api.
+    type: string
+    hidden: true
   GlanceHost:
-    Type: String
+    type: string
   GlancePort:
-    Default: 9292
-    Description: Glance port.
-    Type: String
+    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
+    default: http
+    description: Protocol to use when connecting to glance, set to https for SSL.
+    type: string
   CeilometerDSN:
-    Type: String
+    type: string
   NovaDSN:
-    Type: String
+    type: string
+  NovaPublicIP:
+    type: string
   NeutronDSN:
-    Type: String
+    type: string
   NeutronBridgeMappings:
-    Type: String
+    type: string
   NeutronNetworkVLANRanges:
-    Type: String
+    type: string
   NeutronNetworkType:
-    Type: String
+    type: string
   NeutronEnableTunnelling:
-    Type: String
-  StaticHosts:
-    Default: ''
-    Description: Static content to append to /etc/hosts
-    Type: String
+    type: string
+  AllNodesConfig:
+    type: string
+    description: OS::Heat::Config to use for all nodes deployment
   LiveUpdateUserName:
-    Type: String
-    Description: The live-update username for the undercloud Glance API.
-    Default: ''
+    type: string
+    description: The live-update username for the undercloud Glance API.
+    default: ''
   LiveUpdateTenantName:
-    Type: String
-    Description: The live-update tenant name for the undercloud Glance API.
-    Default: ''
+    type: string
+    description: The live-update tenant name for the undercloud Glance API.
+    default: ''
   LiveUpdateHost:
-    Type: String
-    Description: The IP address for the undercloud Glance API.
-    Default: ''
+    type: string
+    description: The IP address for the undercloud Glance API.
+    default: ''
   LiveUpdatePassword:
-    Type: String
-    Default: ''
-    Description: The live-update password for the undercloud Glance API.
-    NoEcho: true
+    type: string
+    default: ''
+    description: The live-update password for the undercloud Glance API.
+    hidden: true
   LiveUpdateComputeImage:
-    Type: String
-    Description: The image ID for live-updates to the overcloud compute nodes.
-    Default: ''
-Resources:
+    type: string
+    description: The image ID for live-updates to the overcloud compute nodes.
+    default: ''
+  DefaultSignalTransport:
+    default: CFN_SIGNAL
+    description: Transport to use for software-config signals.
+    type: string
+    constraints:
+      - allowed_values: [ CFN_SIGNAL, HEAT_SIGNAL, NO_SIGNAL ]
+resources:
   NovaCompute0:
-    Type: OS::Nova::Server
-    Properties:
+    type: OS::Nova::Server
+    properties:
       image:
-        {Ref: NovaImage}
+        {get_param: NovaImage}
       image_update_policy:
-        Ref: ImageUpdatePolicy
-      flavor: {Ref: OvercloudComputeFlavor}
-      key_name: {Ref: KeyName}
+        get_param: ImageUpdatePolicy
+      flavor: {get_param: OvercloudComputeFlavor}
+      key_name: {get_param: KeyName}
+      networks:
+        - network: ctlplane
       user_data_format: SOFTWARE_CONFIG
-  NovaCompute0Deploy:
-    DependsOn: [controller0Deployment]
-    Type: OS::Heat::StructuredDeployment
-    Properties:
-      config: {Ref: NovaComputeConfig}
-      server: {Ref: NovaCompute0}
+  NovaCompute0Deployment:
+    depends_on: [controller0AllNodesDeployment]
+    type: OS::Heat::StructuredDeployment
+    properties:
+      signal_transport: NO_SIGNAL
+      config: {get_resource: NovaComputeConfig}
+      server: {get_resource: NovaCompute0}
       input_values:
-        nova_compute_driver: {Ref: NovaComputeDriver}
-        nova_compute_libvirt_type: {Ref: NovaComputeLibvirtType}
-        nova_dsn: {Ref: NovaDSN}
-        nova_api_host: {Ref: NovaApiHost}
-        nova_password: {Ref: NovaPassword}
-        ceilometer_dsn: {Ref: CeilometerDSN}
-        ceilometer_metering_secret: {Ref: CeilometerMeteringSecret}
-        ceilometer_password: {Ref: CeilometerPassword}
-        ceilometer_compute_agent: {Ref: CeilometerComputeAgent}
-        snmpd_readonly_user_name: {Ref: SnmpdReadonlyUserName}
-        snmpd_readonly_user_password: {Ref: SnmpdReadonlyUserPassword}
-        glance_host: {Ref: GlanceHost}
-        glance_port: {Ref: GlancePort}
-        glance_protocol: {Ref: GlanceProtocol}
-        static_hosts: {Ref: StaticHosts}
-        keystone_host: {Ref: KeystoneHost}
-        neutron_flat_networks: {Ref: NeutronFlatNetworks}
-        neutron_host: {Ref: NeutronHost}
-        neutron_dsn: {Ref: NeutronDSN}
-        neutron_local_ip: {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ NovaCompute0, networks ]}]]}
-        neutron_tenant_network_type: {Ref: NeutronNetworkType}
-        neutron_network_vlan_ranges: {Ref: NeutronNetworkVLANRanges}
-        neutron_bridge_mappings: {Ref: NeutronBridgeMappings}
-        neutron_enable_tunneling: {Ref: NeutronEnableTunnelling}
-        neutron_physical_bridge: {Ref: NeutronPhysicalBridge}
-        neutron_public_interface: {Ref: NeutronPublicInterface}
-        neutron_password: {Ref: NeutronPassword}
-        admin_password: {Ref: AdminPassword}
-        rabbit_host: {Ref: RabbitHost}
-        rabbit_username: {Ref: RabbitUserName}
-        rabbit_password: {Ref: RabbitPassword}
-        live_update_host: {Ref: LiveUpdateHost}
-        live_update_username: {Ref: LiveUpdateUserName}
-        live_update_password: {Ref: LiveUpdatePassword}
-        live_update_tenant_name: {Ref: LiveUpdateTenantName}
-        nova_image: {Ref: NovaImage}
-        live_update_image_id: {Ref: LiveUpdateComputeImage}
-        ntp_server: {Ref: NtpServer}
+        nova_compute_driver: {get_param: NovaComputeDriver}
+        nova_compute_libvirt_type: {get_param: NovaComputeLibvirtType}
+        nova_dsn: {get_param: NovaDSN}
+        nova_public_ip: {get_param: NovaPublicIP}
+        nova_api_host: {get_param: NovaApiHost}
+        nova_password: {get_param: NovaPassword}
+        ceilometer_dsn: {get_param: CeilometerDSN}
+        ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
+        ceilometer_password: {get_param: CeilometerPassword}
+        ceilometer_compute_agent: {get_param: CeilometerComputeAgent}
+        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}
+        neutron_flat_networks: {get_param: NeutronFlatNetworks}
+        neutron_host: {get_param: NeutronHost}
+        neutron_dsn: {get_param: NeutronDSN}
+        neutron_local_ip: {get_attr: [NovaCompute0, networks, ctlplane, 0]}
+        neutron_tenant_network_type: {get_param: NeutronNetworkType}
+        neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
+        neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
+        neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
+        neutron_physical_bridge: {get_param: NeutronPhysicalBridge}
+        neutron_public_interface: {get_param: NeutronPublicInterface}
+        neutron_password: {get_param: NeutronPassword}
+        admin_password: {get_param: AdminPassword}
+        rabbit_host: {get_param: RabbitHost}
+        rabbit_username: {get_param: RabbitUserName}
+        rabbit_password: {get_param: RabbitPassword}
+        live_update_host: {get_param: LiveUpdateHost}
+        live_update_username: {get_param: LiveUpdateUserName}
+        live_update_password: {get_param: LiveUpdatePassword}
+        live_update_tenant_name: {get_param: LiveUpdateTenantName}
+        nova_image: {get_param: NovaImage}
+        live_update_image_id: {get_param: LiveUpdateComputeImage}
+        ntp_server: {get_param: NtpServer}
+  NovaCompute0AllNodesDeployment:
+    depends_on: [NovaCompute0Passthrough]
+    type: OS::Heat::StructuredDeployment
+    properties:
+      signal_transport: {get_param: DefaultSignalTransport}
+      config: {get_param: AllNodesConfig}
+      server: {get_resource: NovaCompute0}
   NovaCompute0Passthrough:
-    Type: OS::Heat::StructuredDeployment
-    Properties:
-      config: {Ref: NovaComputePassthrough}
-      server: {Ref: NovaCompute0}
+    depends_on: [NovaCompute0Deployment]
+    type: OS::Heat::StructuredDeployment
+    properties:
+      config: {get_resource: NovaComputePassthrough}
+      server: {get_resource: NovaCompute0}
       signal_transport: NO_SIGNAL
       input_values:
-        passthrough_config: {Ref: ExtraConfig}
+        passthrough_config: {get_param: ExtraConfig}