heat_template_version: 2015-04-30 ################################# # Author: Dmitry Orzhehovsky # Email: dorzheho@cisco.com ################################# description: > The template intended for deploying vSON VM instance. parameters: instance_index: type: number label: Instance Index description: Index of the instance. vnf_name: type: string label: VF name description: Unique name for this VF instance. vnf_id: type: string label: VF ID description: Unique ID for this VF instance. vf_module_name: type: string label: VF module name description: Unique name for this VF module instance. vf_module_id: type: string label: VF module ID description: Unique ID for this VF Module instance vfc_role: type: string label: VF module ID description: Unique ID for this VF Module instance oam_net_id: type: string label: OAM network ID description: The ID of the OAM network. oam_net_subnet_prefix_length: type: string label: OAM net subnet prefix length description: Prefix length of the subnet on the OAM network. default_gateway: type: string label: Default gateway description: Default gateway. dns_servers: type: comma_delimited_list label: DNS servers description: List of DNS servers. ntp_servers: type: comma_delimited_list label: NTP servers description: List of NTP servers. oam_net_security_group_id: type: string label: OAM network security group ID description: > The ID of Security group applied on the port bound to the vSON OAM network. availability_zones: type: comma_delimited_list label: Availability zones description: List of availability zones. vson_server_group_id: type: string label: vSON server group ID description: > Tells what policy should be applied to the ServerGroup. Affinity policy will force instances to share the same hypervisor. Anti-affinity will force instances to run in different hypervisors. vson_vm_names: type: comma_delimited_list label: vSON Cluster leader names description: A list of unique names to be issued to the vSON Cluster leaders. oam_net_ips: type: comma_delimited_list label: vSON OAM network IP addresses description: Fixed IP assignments for vSON instances on the OAM network. vson_vm_image_name: type: string label: vSON base VM image name description: VM Image name the vSON instance will be created from. vson_vm_flavor_name: type: string label: Flavor name description: The ID or name of the flavor to boot onto. vson_cluster_name: type: string label: vSON Cluster name description: Name of the vSON Cluster. vson_clm_oam_net_ip: type: string label: vSON Cluster Manager IP description: IP of the vSON Cluster Manager. swift_storage_url: type: string label: swift storage URL description: > Swift storage URL. Example: http://172.16.209.246:8080/v1/AUTH_a4d426b5ef2e41408a8e6e6b9a8d3029 http://172.16.209.246:8080 - protocol, IP and port, v1 - API version AUTH_a4d426b5ef2e41408a8e6e6b9a8d3029 - account ID swift_account_auth_token: type: string label: Swift account auth token description: > Swift account auth token. Example: 041a5187bb4641f9b89583e2539776b0 swift_son_container_name: type: string label: SON Swift description: Swift container storing vSON artifacts. resources: wait_condition: type: OS::Heat::SwiftSignal properties: handle: {get_resource: wait_handle} count: 1 timeout: 800 wait_handle: type: OS::Heat::SwiftSignalHandle # vSON server OAM network port vson_server_oam_net_port_0: type: OS::Neutron::Port properties: name: str_replace: template: VNF_NAME_VNF_ID_SERVER_NAME_oam_net_port_0 params: VNF_NAME: {get_param: vnf_name} VNF_ID: {get_param: vnf_id} SERVER_NAME: {get_param: [vson_vm_names, {get_param: instance_index}]} network_id: {get_param: oam_net_id} fixed_ips: - ip_address: {get_param: [oam_net_ips, {get_param: instance_index}]} security_groups: - {get_param: oam_net_security_group_id} # Create vSON server vson_server: type: OS::Nova::Server depends_on: [vson_server_oam_net_port_0] properties: name: {get_param: [vson_vm_names, {get_param: instance_index}]} availability_zone: {get_param: [availability_zones, {get_param: instance_index}]} image: {get_param: vson_vm_image_name} flavor: {get_param: vson_vm_flavor_name} config_drive: True metadata: vnf_name: {get_param: vnf_name} vnf_id: {get_param: vnf_id} vf_module_name: {get_param: vf_module_name} vf_module_id: {get_param: vf_module_id} vm_role: {get_param: vfc_role} networks: - port: {get_resource: vson_server_oam_net_port_0} scheduler_hints: group: {get_param: vson_server_group_id} user_data_format: RAW user_data: str_replace: template: {get_file: deploy.sh} params: $HOT_INSTANCE_INDEX: {get_param: instance_index} $HOT_VFC_ROLE: {get_param: vfc_role} $HOT_CLM_SERVER_IP: {get_param: vson_clm_oam_net_ip} $HOT_THIS_INSTANCE_OAM_NET_IP: {get_param: [oam_net_ips, {get_param: instance_index}]} $HOT_THIS_INSTANCE_OAM_NET_PREFIX: {get_param: oam_net_subnet_prefix_length} $HOT_THIS_INSTANCE_DEFAULT_GATEWAY: {get_param: default_gateway} $HOT_DNS_SERVERS: {list_join: [',', {get_param: dns_servers}]} $HOT_NTP_SERVERS: {list_join: [' ', {get_param: ntp_servers}]} $HOT_SWIFT_AUTH_TOKEN: {get_param: swift_account_auth_token} $HOT_CLUSTER_NAME: {get_param: vson_cluster_name} $HOT_SWIFT_STORAGE_URL: {get_param: swift_storage_url} $HOT_SWIFT_CONTAINER_NAME: {get_param: swift_son_container_name} $HOT_WC_NOTIFY: { get_attr: ['wait_handle', 'curl_cli'] }