Simplify usage of docker container

* Move default config to /etc/rally, so it will be possible top mount
  custom directories to /home/rally

* Update help message

* Add gitter info

* Use proper versions of python dependencies (upper-constaints file)

Change-Id: If33ae8e6441bbea35f31b232adb229fc193fbd0d
This commit is contained in:
Andrey Kurilin 2017-12-10 00:07:44 +02:00
parent eac62b653c
commit a150575fd6
2 changed files with 17 additions and 9 deletions

View File

@ -9,27 +9,35 @@ RUN apt-get update && apt-get install --yes sudo python python-pip vim git-core
COPY . /home/rally/source
WORKDIR /home/rally/source
RUN pip install .
RUN pip install . --constraint upper-constraints.txt && \
mkdir /etc/rally && mkdir /home/rally/data && \
echo "[db]" > /etc/rally/rally.conf && \
echo "connection=sqlite:////home/rally/data/rally.db" >> /etc/rally/rally.conf
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
>> /etc/bash.bashrc; echo '\
╔═════════════════════════════════════════════════════════════════════════════╗\n\
║ Welcome to Rally Docker container! ║\n\
║ Rally pre created tasks, samples and docs are located at ~/source/ ║\n\
║ Rally configuration and DB are in ~/.rally/ ║\n\
║ ║\n\
║ WARNING: DO NOT OVERRIDE /home/rally DIRECTORY ║\n\
║ ║\n\
║ /home/rally/data - a default place with rally database. Use it for\n\
║ mounting own directories and synchronizing rally database. ║\n\
║ /home/rally/source - a directory with documentation, pre created tasks, ║\n\
║ sampes and source code ║\n\
║ /etc/rally/rally.conf - a default configuration file of rally. To override ║\n\
║ it, mount custom configration file to /home/rally/.rally/rally.conf ║\n\
║ ║\n\
║ Rally at readthedocs - http://rally.readthedocs.org ║\n\
║ How to contribute - http://rally.readthedocs.org/en/latest/contribute.html ║\n\
║ If you have any questions, you can reach the Rally team by: ║\n\
║ * e-mail - openstack-dev@lists.openstack.org with tag [Rally] in subject ║\n\
║ * gitter - https://gitter.im/xRally/Lobby room ║\n\
║ * irc - "#openstack-rally" channel at freenode.net ║\n\
╚═════════════════════════════════════════════════════════════════════════════╝\n' > /etc/motd
USER rally
ENV HOME /home/rally
WORKDIR /home/rally
RUN mkdir .rally && \
cp ./source/etc/rally/rally.conf.sample .rally/rally.conf && \
sed -i "s|#connection *=.*|connection = \"sqlite:////home/rally/.rally/rally.db\"|" .rally/rally.conf && \
rally db recreate
RUN rally db recreate
# Docker volumes have specific behavior that allows this construction to work.
# Data generated during the image creation is copied to volume only when it's

View File

@ -16,7 +16,7 @@ oslo.utils===3.30.0
osprofiler===1.13.0
paramiko===2.3.1
pbr===3.1.1
PrettyTable===7
PrettyTable===0.7
python-ceilometerclient===2.9.0
python-cinderclient===3.2.0
python-designateclient===2.7.0