OOM Offline Installer removed from conf.py
[doc.git] / docs / guides / onap-user / design / parameter_resolution / ubuntu_example / ubuntuCDS_heat / base_ubuntuCDS.yaml
1 heat_template_version: 2013-05-23
2
3 description: Heat template to deploy a ubuntuCDS VM
4
5 parameters:
6   # Metadata required by ONAP
7   vnf_name:
8     type: string
9     label: VM name
10     description: The VM name
11   vnf_id:
12     type: string
13     label: VNF ID
14     description: The VNF ID is provided by ONAP
15   vf_module_id:
16     type: string
17     label: VF module ID
18     description: The VF Module ID is provided by ONAP
19
20 # Server parameters, naming required by ONAP
21   ubuntuCDS_image_name:
22     type: string
23     label: Image name or ID
24     description: Image to be used for compute instance
25   ubuntuCDS_flavor_name:
26     type: string
27     label: Flavor
28     description: Type of instance (flavor) to be used
29   ubuntuCDS_pub_key:
30     type: string
31     label: Public key
32     description: Public key to be installed on the compute instance
33   ubuntuCDS_name_0:
34     type: string
35     label: VM name
36     description: The VM name
37
38 # Network parameters, naming required by ONAP
39   admin_plane_net_name:
40     type: string
41     label: management network
42     description: The external management network
43
44 resources:
45   random-str:
46     type: OS::Heat::RandomString
47     properties:
48       length: 4
49
50   ubuntuCDS_instantiated_key_name:
51     type: OS::Nova::KeyPair
52     properties:
53       name:
54         str_replace:
55           template: pre_base_rand
56           params:
57             pre: key_
58             base: { get_param: vnf_name }
59             rand: { get_resource: random-str }
60       public_key: { get_param: ubuntuCDS_pub_key }
61       save_private_key: false
62
63   ubuntuCDS_admin_security_group:
64     type: OS::Neutron::SecurityGroup
65     properties:
66       description: security group
67       name:
68         str_replace:
69           template: pre_base_rand
70           params:
71             pre: sg_
72             base: { get_param: vnf_name }
73             rand: { get_resource: random-str }
74       rules: [
75         {remote_ip_prefix: 0.0.0.0/0, protocol: tcp, port_range_min: 22, port_range_max: 22},
76         {remote_ip_prefix: 0.0.0.0/0, protocol: icmp}]
77
78   ubuntuCDS_0_admin_plane_port_0:
79     type: OS::Neutron::Port
80     properties:
81       name:
82         str_replace:
83           template: pre_base_rand
84           params:
85             pre: port_
86             base: { get_param: vnf_name }
87             rand: { get_resource: random-str }
88       network: { get_param: admin_plane_net_name }
89       security_groups: [{ get_resource: ubuntuCDS_admin_security_group }]
90
91   ubuntuCDS_VM_settings:
92     type: OS::Heat::SoftwareConfig
93     properties:
94       config: |
95             #!/bin/bash
96             sudo apt-get update
97
98   ubuntuCDS_server_0:
99     type: OS::Nova::Server
100     properties:
101       image: { get_param: ubuntuCDS_image_name }
102       flavor: { get_param: ubuntuCDS_flavor_name }
103       name: { get_param: ubuntuCDS_name_0 }
104       metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }, vnf_name: { get_param: vnf_name }}
105       key_name: { get_resource: ubuntuCDS_instantiated_key_name }
106       networks:
107         - port: { get_resource: ubuntuCDS_0_admin_plane_port_0 }
108       user_data_format: RAW
109       user_data:
110         get_resource: ubuntuCDS_VM_settings