1807e2f43948604944accd6ebb305342fd93246b
[yardstick.git] / install.sh
1 # install tools
2 apt-get update && apt-get install -y \
3     wget \
4     expect \
5     curl \
6     git \
7     sshpass \
8     qemu-utils \
9     kpartx \
10     libffi-dev \
11     libssl-dev \
12     python \
13     python-dev \
14     python-pip \
15     flake8
16     libxml2-dev \
17     libxslt1-dev \
18     nginx \
19     uwsgi \
20     uwsgi-plugin-python \
21     supervisor \
22     python-setuptools && \
23     easy_install -U setuptools
24
25 apt-get -y autoremove && apt-get clean
26
27
28 # fit for arm64
29 source_file=/etc/apt/sources.list
30 sed -i -e 's/^deb \([^/[]\)/deb [arch=amd64] \1/g' "${source_file}"
31 sed -i -e 's/^deb-src /# deb-src /g' "${source_file}"
32
33 sub_source_file=/etc/apt/sources.list.d/yardstick.list
34 touch "${sub_source_file}"
35 echo -e "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty main universe multiverse restricted
36 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main universe multiverse restricted
37 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-security main universe multiverse restricted
38 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-proposed main universe multiverse restricted" > "${sub_source_file}"
39 echo "vm.mmap_min_addr = 0" > /etc/sysctl.d/mmap_min_addr.conf
40 dpkg --add-architecture arm64
41 apt-get install -y qemu-user-static libc6:arm64
42
43 # install yardstick + dependencies
44 easy_install -U pip
45 pip install -r requirements.txt
46 pip install .