[SDC-29] rebase continue work to align source
[sdc.git] / test-apis-ci / src / test / resources / CI / tests / heatEnv / yuli.yaml
1 heat_template_version: 2013-05-23
2 #################################
3 #
4 #  Changes in v0.2:
5 #  - Unique availability zone for each VM
6 #  - LAN8 and SLAN networks removed according to latest Prod/Type I diagram
7 #  - 2 DB VMs added
8 #  - Images corrected
9 #  - VM start-up order: SMP->DB->BE->FE (no error handling yet)
10 #  - Provisioning scripts placeholders
11 #
12 #################################
13
14 description: ASC Template
15
16 parameters:
17   city_name:
18     type: string
19     description: city name
20     default: Hulon
21   address:
22     type: string
23     description: address
24     default: Alonim
25   home_number:
26     type: number
27     description: home_number
28     default: 8
29   private_building:
30     type: boolean
31     description: home_number
32     default: true
33 resources:
34 #  scp_be_wait_condition:
35 #    type: OS::Heat::WaitCondition
36 #    properties:
37 #      handle: { get_resource: scp_be_wait_handle }
38 #      count: 5
39 #      timeout: 300
40 #  scp_be_wait_handle:
41 #    type: OS::Heat::WaitConditionHandle
42 #
43 #  scp_fe_wait_condition:
44 #    type: OS::Heat::WaitCondition
45 #    properties:
46 #      handle: { get_resource: scp_fe_wait_handle }
47 #      count: 2
48 #      timeout: 300
49 #  scp_fe_wait_handle:
50 #    type: OS::Heat::WaitConditionHandle
51 #
52 #  smp_wait_condition:
53 #    type: OS::Heat::WaitCondition
54 #    properties:
55 #      handle: { get_resource: smp_wait_handle }
56 #      count: 2
57 #      timeout: 300
58 #  smp_wait_handle:
59 #    type: OS::Heat::WaitConditionHandle
60 #
61 #  db_wait_condition:
62 #    type: OS::Heat::WaitCondition
63 #    properties:
64 #      handle: { get_resource: db_wait_handle }
65 #      count: 2
66 #      timeout: 300
67 #  db_wait_handle:
68 #    type: OS::Heat::WaitConditionHandle
69
70   FE_Affinity:
71     type: OS::Nova::ServerGroup
72     properties:
73       policies: ["anti-affinity"] 
74   BE_Affinity:
75     type: OS::Nova::ServerGroup
76     properties:
77       policies: ["anti-affinity"]
78   SMP_Affinity:
79     type: OS::Nova::ServerGroup
80     properties:
81       policies: ["anti-affinity"]
82   DB_Affinity:
83     type: OS::Nova::ServerGroup
84     properties:
85       policies: ["anti-affinity"]
86       
87   FE_Clustering_KA:
88     type: OS::Contrail::VirtualNetwork
89     properties:
90       name: { get_param: int_vscp_fe_cluster_net_id }
91
92   FE_Clustering_subnet:
93     type: OS::Neutron::Subnet
94     properties:
95       network_id: { get_resource: FE_Clustering_KA }
96       cidr: { get_param: int_vscp_fe_cluster_cidr }
97
98   Clustering_Network:
99     type: OS::Contrail::VirtualNetwork
100     properties:
101       name: { get_param: int_vscp_cluster_net_id }
102
103   Clustering_Network_subnet:
104     type: OS::Neutron::Subnet
105     properties:
106       network_id: { get_resource: Clustering_Network }
107       cidr: { get_param: int_vscp_cluster_cidr }
108
109   DB_Network:
110     type: OS::Contrail::VirtualNetwork
111     properties:
112       name: { get_param: int_vscp_db_network_net_id }
113
114   DB_Network_subnet:
115     type: OS::Neutron::Subnet
116     properties:
117       network_id: { get_resource: DB_Network }
118       cidr: { get_param: int_vscp_db_network_cidr }
119
120   server_scp_be0:
121     type: OS::Nova::Server
122 #    depends on: db_wait_condition
123     properties:
124       name: { get_param: vm_scp_be0_name }
125       image: { get_param: image_scp_be_id }
126 #      availability_zone: { get_param: availability_zone_be0 }
127       flavor: { get_param: flavor_scp_be_id }
128       scheduler_hints: { group: { get_resource: BE_Affinity } }
129       networks:
130       - port: { get_resource: be0_port_3 }
131       - port: { get_resource: be0_port_4 }
132       - port: { get_resource: be0_port_5 }
133       - port: { get_resource: be0_port_7 }
134       metadata:
135         vnf_id: { get_param: vnf_id }
136       user_data:
137         str_replace:
138           template: |
139             #!/bin/bash
140             #todo: provision $vm_name
141             wc_notify --data-binary '{"status": "SUCCESS"}'
142           params:
143             $vm_name: {get_param: vm_scp_be0_name}
144 #            wc_notify: { get_attr: ['scp_be_wait_handle', 'curl_cli'] }