blob: 9718c5c68094832b816207d45528e8671c751c0d (
plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
description: Heat template for deploying Mass PNF Simulator
heat_template_version: '2017-02-24'
parameters:
flavor_name:
description: Flavor name of the simulator instance. This should depend on the requested amount of simulator instances
type: string
image_name:
description: Name or id of the image (Debian family only)
type: string
key_name:
label: Key pair name for passwordless login to instance
type: string
float_net_id:
description: ID of the network with a pool of floating IPs
label: Floating IP network
type: string
instance_net_id:
type: string
description: Id of a private network for instance interface
simulator_instances:
type: number
description: Number of simulator instances to run on cloud instance
ves_url:
type: string
description: VES Collector url
ftp_user:
type: string
description: Username for the ftp server
ftp_password:
type: string
description: Password for the ftp server
resources:
config:
type: OS::Heat::SoftwareConfig
properties:
config:
get_file: cloud-config.yaml
sim_script:
type: OS::Heat::SoftwareConfig
properties:
config:
str_replace:
template:
get_file: mass-pnf-sim_run.sh
params:
$SIMULATOR_INSTANCES: { get_param: simulator_instances }
$VES_URL: { get_param: ves_url }
$FILE_SERVER: { get_attr: [simulator_floating_ip, floating_ip_address] }
$FTP_USER: { get_param: ftp_user }
$FTP_PASSWORD: { get_param: ftp_password }
sim_script_file:
type: OS::Heat::CloudConfig
properties:
cloud_config:
write_files:
- path: /root/mass-pnf-sim_run.sh
content:
get_attr: [sim_script, config]
simulator_port:
type: OS::Neutron::Port
properties:
network:
get_param: instance_net_id
simulator_floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network:
get_param: float_net_id
port_id:
get_resource: simulator_port
cloud_config:
type: OS::Heat::MultipartMime
properties:
parts:
- config:
get_resource: config
- config:
get_resource: sim_script_file
simulator:
type: OS::Nova::Server
properties:
name: mass-pnf-simulator
key_name:
get_param: key_name
image:
get_param: image_name
flavor:
get_param: flavor_name
networks:
- port:
get_resource: simulator_port
user_data_format: RAW
user_data:
get_resource: cloud_config
outputs:
simulator_instance_id:
description: ID of the simulator instance
value:
get_resource: simulator
simulator_instance_fip:
description: Floating IP address of the simulator instance
value:
get_attr: [simulator_floating_ip, floating_ip_address]
|