aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/vTC/apexlake/heat_templates/stress_workload_liberty.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/vTC/apexlake/heat_templates/stress_workload_liberty.yaml')
-rw-r--r--yardstick/vTC/apexlake/heat_templates/stress_workload_liberty.yaml71
1 files changed, 71 insertions, 0 deletions
diff --git a/yardstick/vTC/apexlake/heat_templates/stress_workload_liberty.yaml b/yardstick/vTC/apexlake/heat_templates/stress_workload_liberty.yaml
new file mode 100644
index 000000000..bac57014b
--- /dev/null
+++ b/yardstick/vTC/apexlake/heat_templates/stress_workload_liberty.yaml
@@ -0,0 +1,71 @@
+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
+ network:
+ type: string
+ subnet:
+ type: string
+
+resources:
+ port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: network }
+ port_security_enabled: false
+ fixed_ips:
+ - subnet: { get_param: 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/resolvconf/resolv.conf.d/tail
+ echo 'nameserver 10.118.32.193' > /etc/resolvconf/resolv.conf.d/tail
+ resolvconf -u
+ echo 'nameserver 10.118.32.193' > /etc/resolv.conf
+
+
+ # Installation of stress
+ apt-get install -y stress
+
+ cd /home/clouduser
+
+ # workload setup
+ echo 'stress -c $CORES --vm-bytes $MEMORY' > ./stress.sh
+ chmod +x ./stress.sh
+ nohup ./stress.sh &
+ #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 }