3 # yardstick output config
4 output_config='/etc/yardstick/yardstick.conf'
6 if [[ ! -e "${output_config}" ]];then
7 gateway_ip=$(ip route | grep default | awk '{print $3}')
10 install -d /etc/yardstick -m 0755 -o root
12 cat << EOF > "${output_config}"
18 file_path = /tmp/yardstick.out
22 # target = http://127.0.0.1:8000/results
26 target = http://${gateway_ip}:8086
34 nginx_config='/etc/nginx/conf.d/yardstick.conf'
36 if [[ ! -e "${nginx_config}" ]];then
38 cat << EOF >> "${nginx_config}"
41 server_name localhost;
42 index index.htm index.html;
45 uwsgi_pass unix:///home/opnfv/repos/yardstick/api/yardstick.sock;
51 # nginx service start when boot
52 cat << EOF >> /root/.bashrc
54 nginx_status=\$(service nginx status | grep not)
55 if [ -n "\${nginx_status}" ];then
57 uwsgi -i /home/opnfv/repos/yardstick/api/yardstick.ini