Skip to content

Commit 705ee34

Browse files
author
Sergey Skripnick
committed
Add Dockerfile
This file may be used to build rally image for docker. More about docker: https://www.docker.com/ Also added some docs in installation.rst Change-Id: I8580755b6838a3cebc2bd9e27854e68a02ff26b4
1 parent 6db0bde commit 705ee34

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM ubuntu:14.04
2+
MAINTAINER Sergey Skripnick <[email protected]>
3+
COPY . /tmp/rally
4+
RUN apt-get update && \
5+
apt-get -y install git python2.7 bash-completion python-dev libffi-dev \
6+
libxml2-dev libxslt1-dev libssl-dev &&\
7+
cd /tmp/rally &&\
8+
./install_rally.sh &&\
9+
apt-get -y remove libssl-dev libffi-dev python-dev libxml2-dev \
10+
libxslt1-dev build-essential gcc-4.8 python3 && \
11+
apt-get -y autoremove &&\
12+
apt-get clean &&\
13+
mv doc /usr/share/doc/rally &&\
14+
rm -fr /tmp/* &&\
15+
rm -rf /var/lib/apt/lists/* &&\
16+
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10 &&\
17+
useradd -m rally &&\
18+
ln -s /usr/share/doc/rally /home/rally/rally-docs
19+
USER rally
20+
CMD bash --login
21+
ENV HOME /home/rally
22+
WORKDIR /home/rally

doc/source/installation.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,52 @@ After the installation step has been completed, you need to create the Rally dat
155155
And finally you are able to :ref:`use Rally <usage>`!
156156

157157

158+
Rally & Docker
159+
^^^^^^^^^^^^^^
160+
161+
There is an image on dokerhub with rally installed. To pull this image just execute:
162+
163+
.. code-block: none
164+
165+
docker pull rallyforge/rally
166+
167+
Or you may want to build rally image from source:
168+
169+
.. code-block: none
170+
171+
# first cd to rally source root dir
172+
docker build -t myrally .
173+
174+
Since rally stores local settings in user's home dir and the database in /var/lib/rally/database,
175+
you may want to keep this directories outside of container. This may be done by the following steps:
176+
177+
.. code-block: none
178+
179+
cd ~ #go to your home directory
180+
mkdir rally_home rally_db
181+
docker run -t -i -v ~/rally_home:/home/rally -v ~/rally_db:/var/lib/rally/database rallyforge/rally
182+
183+
You may want to save last command as an alias:
184+
185+
.. code-block: none
186+
187+
echo 'alias dock_rally="docker run -t -i -v ~/rally_home:/home/rally -v ~/rally_db:/var/lib/rally/database rallyforge/rally"' >> ~.bashrc
188+
189+
After executing ``dock_rally`` alias, or ``docker run`` you got bash running inside container with
190+
rally installed. You may do anytnig with rally, but you need to create db first:
191+
192+
.. code-block: none
193+
194+
user@box:~/rally$ dock_rally
195+
rally@1cc98e0b5941:~$ rally-manage db recreate
196+
rally@1cc98e0b5941:~$ rally deployment list
197+
There are no deployments. To create a new deployment, use:
198+
rally deployment create
199+
rally@1cc98e0b5941:~$
200+
201+
More about docker: `https://www.docker.com/ <https://www.docker.com/>`_
202+
203+
158204
Running Rally's Unit Tests
159205
--------------------------
160206

0 commit comments

Comments
 (0)