Merge "Update cloud image Ubuntu18.04 mininet ovs"
[releng/builder.git] / openstack-hot / csit-4-instance-type.yaml
1 ---
2 heat_template_version: 2016-04-08
3
4 parameters:
5   job_name:
6     type: string
7     description: Name of job running this template
8   silo:
9     type: string
10     description: Jenkins Silo job is running in (typically releng|sandbox)
11   vm_0_count:
12     type: number
13     description: Number of VMs for 1st VM type
14   vm_0_flavor:
15     type: string
16     default: v3-standard-2
17     description: Flavor to run instance on for 1st VM type
18   vm_0_image:
19     type: string
20     description: Image to run instance on for 1st VM type
21   vm_1_count:
22     type: number
23     description: Number of VMs for 2nd VM type
24   vm_1_flavor:
25     type: string
26     default: v3-standard-2
27     description: Flavor to run instance on for 2nd VM type
28   vm_1_image:
29     type: string
30     description: Image to run instance on for 2nd VM type
31   vm_2_count:
32     type: number
33     description: Number of VMs for 3rd VM type
34   vm_2_flavor:
35     type: string
36     default: v3-standard-2
37     description: Flavor to run instance on for 3rd VM type
38   vm_2_image:
39     type: string
40   vm_3_count:
41     type: number
42     description: Number of VMs for 3rd VM type
43   vm_3_flavor:
44     type: string
45     default: v3-standard-2
46     description: Flavor to run instance on for 3rd VM type
47   vm_3_image:
48     type: string
49
50 resources:
51   vm_0_group:
52     type: "OS::Heat::ResourceGroup"
53     properties:
54       count: { get_param: vm_0_count }
55       resource_def:
56         type: generic-server.yaml
57         properties:
58           job_name: { get_param: job_name }
59           silo: { get_param: silo }
60           ssh_key: { get_param: silo }
61           index: "%index%"
62           group: "0"
63           vm_flavor: { get_param: vm_0_flavor }
64           vm_image: { get_param: vm_0_image }
65
66   vm_1_group:
67     type: "OS::Heat::ResourceGroup"
68     properties:
69       count: { get_param: vm_1_count }
70       resource_def:
71         type: generic-server.yaml
72         properties:
73           job_name: { get_param: job_name }
74           silo: { get_param: silo }
75           ssh_key: { get_param: silo }
76           index: "%index%"
77           group: "1"
78           vm_flavor: { get_param: vm_1_flavor }
79           vm_image: { get_param: vm_1_image }
80
81   vm_2_group:
82     type: "OS::Heat::ResourceGroup"
83     properties:
84       count: { get_param: vm_2_count }
85       resource_def:
86         type: generic-server.yaml
87         properties:
88           job_name: { get_param: job_name }
89           silo: { get_param: silo }
90           ssh_key: { get_param: silo }
91           index: "%index%"
92           group: "2"
93           vm_flavor: { get_param: vm_2_flavor }
94           vm_image: { get_param: vm_2_image }
95   vm_3_group:
96     type: "OS::Heat::ResourceGroup"
97     properties:
98       count: { get_param: vm_3_count }
99       resource_def:
100         type: generic-server.yaml
101         properties:
102           job_name: { get_param: job_name }
103           silo: { get_param: silo }
104           ssh_key: { get_param: silo }
105           index: "%index%"
106           group: "3"
107           vm_flavor: { get_param: vm_3_flavor }
108           vm_image: { get_param: vm_3_image }
109
110 outputs:
111   vm_0_ips:
112     description: IP addresses of the 1st vm types
113     value: { get_attr: [vm_0_group, ip] }
114   vm_1_ips:
115     description: IP addresses of the 2nd vm types
116     value: { get_attr: [vm_1_group, ip] }
117   vm_2_ips:
118     description: IP addresses of the 3rd vm types
119     value: { get_attr: [vm_2_group, ip] }
120   vm_3_ips:
121     description: IP addresses of the 4th vm types
122     value: { get_attr: [vm_3_group, ip] }