Merge "Update cloud image Ubuntu18.04 mininet ovs"
[releng/builder.git] / openstack-hot / csit-3-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
41 resources:
42   vm_0_group:
43     type: "OS::Heat::ResourceGroup"
44     properties:
45       count: { get_param: vm_0_count }
46       resource_def:
47         type: generic-server.yaml
48         properties:
49           job_name: { get_param: job_name }
50           silo: { get_param: silo }
51           ssh_key: { get_param: silo }
52           index: "%index%"
53           group: "0"
54           vm_flavor: { get_param: vm_0_flavor }
55           vm_image: { get_param: vm_0_image }
56
57   vm_1_group:
58     type: "OS::Heat::ResourceGroup"
59     properties:
60       count: { get_param: vm_1_count }
61       resource_def:
62         type: generic-server.yaml
63         properties:
64           job_name: { get_param: job_name }
65           silo: { get_param: silo }
66           ssh_key: { get_param: silo }
67           index: "%index%"
68           group: "1"
69           vm_flavor: { get_param: vm_1_flavor }
70           vm_image: { get_param: vm_1_image }
71
72   vm_2_group:
73     type: "OS::Heat::ResourceGroup"
74     properties:
75       count: { get_param: vm_2_count }
76       resource_def:
77         type: generic-server.yaml
78         properties:
79           job_name: { get_param: job_name }
80           silo: { get_param: silo }
81           ssh_key: { get_param: silo }
82           index: "%index%"
83           group: "2"
84           vm_flavor: { get_param: vm_2_flavor }
85           vm_image: { get_param: vm_2_image }
86
87 outputs:
88   vm_0_ips:
89     description: IP addresses of the 1st vm types
90     value: { get_attr: [vm_0_group, ip] }
91   vm_1_ips:
92     description: IP addresses of the 2nd vm types
93     value: { get_attr: [vm_1_group, ip] }
94   vm_2_ips:
95     description: IP addresses of the 3rd vm types
96     value: { get_attr: [vm_2_group, ip] }