blob: d3baf41da5bdc14510624de9d4840be339aa9ef8 [file] [log] [blame]
Arthur Martella62cd6aa2017-09-08 13:27:46 -04001heat_template_version: 2013-05-23
2
3description: nested heat template that creates a PCRF OAM node stack
4
5parameters:
6 pcrf_oam_server_name:
7 type: string
8 label: PCRF OAM server name
9 description: PCRF OAM server name
10 pcrf_oam_image_name:
11 type: string
12 label: image name
13 description: PCRF OAM image name
14 pcrf_oam_flavor_name:
15 type: string
16 label: PCRF OAM flavor name
17 description: flavor name of PCRF OAM instance
18 availabilityzone_name:
19 type: string
20 label: availabilityzone name
21 description: availabilityzone name
22 pcrf_cps_net_name:
23 type: string
24 label: CPS network name
25 description: CPS network name
26 pcrf_cps_net_ip:
27 type: string
28 label: CPS network ip
29 description: CPS network ip
30 pcrf_cps_net_mask:
31 type: string
32 label: CPS network mask
33 description: CPS network mask
34 pcrf_arbiter_vip:
35 type: string
36 label: OAM Arbiter LB VIP
37 description: OAM Arbiter LB VIP
38 pcrf_oam_net_name:
39 type: string
40 label: OAM network name
41 description: OAM network name
42 pcrf_oam_net_ip:
43 type: string
44 label: OAM network ip
45 description: OAM network ip
46 pcrf_oam_net_gw:
47 type: string
48 label: CPS network gateway
49 description: CPS network gateway
50 pcrf_oam_net_mask:
51 type: string
52 label: CPS network mask
53 description: CPS network mask
54 pcrf_oam_volume_id:
55 type: string
56 label: CPS OAM Cinder Volume
57 description: CPS OAM Cinder Volume
58 pcrf_security_group_name:
59 type: string
60 label: security group name
61 description: the name of security group
62 pcrf_vnf_id:
63 type: string
64 label: PCRF VNF Id
65 description: PCRF VNF Id
66
67resources:
68 network:
69 type: OS::Heat::CloudConfig
70 properties:
71 cloud_config:
72 write_files:
73 - path: /etc/sysconfig/network-scripts/ifcfg-eth0
74 permissions: "0644"
75 content:
76 str_replace:
77 template: { get_file: nimbus-ethernet }
78 params:
79 $dev: eth0
80 $ip: { get_param: pcrf_cps_net_ip }
81 $netmask: { get_param: pcrf_cps_net_mask }
82 - path: /etc/sysconfig/network-scripts/ifcfg-eth1
83 permissions: "0644"
84 content:
85 str_replace:
86 template: { get_file: nimbus-ethernet-gw }
87 params:
88 $dev: eth1
89 $ip: { get_param: pcrf_oam_net_ip }
90 $netmask: { get_param: pcrf_oam_net_mask }
91 $gateway: { get_param: pcrf_oam_net_gw }
92 runcmd:
93 - ifdown eth0 && ifup eth0
94 - ifdown eth1 && ifup eth1
95 script_init:
96 type: OS::Heat::SoftwareConfig
97 properties:
98 group: ungrouped
99 config:
100 str_replace:
101 template: { get_file: cloud-nimbus.sh }
102 params:
103 $vm_name: { get_param: pcrf_oam_server_name }
104 pcrf_server_init:
105 type: OS::Heat::MultipartMime
106 properties:
107 parts:
108 - config: { get_resource: network}
109 - config: { get_resource: script_init}
110
111 pcrf_server_oam:
112 type: OS::Nova::Server
113 properties:
114 config_drive: "True"
115 name: { get_param: pcrf_oam_server_name }
116 image: { get_param: pcrf_oam_image_name }
117 flavor: { get_param: pcrf_oam_flavor_name }
118 availability_zone: { get_param: availabilityzone_name }
119 networks:
120 - port: { get_resource: pcrf_oam_port_0}
121 - port: { get_resource: pcrf_oam_port_1}
122 user_data_format: RAW
123 user_data:
124 get_resource: pcrf_server_init
125 metadata:
126 vnf_id: {get_param: pcrf_vnf_id}
127
128 pcrf_oam_port_0:
129 type: OS::Neutron::Port
130 properties:
131 network: { get_param: pcrf_cps_net_name }
132 fixed_ips:
133 - ip_address: { get_param: pcrf_cps_net_ip }
134 allowed_address_pairs:
135 - ip_address: { get_param: pcrf_arbiter_vip }
136 security_groups: [{ get_param: pcrf_security_group_name }]
137
138 pcrf_oam_port_1:
139 type: OS::Neutron::Port
140 properties:
141 network: { get_param: pcrf_oam_net_name }
142 fixed_ips:
143 - ip_address: { get_param: pcrf_oam_net_ip }
144 security_groups: [{ get_param: pcrf_security_group_name }]
145
146 pcrf_oam_vol_attachment:
147 type: OS::Cinder::VolumeAttachment
148 properties:
149 volume_id: { get_param: pcrf_oam_volume_id }
150 mountpoint: /dev/vdd
151 instance_uuid: { get_resource: pcrf_server_oam }
152
153outputs:
154 pcrf_oam_vol_attachment_id:
155 description: the pcrf_oam_vol_attachment_id id
156 value: { get_resource: pcrf_oam_vol_attachment }