2 ##############################################################################
3 # Copyright (c) 2017 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 ##############################################################################
12 source_file=/etc/apt/sources.list
13 sed -i -e 's/^deb \([^/[]\)/deb [arch=amd64] \1/g' "${source_file}"
14 sed -i -e 's/^deb-src /# deb-src /g' "${source_file}"
15 echo "APT::Default-Release \"trusty\";" > /etc/apt/apt.conf.d/default-distro
17 sub_source_file=/etc/apt/sources.list.d/yardstick.list
18 touch "${sub_source_file}"
19 echo -e "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial-updates universe
20 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty main universe multiverse restricted
21 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main universe multiverse restricted
22 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-security main universe multiverse restricted
23 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-proposed main universe multiverse restricted" > "${sub_source_file}"
24 echo "vm.mmap_min_addr = 0" > /etc/sysctl.d/mmap_min_addr.conf
25 dpkg --add-architecture arm64
28 apt-get update && apt-get install -y \
29 qemu-user-static/xenial \
52 apt-get -y autoremove && apt-get clean
54 git config --global http.sslVerify false
57 # install yardstick + dependencies
59 pip install -r requirements.txt
62 /bin/bash "$(pwd)/api/api-prepare.sh"
65 uwsgi -i /etc/yardstick/yardstick.ini