b3d1dda89698b51f68229ea3449d6ed6847eef1c
[sdc.git] /
1 heat_template_version: 2013-05-23
2 description: >
3   SC1, SC2, PL3 and PL4. This is the main template, to be used to create an initial stack, with 1 mated pair
4 parameters:
5   sbg_sc_flavor_name:
6     type: string
7     description: Flavor to use for SC VM. Minimum 4 non-HT vCPU and 16GB RAM required
8   vnf_id:
9     type: string
10     description: Unique ID for this VF instance
11   vf_module_id:
12     type: string
13     description: Unique ID for this VNF Module instance
14   sbg_sc_names:
15     type: comma_delimited_list
16     description: comma delimited list of VM names assigned to System Controller VMs
17   internal_net_id:
18     type: string
19     description: the UUID of the operator-created Internal network
20     constraints:
21       - allowed_pattern: '[a-f0-9]{8}\-(?:[a-f0-9]{4}\-){3}[a-f0-9]{12}'
22         description: A valid OpenStack UUID must be provided
23   sbg_internal_ips:
24     type: comma_delimited_list
25     description: comma delimited list of IPv4 addresses of SBG VMs on the Internal network. Don't deviate from the default values.
26   sbg_internal_mac_addresses:
27     type: comma_delimited_list
28     description: comma delimited list of MAC addresses for the VMs on the Internal network
29   sbg_AVPN_count:
30     type: number
31     description: The number of AVPN networks
32     constraints:
33        - range: { min: 1, max: 999 }
34   avpn_net_id:
35     type: comma_delimited_list
36     description: comma delimited list of the UUIDs of the operator-created AVPN networks
37   sbg_AVPN_vlan_tag_list:
38     type: comma_delimited_list
39     description: comma delimited list of internal VLAN TAG(s) used by AVPN networks
40   avpn_subnet_id:
41     type: comma_delimited_list
42     description: comma delimited list of the UUIDs of the operator created IPv4 AVPN subnets
43   sbg_avpn_ips:
44     type: comma_delimited_list
45     description: >
46        comma delimited list of IPv4 IPs to be used on AVPN networks. n*2 IP address expected where n is the number of PL VM pairs. The first two addresses are assigned to the first PL VM pair, second two IPs to the second PL VM pair, and so on. Note: this is true regardless of the number of AVPN networks and sbg_AVPN_count.
47   availability_zone_0:
48     type: string
49     description: First availability zone ID or Name.
50   sbg_nfs_floating_ip:
51     type: string
52     description: Moveable IP (VIP) for NFS server on the Internal network, IPv4. Don't deviate from default!
53     constraints:
54       - allowed_pattern: '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'
55         description: A valid IPv4 address must be provided, e.g 192.168.0.1
56   sbg_comte_floating_ip:
57     type: string
58     description: Moveable IP (VIP) for COM on the Internal network, IPv4. Don't deviate from default!
59     constraints:
60       - allowed_pattern: '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'
61         description: A valid IPv4 address must be provided, e.g 192.168.0.1
62   sbg_boot_floating_ip:
63     type: string
64     description: Moveable IP (VIP) for TFTP server on the Internal network, IPv4. Don't deviate from default!
65     constraints:
66       - allowed_pattern: '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'
67         description: A valid IPv4 address must be provided, e.g 192.168.0.1
68
69   sbg_sc_volume_id_0:
70     type: string
71     description: the UUID of the pre-created Cinder volume attached to SC-1 as root volume
72     constraints:
73        - allowed_pattern: '[a-f0-9]{8}\-(?:[a-f0-9]{4}\-){3}[a-f0-9]{12}'
74          description: A valid OpenStack UUID must be provided
75   sbg_sc_volume_id_1:
76     type: string
77     description: the UUID of the pre-created Cinder volume attached to SC-1 as tools volume
78     constraints:
79        - allowed_pattern: '[a-f0-9]{8}\-(?:[a-f0-9]{4}\-){3}[a-f0-9]{12}'
80          description: A valid OpenStack UUID must be provided
81
82 resources:
83   sbg_sc_internal_0_port_0:
84     type: OS::Neutron::Port
85     depends_on: [ sbg_pl_trunk_subport_avpn_group_0 ]
86     properties:
87       replacement_policy: AUTO
88       network_id: { get_param: internal_net_id }
89       fixed_ips:
90       - ip_address: { get_param: [sbg_internal_ips ,0] }
91       allowed_address_pairs:
92       - ip_address: { get_param: sbg_nfs_floating_ip }
93       - ip_address: { get_param: sbg_comte_floating_ip }
94       - ip_address: { get_param: sbg_boot_floating_ip }
95       mac_address: { get_param: [sbg_internal_mac_addresses ,0] }
96
97   sbg_pl_trunk_subport_avpn_group_0:
98     type: OS::Heat::ResourceGroup
99     properties:
100       count: {get_param: sbg_AVPN_count}
101       resource_def:
102         type: DPA3_New_VNF_TSBGv_nested_AVPN_subport.yaml
103         properties:
104           nested_sbg_AVPN_vlan_tag_list: {get_param: sbg_AVPN_vlan_tag_list}
105           nested_avpn_net_id: {get_param: avpn_net_id}
106           nested_avpn_subnet_id: {get_param: avpn_subnet_id}
107           nested_sbg_avpn_ip_0: {get_param: [sbg_avpn_ips, 0]}
108           nested_sbg_AVPN_counter: '%index%'
109
110   sbg_sc_0:
111     type: OS::Nova::Server
112     properties:
113       name: { get_param: [sbg_sc_names, 0]}
114       metadata:
115         vnf_id: { get_param: vnf_id }
116         vf_module_id: { get_param: vf_module_id }
117       availability_zone: { get_param: availability_zone_0 }
118       block_device_mapping:
119       - device_name: "vda"
120         volume_id : { get_param : sbg_sc_volume_id_0 }
121         delete_on_termination : "false"
122       - device_name: "vdb"
123         volume_id : { get_param : sbg_sc_volume_id_1 }
124         delete_on_termination : "false"
125       flavor: { get_param: sbg_sc_flavor_name }
126       networks:
127       - port: { get_resource: sbg_sc_internal_0_port_0 }
128       config_drive: "true"
129       user_data_format: RAW