Add missing extend_start files for ceilometer container

Change-Id: I927c0593fc6b669d760b3744a5e77c532a164ca5
closes-Bug: #1571274
Partially-Implements: blueprint ansible-ceilometer
This commit is contained in:
Hui Kang 2016-04-17 14:18:07 -04:00
parent 0786e6b165
commit a703469265
5 changed files with 22 additions and 2 deletions

View File

@ -17,8 +17,8 @@ RUN apt-get install -y --no-install-recommends \
{% endif %} {% endif %}
{% endif %} {% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start COPY extend_start.sh /usr/local/bin/kolla_ceilometer_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_ceilometer_extend_start
{{ include_footer }} {{ include_footer }}

View File

@ -4,5 +4,6 @@
# of the KOLLA_BOOTSTRAP variable being set, including empty. # of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
ceilometer-manage db_sync ceilometer-manage db_sync
sudo chown -R ceilometer: /var/lib/ceilometer/
exit 0 exit 0
fi fi

View File

@ -29,6 +29,14 @@ RUN ln -s ceilometer-base-source/* ceilometer \
&& chown -R ceilometer: /etc/ceilometer /var/log/ceilometer /home/ceilometer \ && chown -R ceilometer: /etc/ceilometer /var/log/ceilometer /home/ceilometer \
&& sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/ceilometer/rootwrap.conf && sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/ceilometer/rootwrap.conf
COPY ceilometer_sudoers /etc/sudoers.d/ceilometer_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/ceilometer_sudoers \
&& touch /usr/local/bin/kolla_ceilometer_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_ceilometer_extend_start
{% endif %} {% endif %}
RUN usermod -a -G kolla ceilometer RUN usermod -a -G kolla ceilometer

View File

@ -0,0 +1 @@
%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R ceilometer\: /var/lib/ceilometer/, /bin/chown -R ceilometer\: /var/lib/ceilometer/

View File

@ -0,0 +1,10 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/ceilometer" ]]; then
mkdir -p /var/log/kolla/ceilometer
fi
if [[ $(stat -c %a /var/log/kolla/ceilometer) != "755" ]]; then
chmod 755 /var/log/kolla/ceilometer
fi
source /usr/local/bin/kolla_ceilometer_extend_start