heat_template_version: 2014-10-16 description: HOT template to create a DPI parameters: name: type: string default: cpu_stress cores: type: string memory: type: string resources: internal_net: type: OS::Neutron::Net properties: name: traffic_network internal_subnet: type: OS::Neutron::Subnet properties: network_id: { get_resource: internal_net } cidr: 10.100.0.0/24 port: type: OS::Neutron::Port properties: network: { get_resource: internal_net } fixed_ips: - subnet: { get_resource: internal_subnet } vm1: type: OS::Nova::Server properties: name: traffic_vm1 image: ubuntu1404 user_data: str_replace: template: | #!/bin/sh echo "Creating custom user..." useradd clouduser -g admin -s /bin/bash -m echo clouduser:secrete | chpasswd echo "Enabling ssh password login..." sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config service ssh restart sleep 1 ifconfig eth1 up dhclient eth1 sed -i 's/localhost/localhost traffic_vm1/g' /etc/hosts touch /etc/resolfconf/resolv.conf.d/tail echo 'nameserver 8.8.8.8' > /etc/resolvconf/resolv.conf.d/tail resolvconf -u # Installation of stress apt-get install -y stress cd /home/clouduser # Setup merlin rm -rf merlin mkdir merlin cd merlin wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip apt-get install -y zip unzip MerlinAgent-12-06-2015-TNovaVM-001.zip ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm ./updateConfiguration.py ./instrumentation.cfg tags role=cpu_stress nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & cd .. # workload setup nohup stress -c #CORES --vm-bytes #MEMORY params: $NAME: { get_param: name } $CORES: { get_param: cores } $MEMORY: { get_param: memory } flavor: m1.small networks: - port: { get_resource: port }