1 # Copyright (c) 2016-2017 Intel Corporation
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 heat_template_version: 2014-10-16
15 description: HOT template to create a DPI
32 type: OS::Neutron::Port
34 network: { get_param: network }
36 - subnet: { get_param: subnet }
39 type: OS::Nova::Server
47 echo "Creating custom user..."
48 useradd clouduser -g admin -s /bin/bash -m
49 echo clouduser:secrete | chpasswd
50 echo "Enabling ssh password login..."
51 sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
58 sed -i 's/localhost/localhost traffic_vm1/g' /etc/hosts
59 touch /etc/resolvconf/resolv.conf.d/tail
60 echo 'nameserver 10.118.32.193' > /etc/resolvconf/resolv.conf.d/tail
62 echo 'nameserver 10.118.32.193' > /etc/resolv.conf
65 # Installation of stress
66 apt-get install -y stress
71 echo 'stress -c $CORES --vm-bytes $MEMORY' > ./stress.sh
74 #nohup stress -c #CORES --vm-bytes #MEMORY
77 $NAME: { get_param: name }
78 $CORES: { get_param: cores }
79 $MEMORY: { get_param: memory }
83 - port: { get_resource: port }