Merge "Add description for vm_2_image"
[releng/builder.git] / openstack-hot / csit-apex-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: v1-standard-1
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: v1-standard-1
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: v1-standard-1
37         description: Flavor to run instance on for 3rd VM type
38     vm_2_image:
39         type: string
40         description: Image to run instance on for 3rd VM type
41
42 resources:
43     192_network:
44         type: OS::Neutron::Net
45         properties:
46             name:
47                 str_replace:
48                     template: SILO-JOB_NAME-NET
49                     params:
50                         "SILO": {get_param: silo}
51                         "JOB_NAME": {get_param: job_name}
52                         "NET": 'APEX_192_network'
53             port_security_enabled: false
54
55     192_subnet:
56         type: OS::Neutron::Subnet
57         properties:
58             name:
59                 str_replace:
60                     template: SILO-JOB_NAME-SUBNET
61                     params:
62                         "SILO": {get_param: silo}
63                         "JOB_NAME": {get_param: job_name}
64                         "SUBNET": 'APEX_192_subnet'
65             network_id: {get_resource: 192_network}
66             cidr: 192.0.2.0/24
67             allocation_pools:
68                 - start: 192.0.2.2
69                   end: 192.0.2.50
70
71     vm_0_group:
72         type: "OS::Heat::ResourceGroup"
73         properties:
74             count: {get_param: vm_0_count}
75             resource_def:
76                 type: apex-server.yaml
77                 properties:
78                     job_name: {get_param: job_name}
79                     silo: {get_param: silo}
80                     index: "%index%"
81                     group: "0"
82                     vm_flavor: {get_param: vm_0_flavor}
83                     vm_image: {get_param: vm_0_image}
84                     vm_network: {get_resource: 192_network}
85
86     vm_1_group:
87         type: "OS::Heat::ResourceGroup"
88         properties:
89             count: {get_param: vm_1_count}
90             resource_def:
91                 type: apex-server.yaml
92                 properties:
93                     job_name: {get_param: job_name}
94                     silo: {get_param: silo}
95                     index: "%index%"
96                     group: "1"
97                     vm_flavor: {get_param: vm_1_flavor}
98                     vm_image: {get_param: vm_1_image}
99                     vm_network: {get_resource: 192_network}
100
101     vm_2_group:
102         type: "OS::Heat::ResourceGroup"
103         properties:
104             count: {get_param: vm_2_count}
105             resource_def:
106                 type: apex-server.yaml
107                 properties:
108                     job_name: {get_param: job_name}
109                     silo: {get_param: silo}
110                     index: "%index%"
111                     group: "2"
112                     vm_flavor: {get_param: vm_2_flavor}
113                     vm_image: {get_param: vm_2_image}
114                     vm_network: {get_resource: 192_network}