1 heat_template_version: 2014-10-16
2 description: HOT template to create a DPI
15 type: OS::Neutron::Net
19 type: OS::Neutron::Subnet
21 network_id: { get_resource: internal_net }
25 type: OS::Neutron::Port
27 network: { get_resource: internal_net }
29 - subnet: { get_resource: internal_subnet }
32 type: OS::Nova::Server
40 echo "Creating custom user..."
41 useradd clouduser -g admin -s /bin/bash -m
42 echo clouduser:secrete | chpasswd
43 echo "Enabling ssh password login..."
44 sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
51 sed -i 's/localhost/localhost traffic_vm1/g' /etc/hosts
52 touch /etc/resolfconf/resolv.conf.d/tail
53 echo 'nameserver 8.8.8.8' > /etc/resolvconf/resolv.conf.d/tail
56 # Installation of stress
57 apt-get install -y stress
64 wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip
65 apt-get install -y zip
66 unzip MerlinAgent-12-06-2015-TNovaVM-001.zip
67 ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm
68 ./updateConfiguration.py ./instrumentation.cfg tags role=cpu_stress
69 nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 &
73 nohup stress -c #CORES --vm-bytes #MEMORY
76 $NAME: { get_param: name }
77 $CORES: { get_param: cores }
78 $MEMORY: { get_param: memory }
82 - port: { get_resource: port }