[Bindep]Use bindep lib to install system packages

1.Fix install_rally.sh.Move all system packages from
  install_rally.sh script to separate file bindep.txt
  add call to bindep from install_rally.sh script
2.Add bindep command to tox.ini, we can use "tox
  -e bindep" to check the required system packages
  which is missing.
3.Install bindep when running Dockerfile

Change-Id: If4568c22d3b4f1c393c217d935cda233bd41d45e
This commit is contained in:
chenhb-zte 2016-11-16 14:15:15 +08:00
parent 34c54104e9
commit c7901b4e40
3 changed files with 35 additions and 1 deletions

View File

@ -2,7 +2,7 @@ FROM ubuntu:16.04
MAINTAINER Sergey Skripnick <sskripnick@mirantis.com>
# install prereqs
RUN apt-get update && apt-get install --yes wget python vim bash-completion gcc
RUN apt-get update && apt-get install --yes wget python vim bash-completion gcc lsb-release
# ubuntu's pip is too old to work with the version of requests we
# require, so get pip with get-pip.py
@ -10,6 +10,9 @@ RUN wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
rm -f get-pip.py
# install bindep
RUN pip install bindep
# create rally user
RUN apt-get install sudo && \
useradd -u 65500 -m rally && \

23
bindep.txt Normal file
View File

@ -0,0 +1,23 @@
# This is a cross-platform list tracking distribution packages needed by tests;
# see http://docs.openstack.org/infra/bindep/ for additional information.
build-essential [platform:dpkg]
gcc [platform:rpm]
git
gmp-devel [platform:rpm]
libffi-dev [platform:dpkg]
libffi-devel [platform:rpm !platform:opensuse]
libffi48-devel [platform:opensuse]
libpq-dev [platform:dpkg]
libssl-dev [platform:dpkg]
libxml2-dev [platform:dpkg]
libxml2-devel [platform:rpm]
libxslt1-dev [platform:dpkg]
libxslt-devel [platform:rpm]
openssl-devel [platform:rpm]
postgresql-devel [platform:rpm !platform:opensuse]
postgresql93-devel [platform:opensuse]
python-dev [platform:dpkg]
python-devel [platform:rpm]
redhat-rpm-config [platform:rpm]
wget

View File

@ -83,3 +83,11 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build,setup.py
[hacking]
import_exceptions = rally.common.i18n
local-check-factory = tests.hacking.checks.factory
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep