2 ##############################################################################
3 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
16 if [ ! -d ~/.ssh ]; then
20 chmod 600 ~/.ssh/id_rsa
22 if [ ! -d /root/.ssh ]; then
26 sudo sed -ie 's/ssh-rsa/\n&/g' /root/.ssh/authorized_keys
27 sudo sed -ie '/echo/d' /root/.ssh/authorized_keys
32 echo "Bottlenecks: configue nameserver"
33 sudo rm /etc/resolv.conf
34 sudo echo "nameserver 8.8.8.8" >> /etc/resolv.conf
35 sudo echo "nameserver 8.8.4.4" >> /etc/resolv.conf
37 ping -c 1 www.google.com
42 echo "Bottlenecks: install preinstall packages in VM"
46 if ! apt --installed list 2>/dev/null |grep "\<$i\>"
48 sudo apt-get install -y --force-yes $i
55 echo "Bottlnecks: hosts config"
57 $rubbos_benchmark rubbos-benchmark
58 $rubbos_client1 rubbos-client1
59 $rubbos_client2 rubbos-client2
60 $rubbos_client3 rubbos-client3
61 $rubbos_client4 rubbos-client4
62 $rubbos_control rubbos-control
63 $rubbos_httpd rubbos-httpd
64 $rubbos_mysql1 rubbos-mysql1
65 $rubbos_tomcat1 rubbos-tomcat1