Merge "repair rally dockerfile"

This commit is contained in:
Jenkins 2016-08-31 15:05:22 +00:00 committed by Gerrit Code Review
commit 7168f3c430
2 changed files with 21 additions and 2 deletions

View File

@ -17,12 +17,16 @@ RUN useradd --user-group rally
ADD rally-archive /rally-source ADD rally-archive /rally-source
RUN ln -s rally-source/* rally \ RUN ln -s rally-source/* rally \
&& useradd --user-group rally \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /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 \ && mkdir -p /etc/rally /var/log/rally /home/rally \
&& useradd --user-group rally && chown -R rally: /etc/rally /var/log/rally /home/rally
{% endif %} {% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla rally RUN usermod -a -G kolla rally
{% block rally_footer %}{% endblock %} {% block rally_footer %}{% endblock %}

View File

@ -0,0 +1,15 @@
#!/bin/bash
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
rally-manage db recreate
exit 0
fi
if [[ ! -d "/var/log/kolla/rally" ]]; then
mkdir -p /var/log/kolla/rally
fi
if [[ $(stat -c %a /var/log/kolla/rally) != "755" ]]; then
chmod 755 /var/log/kolla/rally
fi