Remove table miss flow feature from test
[releng/builder.git] / openstack-hot / generic-server.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         default: vm
11         description: |
12             String to identify a Jenkins Master
13
14             Useful in scenarios where multiple Jenkins Masters might be
15             creating VMs in the same cloud to uniquely distinguish them.
16
17             TODO we should move to using tags once OpenStack Ocata which is
18             available to us with support for server tags properties.
19     ssh_key:
20         type: string
21         description: SSH Key name to use (Public key must exist in OpenStack)
22     index:
23         type: number
24     vm_flavor:
25         type: string
26         default: 1 GB General Purpose v1
27         description: OpenStack Flavor to use
28     vm_image:
29         type: string
30         description: VM Image to spin up
31
32 resources:
33     instance:
34         type: "OS::Nova::Server"
35         properties:
36             flavor: {get_param: vm_flavor}
37             image: {get_param: vm_image}
38             name:
39                 str_replace:
40                     template: SILO-JOB_NAME-VM_TYPE-INDEX
41                     params:
42                         "SILO": {get_param: silo}
43                         "JOB_NAME": {get_param: job_name}
44                         "VM_TYPE":
45                             str_split:
46                                 - ' - '
47                                 - {get_param: vm_image}
48                                 - 1
49                         "INDEX": {get_param: index}
50             networks:
51                 - network: RC-ODL
52             key_name: {get_param: ssh_key}
53             user_data: |
54                 #!/bin/bash
55                 until ping -c1 git.opendaylight.org &>/dev/null
56                 do
57                     echo "Waiting until git.opendaylight.org is resolvable..."
58                 done
59                 git clone https://git.opendaylight.org/gerrit/releng/builder /builder
60                 /builder/jenkins-scripts/jenkins-init-script.sh
61
62 outputs:
63     ip:
64         description: IP address of the instance
65         value: {get_attr: [instance, networks, RC-ODL, 0]}