1 heat_template_version: 2014-10-16
2 description: HOT template to create a DPI
18 type: OS::Neutron::Net
22 type: OS::Neutron::Subnet
24 network_id: { get_resource: internal_net }
31 type: OS::Neutron::Router
36 router_id: { get_resource: router }
37 type: OS::Neutron::RouterGateway
41 router_id: { get_resource: router }
42 subnet_id: { get_resource: internal_subnet }
43 type: OS::Neutron::RouterInterface
46 type: OS::Neutron::Port
48 network: { get_resource: internal_net }
49 binding:vnic_type: { get_param: nic_type }
51 - subnet: { get_resource: internal_subnet }
54 type: OS::Nova::Flavor
61 type: OS::Nova::Server
70 echo "Creating custom user..."
71 useradd clouduser -g admin -s /bin/bash -m
72 echo clouduser:secrete | chpasswd
73 echo "Enabling ssh password login..."
74 sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
81 sed -i 's/localhost/localhost traffic_vm1/g' /etc/hosts
82 touch /etc/resolfconf/resolv.conf.d/tail
83 echo 'nameserver 8.8.8.8' > /etc/resolvconf/resolv.conf.d/tail
86 # Installation of stress
87 apt-get install -y stress
94 wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip
95 apt-get install -y zip
96 unzip MerlinAgent-12-06-2015-TNovaVM-001.zip
97 ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm
98 ./updateConfiguration.py ./instrumentation.cfg tags role=cpu_stress
99 nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 &
103 nohup stress -c #CORES --vm-bytes #MEMORY
106 $NAME: { get_param: name }
107 $CORES: { get_param: cores }
108 $MEMORY: { get_param: memory }
110 flavor: { get_resource: flavor_1 }
112 - port: { get_resource: vm1_port_1 }