Merge "Add VLAN private network support to devstack"
[releng/builder.git] / openstack-hot / generic-server.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     ssh_key:
8         type: string
9         description: SSH Key name to use (Public key must exist in OpenStack)
10     index:
11         type: number
12     vm_flavor:
13         type: string
14         default: 1 GB General Purpose v1
15         description: OpenStack Flavor to use
16     vm_image:
17         type: string
18         description: VM Image to spin up
19
20 resources:
21     instance:
22         type: "OS::Nova::Server"
23         properties:
24             flavor: { get_param: vm_flavor }
25             image: { get_param: vm_image }
26             name:
27                 str_replace:
28                     template: JOB_NAME-VM_TYPE-INDEX
29                     params:
30                         "JOB_NAME": { get_param: job_name }
31                         "VM_TYPE":
32                             str_split:
33                                 - ' - '
34                                 - { get_param: vm_image }
35                                 - 1
36                         "INDEX": { get_param: index }
37             networks:
38                 - network: RC-ODL
39             key_name: { get_param: ssh_key }
40             user_data: |
41                 #!/bin/bash
42                 git clone https://git.opendaylight.org/gerrit/releng/builder /builder
43                 /builder/jenkins-scripts/jenkins-init-script.sh
44
45 outputs:
46     ip:
47         description: IP address of the instance
48         value: { get_attr: [instance, networks, RC-ODL, 0] }