Merge "Prepend to vm names"
[releng/builder.git] / openstack-hot / csit-2-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
31 resources:
32     vm_0_group:
33         type: "OS::Heat::ResourceGroup"
34         properties:
35             count: { get_param: vm_0_count }
36             resource_def:
37                 type: generic-server.yaml
38                 properties:
39                     job_name: { get_param: job_name }
40                     silo: { get_param: silo }
41                     ssh_key: { get_param: silo }
42                     index: "%index%"
43                     vm_flavor: { get_param: vm_0_flavor }
44                     vm_image: { get_param: vm_0_image }
45
46     vm_1_group:
47         type: "OS::Heat::ResourceGroup"
48         properties:
49             count: { get_param: vm_1_count }
50             resource_def:
51                 type: generic-server.yaml
52                 properties:
53                     job_name: { get_param: job_name }
54                     silo: { get_param: silo }
55                     ssh_key: { get_param: silo }
56                     index: "%index%"
57                     vm_flavor: { get_param: vm_1_flavor }
58                     vm_image: { get_param: vm_1_image }
59
60 outputs:
61     vm_0_ips:
62         description: IP addresses of the 1st vm types
63         value: { get_attr: [vm_0_group, ip] }
64     vm_1_ips:
65         description: IP addresses of the 2nd vm types
66         value: { get_attr: [vm_1_group, ip] }