X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=install.sh;h=49a8bd085e1314f0d0f53b9bd9298e49755c83c2;hb=42e59b19264a8a31650d2a111b79d932accd8e4e;hp=e82ae0233ab3590b9d12dab9817db1cc8cb487eb;hpb=d184d8714e543e4f2497db682154820f7eecf1de;p=yardstick.git diff --git a/install.sh b/install.sh index e82ae0233..49a8bd085 100755 --- a/install.sh +++ b/install.sh @@ -14,6 +14,7 @@ DOCKER_ARCH="$(uname -m)" UBUNTU_PORTS_URL="http://ports.ubuntu.com/ubuntu-ports/" UBUNTU_ARCHIVE_URL="http://archive.ubuntu.com/ubuntu/" +source /etc/os-release source_file=/etc/apt/sources.list if [[ "${DOCKER_ARCH}" == "aarch64" ]]; then @@ -33,24 +34,32 @@ else fi sed -i -e 's/^deb-src /# deb-src /g' "${source_file}" -echo "APT::Default-Release \"trusty\";" > /etc/apt/apt.conf.d/default-distro + +VERSION_CODENAME=${VERSION_CODENAME:-trusty} + +echo "APT::Default-Release \""${VERSION_CODENAME}"\";" > /etc/apt/apt.conf.d/default-distro sub_source_file=/etc/apt/sources.list.d/yardstick.list touch "${sub_source_file}" # first add xenial repo needed for installing qemu_static_user/xenial in the container # then add complementary architecture repositories in case the cloud image is of different arch -echo -e "deb [arch="${DOCKER_ARCH}"] "${DOCKER_REPO}" xenial-updates universe -deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" trusty main universe multiverse restricted -deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" trusty-updates main universe multiverse restricted -deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" trusty-security main universe multiverse restricted -deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" trusty-proposed main universe multiverse restricted" > "${sub_source_file}" +if [[ "${VERSION_CODENAME}" != "xenial" ]]; then + REPO_UPDATE="deb [arch="${DOCKER_ARCH}"] "${DOCKER_REPO}" xenial-updates universe" +fi + +echo -e ""${REPO_UPDATE}" +deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" "${VERSION_CODENAME}" main universe multiverse restricted +deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" "${VERSION_CODENAME}"-updates main universe multiverse restricted +deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" "${VERSION_CODENAME}"-security main universe multiverse restricted +deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" "${VERSION_CODENAME}"-proposed main universe multiverse restricted" > "${sub_source_file}" echo "vm.mmap_min_addr = 0" > /etc/sysctl.d/mmap_min_addr.conf # install tools apt-get update && apt-get install -y \ qemu-user-static/xenial \ + bonnie++ \ wget \ expect \ curl \ @@ -89,6 +98,7 @@ pip install -e . /bin/bash "${PWD}/docker/uwsgi.sh" /bin/bash "${PWD}/docker/nginx.sh" cd "${PWD}/gui" && /bin/bash gui.sh +mkdir -p /etc/nginx/yardstick mv dist /etc/nginx/yardstick/gui service nginx restart