aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Zhang <jeffrey.zhang@99cloud.net>2016-06-07 20:14:24 +0800
committerJeffrey Zhang <jeffrey.zhang@99cloud.net>2016-06-14 14:30:03 +0000
commit3afe149e517230cf0511c692bc15b14ac9b69da0 (patch)
tree5b50f08b9dd3d6764cc3402cac0d45d7ab2a3c43
parente6c1d4178215b1dc51ddb032dec0b13e67d644b8 (diff)
downloadkolla-3afe149e517230cf0511c692bc15b14ac9b69da0.tar.gz
kolla-3afe149e517230cf0511c692bc15b14ac9b69da0.zip
Implement Rally Dockerfile
Partially Implements: blueprint rally-container Change-Id: If8c4fdb51b8083078dddc68598d48c6e139a615a
-rw-r--r--docker/rally/Dockerfile.j233
-rw-r--r--kolla/common/config.py4
2 files changed, 37 insertions, 0 deletions
diff --git a/docker/rally/Dockerfile.j2 b/docker/rally/Dockerfile.j2
new file mode 100644
index 000000000..5d6aa0e1e
--- /dev/null
+++ b/docker/rally/Dockerfile.j2
@@ -0,0 +1,33 @@
+FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
+MAINTAINER {{ maintainer }}
+
+{% if install_type == 'binary' %}
+ {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
+
+RUN yum -y install \
+ openstack-rally \
+ && yum clean all \
+ && useradd --user-group rally
+
+ {% elif base_distro in ['ubuntu'] %}
+
+RUN apt-get -y install --no-install-recommends \
+ rally \
+ && apt-get clean
+
+ {% endif %}
+{% elif install_type == 'source' %}
+
+ADD rally-archive /rally-source
+RUN ln -s rally-source/* rally \
+ && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /rally \
+ && mkdir -p /etc/rally /var/log/rally \
+ && useradd --user-group rally
+
+{% endif %}
+
+RUN usermod -a -G kolla rally
+
+{{ include_footer }}
+
+USER rally
diff --git a/kolla/common/config.py b/kolla/common/config.py
index b1224d09e..b1f2fdea1 100644
--- a/kolla/common/config.py
+++ b/kolla/common/config.py
@@ -240,6 +240,10 @@ SOURCES = {
'type': 'url',
'location': ('http://github.com/kanaka/noVNC/tarball/'
'v0.5.1')},
+ 'rally': {
+ 'type': 'url',
+ 'location': ('http://tarballs.openstack.org/rally/'
+ 'rally-master.tar.gz')},
'sahara-base': {
'type': 'url',
'location': ('http://tarballs.openstack.org/sahara/'