3aadcf9f79e9b8491c7e31bd85b4ec8ac121bdef
[releng/builder.git] / openstack-hot / csit-3-instance-type.yaml
1 heat_template_version: 2016-04-08
2
3 parameters:
4     job_name:
5         type: string
6         description: Name of job running this template
7     silo:
8         type: string
9         description: Jenkins Silo job is running in (typically releng|sandbox)
10     vm_0_count:
11         type: number
12         description: Number of VMs for 1st VM type
13     vm_0_flavor:
14         type: string
15         default: 1 GB General Purpose v1
16         description: Flavor to run instance on for 1st VM type
17     vm_0_image:
18         type: string
19         description: Image to run instance on for 1st VM type
20     vm_1_count:
21         type: number
22         description: Number of VMs for 2nd VM type
23     vm_1_flavor:
24         type: string
25         default: 1 GB General Purpose v1
26         description: Flavor to run instance on for 2nd VM type
27     vm_1_image:
28         type: string
29         description: Image to run instance on for 2nd VM type
30     vm_2_count:
31         type: number
32         description: Number of VMs for 3rd VM type
33     vm_2_flavor:
34         type: string
35         default: 1 GB General Purpose v1
36         description: Flavor to run instance on for 3rd VM type
37     vm_2_image:
38         type: string
39
40 resources:
41     vm_0_group:
42         type: "OS::Heat::ResourceGroup"
43         properties:
44             count: { get_param: vm_0_count }
45             resource_def:
46                 type: generic-server.yaml
47                 properties:
48                     job_name: { get_param: job_name }
49                     silo: { get_param: silo }
50                     ssh_key: { get_param: silo }
51                     index: "%index%"
52                     vm_flavor: { get_param: vm_0_flavor }
53                     vm_image: { get_param: vm_0_image }
54
55     vm_1_group:
56         type: "OS::Heat::ResourceGroup"
57         properties:
58             count: { get_param: vm_1_count }
59             resource_def:
60                 type: generic-server.yaml
61                 properties:
62                     job_name: { get_param: job_name }
63                     silo: { get_param: silo }
64                     ssh_key: { get_param: silo }
65                     index: "%index%"
66                     vm_flavor: { get_param: vm_1_flavor }
67                     vm_image: { get_param: vm_1_image }
68
69     vm_2_group:
70         type: "OS::Heat::ResourceGroup"
71         properties:
72             count: { get_param: vm_2_count }
73             resource_def:
74                 type: generic-server.yaml
75                 properties:
76                     job_name: { get_param: job_name }
77                     silo: { get_param: silo }
78                     ssh_key: { get_param: silo }
79                     index: "%index%"
80                     vm_flavor: { get_param: vm_2_flavor }
81                     vm_image: { get_param: vm_2_image }
82
83 outputs:
84     vm_0_ips:
85         description: IP addresses of the 1st vm types
86         value: { get_attr: [vm_0_group, ip] }
87     vm_1_ips:
88         description: IP addresses of the 2nd vm types
89         value: { get_attr: [vm_1_group, ip] }
90     vm_2_ips:
91         description: IP addresses of the 3rd vm types
92         value: { get_attr: [vm_2_group, ip] }