Add HOT parameters for the simulator
[integration.git] / test / mocks / mass-pnf-sim / deployment / heat / heat.yaml
1 description: Heat template for deploying Mass PNF Simulator
2 heat_template_version: '2017-02-24'
3 parameters:
4   flavor_name:
5     description: Flavor name of the simulator instance. This should depend on the requested amount of simulator instances
6     type: string
7   image_name:
8     description: Name or id of the image (Debian family only)
9     type: string
10   key_name:
11     label: Key pair name for passwordless login to instance
12     type: string
13   float_net_id:
14     description: ID of the network with a pool of floating IPs
15     label: Floating IP network
16     type: string
17   instance_net_id:
18     type: string
19     description: Id of a private network for instance interface
20   simulator_instances:
21     type: number
22     description: Number of simulator instances to run on cloud instance
23   ves_url:
24     type: string
25     description: VES Collector url
26   ftp_user:
27     type: string
28     description: Username for the ftp server
29   ftp_password:
30     type: string
31     description: Password for the ftp server
32 resources:
33   config:
34     type: OS::Heat::SoftwareConfig
35     properties:
36       config:
37         get_file: cloud-config.yaml
38   sim_script:
39     type: OS::Heat::SoftwareConfig
40     properties:
41       config:
42         str_replace:
43           template:
44             get_file: mass-pnf-sim_run.sh
45           params:
46             $SIMULATOR_INSTANCES: { get_param: simulator_instances }
47             $VES_URL: { get_param: ves_url }
48             $FILE_SERVER: { get_attr: [simulator_floating_ip, floating_ip_address] }
49             $FTP_USER: { get_param: ftp_user }
50             $FTP_PASSWORD: { get_param: ftp_password }
51   sim_script_file:
52     type: OS::Heat::CloudConfig
53     properties:
54       cloud_config:
55         write_files:
56           - path: /root/mass-pnf-sim_run.sh
57             content:
58               get_attr: [sim_script, config]
59   simulator_port:
60     type: OS::Neutron::Port
61     properties:
62       network:
63         get_param: instance_net_id
64   simulator_floating_ip:
65     type: OS::Neutron::FloatingIP
66     properties:
67       floating_network:
68         get_param: float_net_id
69       port_id:
70         get_resource: simulator_port
71   cloud_config:
72     type: OS::Heat::MultipartMime
73     properties:
74       parts:
75         - config:
76             get_resource: config
77         - config:
78             get_resource: sim_script_file
79   simulator:
80     type: OS::Nova::Server
81     properties:
82       name: mass-pnf-simulator
83       key_name:
84         get_param: key_name
85       image:
86         get_param: image_name
87       flavor:
88         get_param: flavor_name
89       networks:
90         - port:
91             get_resource: simulator_port
92       user_data_format: RAW
93       user_data:
94         get_resource: cloud_config
95 outputs:
96   simulator_instance_id:
97     description: ID of the simulator instance
98     value:
99       get_resource: simulator
100   simulator_instance_fip:
101     description: Floating IP address of the simulator instance
102     value:
103       get_attr: [simulator_floating_ip, floating_ip_address]