forked from NeCTAR-RC/heat-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasic_instance.yaml
56 lines (42 loc) · 1.73 KB
/
basic_instance.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# http://docs.openstack.org/developer/heat/template_guide/hot_spec.html#heat-template-version
heat_template_version: 2014-10-16
description: NeCTAR Sample Template - A very simple one that just fires up an instance
parameters:
key_name:
type: string
description: Name of an existing KeyPair to enable SSH access to the instances
# can use the provided custom constraint to check that the keypair does exist
constraints:
- custom_constraint: nova.keypair
description: Must be an existing keypair
instance_type:
type: string
description: The NeCTAR flavour the webserver is to run on
default: m2.xsmall
constraints:
- allowed_values: [m2.xsmall, m2.small, m1.small]
description:
Must be a valid NeCTAR flavour, limited to the smaller ones available
image_id:
type: string
description: ID of the image to use for the instance to be created
default: fc48b5bb-e67d-4e39-b9ba-b6725c8b0c88
resources:
basic_server:
# http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Nova::Server
type: OS::Nova::Server
properties:
key_name: { get_param: key_name }
image: { get_param: image_id }
flavor: { get_param: instance_type }
image_update_policy: REPLACE
user_data_format: RAW
# you can even attach metadata...
metadata: {"metering.stack": {get_param: "OS::stack_id"}}
outputs:
instance_ip:
description: The IP address of the deployed instance
value: { get_attr: [basic_server, first_address] }
instance_networks:
description: 'A dict of assigned network addresses of the form: {“public”: [ip1, ip2...], “private”: [ip3, ip4]}'
value: { get_attr: [basic_server, networks] }