Remove docker folder from kolla-ansible

Change-Id: I5d76f9a6e5614600f4752330a3984504fc51377a
Closes-Bug: #1642237
This commit is contained in:
Mauricio Lima 2016-11-22 09:11:01 -03:00
parent 47ea8a34f1
commit e66d827bd9
322 changed files with 0 additions and 9255 deletions

View File

@ -1,22 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block aodh_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set aodh_api_packages = ['openstack-aodh-api'] %}
{% elif base_distro in ['ubuntu'] %}
{% set aodh_api_packages = ['aodh-api'] %}
{% endif %}
{{ macros.install_packages(aodh_api_packages | customizable("packages")) }}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_aodh_extend_start
RUN chmod 755 /usr/local/bin/kolla_aodh_extend_start
{% block aodh_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -1,18 +0,0 @@
#!/bin/bash
# NOTE(pbourke): httpd will not clean up after itself in some cases which
# results in the container not being able to restart. (bug #1489676, 1557036)
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
fi
# 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
aodh-dbsync
exit 0
fi

View File

@ -1,86 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block aodh_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set aodh_base_packages = [
'openstack-aodh-common',
'python-aodhclient',
'httpd',
'mod_wsgi',
'python-ldappool'
] %}
{{ macros.install_packages(aodh_base_packages | customizable("packages")) }}
RUN mkdir -p /var/www/cgi-bin/aodh \
&& cp -a /usr/lib/python2.7/site-packages/aodh/api/app.wsgi /var/www/cgi-bin/aodh/ \
&& sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
{% elif base_distro in ['ubuntu'] %}
{% set aodh_base_packages = [
'aodh-common',
'apache2',
'libapache2-mod-wsgi',
'python-ldappool'
] %}
{{ macros.install_packages(aodh_base_packages | customizable("packages")) }}
RUN mkdir -p /var/www/cgi-bin/aodh \
&& cp -a /usr/lib/python2.7/dist-packages/aodh/api/app.wsgi /var/www/cgi-bin/aodh/ \
&& echo > /etc/apache2/ports.conf
{% endif %}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set aodh_base_packages = [
'httpd',
'mod_wsgi',
'python-ldappool'
] %}
{{ macros.install_packages(aodh_base_packages | customizable("packages")) }}
RUN mkdir -p /var/www/cgi-bin/aodh \
&& sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set aodh_base_packages = [
'apache2',
'libapache2-mod-wsgi',
'python-ldappool'
] %}
{{ macros.install_packages(aodh_base_packages | customizable("packages")) }}
RUN mkdir -p /var/www/cgi-bin/aodh \
&& echo > /etc/apache2/ports.conf
{% endif %}
ADD aodh-base-archive /aodh-base-source
RUN ln -s aodh-base-source/* aodh \
&& useradd --user-group aodh \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt pymongo /aodh \
&& mkdir -p /etc/aodh /var/log/kolla/aodh /var/www/cgi-bin/aodh /home/aodh \
&& cp -r /aodh/etc/aodh/* /etc/aodh/ \
&& cp /aodh/aodh/api/app.wsgi /var/www/cgi-bin/aodh \
&& chown -R aodh: /etc/aodh /var/log/kolla/aodh /var/www/cgi-bin/aodh /home/aodh
{% endif %}
RUN usermod -a -G kolla aodh
COPY extend_start.sh /usr/local/bin/kolla_extend_start
COPY aodh_sudoers /etc/sudoers.d/kolla_aodh_sudoers
RUN usermod -a -G kolla aodh \
&& chmod 750 /etc/sudoers.d \
&& chmod 640 /etc/sudoers.d/kolla_aodh_sudoers \
&& chmod 755 /var/www/cgi-bin/aodh \
&& touch /usr/local/bin/kolla_aodh_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_aodh_extend_start
{% block aodh_base_footer %}{% endblock %}

View File

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

View File

@ -1,15 +0,0 @@
#!/bin/bash
# Create log dir for Aodh logs
AODH_LOG_DIR="/var/log/kolla/aodh"
if [[ ! -d "${AODH_LOG_DIR}" ]]; then
mkdir -p ${AODH_LOG_DIR}
fi
if [[ $(stat -c %U:%G ${AODH_LOG_DIR}) != "aodh:kolla" ]]; then
chown aodh:kolla ${AODH_LOG_DIR}
fi
if [[ $(stat -c %a ${AODH_LOG_DIR}) != "755" ]]; then
chmod 755 ${AODH_LOG_DIR}
fi
. /usr/local/bin/kolla_aodh_extend_start

View File

@ -1,22 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block aodh_evaluator_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set aodh_evaluator_packages = ['openstack-aodh-evaluator'] %}
{% elif base_distro in ['ubuntu'] %}
{% set aodh_evaluator_packages = ['aodh-evaluator'] %}
{% endif %}
{{ macros.install_packages(aodh_evaluator_packages | customizable("packages")) }}
{% endif %}
{% block aodh_evaluator_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER aodh

View File

@ -1,22 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block aodh_expirer_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set aodh_expirer_packages = ['openstack-aodh-expirer'] %}
{% elif base_distro in ['ubuntu'] %}
{% set aodh_expirer_packages = ['aodh-expirer'] %}
{% endif %}
{{ macros.install_packages(aodh_expirer_packages | customizable("packages")) }}
{% endif %}
{% block aodh_expirer_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER aodh

View File

@ -1,22 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block aodh_listener_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set aodh_listener_packages = ['openstack-aodh-listener'] %}
{% elif base_distro in ['ubuntu'] %}
{% set aodh_listener_packages = ['aodh-listener'] %}
{% endif %}
{{ macros.install_packages(aodh_listener_packages | customizable("packages")) }}
{% endif %}
{% block aodh_listener_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER aodh

View File

@ -1,22 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block aodh_notifier_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set aodh_notifier_packages = ['openstack-aodh-notifier'] %}
{% elif base_distro in ['ubuntu'] %}
{% set aodh_notifier_packages = ['aodh-notifier'] %}
{% endif %}
{{ macros.install_packages(aodh_notifier_packages | customizable("packages")) }}
{% endif %}
{% block aodh_notifier_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER aodh

View File

@ -1,29 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}barbican-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block barbican_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set barbican_api_packages = ['openstack-barbican-api'] %}
{% elif base_distro in ['ubuntu'] %}
{% set barbican_api_packages = [
'uwsgi-plugin-python',
'barbican-api'
] %}
{% endif %}
{{ macros.install_packages(barbican_api_packages | customizable("packages")) }}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_barbican_extend_start
RUN chmod 755 /usr/local/bin/kolla_barbican_extend_start
{% block barbican_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER barbican

View File

@ -1,8 +0,0 @@
#!/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
barbican-db-manage upgrade
exit 0
fi

View File

@ -1,45 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block barbican_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set barbican_base_packages = ['openstack-barbican-common'] %}
{% elif base_distro in ['ubuntu'] %}
{% set barbican_base_packages = ['barbican-common'] %}
{% endif %}
{{ macros.install_packages(barbican_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set barbican_base_packages = ['uwsgi-plugin-python'] %}
{% elif base_distro in ['ubuntu'] %}
{% set barbican_base_packages = ['uwsgi-plugin-python'] %}
{% endif %}
{{ macros.install_packages(barbican_base_packages | customizable("packages")) }}
ADD barbican-base-archive /barbican-base-source
RUN ln -s barbican-base-source/* barbican \
&& useradd --user-group barbican \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt pastedeploy uwsgi MySQL-python python-barbicanclient /barbican \
&& mkdir -p /etc/barbican /var/log/barbican /home/barbican /var/lib/barbican \
&& cp -r /barbican/etc/barbican/* /etc/barbican/ \
&& chown -R barbican: /etc/barbican /var/log/barbican /home/barbican /var/lib/barbican
{% endif %}
COPY barbican_sudoers /etc/sudoers.d/kolla_barbican_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla barbican \
&& chmod 750 /etc/sudoers.d \
&& chmod 640 /etc/sudoers.d/kolla_barbican_sudoers \
&& touch /usr/local/bin/kolla_barbican_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_barbican_extend_start
{% block barbican_base_footer %}{% endblock %}

View File

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

View File

@ -1,15 +0,0 @@
#!/bin/bash
# Create log dir for Barbican logs
LOG_DIR="/var/log/kolla/barbican"
if [[ ! -d "${LOG_DIR}" ]]; then
mkdir -p ${LOG_DIR}
fi
if [[ $(stat -c %U:%G ${LOG_DIR}) != "barbican:kolla" ]]; then
chown barbican:kolla ${LOG_DIR}
fi
if [[ $(stat -c %a ${LOG_DIR}) != "755" ]]; then
chmod 755 ${LOG_DIR}
fi
. /usr/local/bin/kolla_barbican_extend_start

View File

@ -1,22 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}barbican-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block barbican_keystone_listener_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set barbican_keystone_listener_packages = ['openstack-barbican-keystone-listener'] %}
{% elif base_distro in ['ubuntu'] %}
{% set barbican_keystone_listener_packages = ['barbican-keystone-listener'] %}
{% endif %}
{{ macros.install_packages(barbican_keystone_listener_packages | customizable("packages")) }}
{% endif %}
{% block barbican_keystone_listener_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER barbican

View File

@ -1,22 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}barbican-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block barbican_worker_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set barbican_worker_packages = ['openstack-barbican-worker'] %}
{% elif base_distro in ['ubuntu'] %}
{% set barbican_worker_packages = ['barbican-worker'] %}
{% endif %}
{{ macros.install_packages(barbican_worker_packages | customizable("packages")) }}
{% endif %}
{% block barbican_worker_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER barbican

View File

@ -1,44 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block bifrost_base_header %}{% endblock %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' && /bin/false
{% elif install_type == 'source' %}
ADD bifrost-base-archive /bifrost-base-source
COPY build_arg.yml /tmp/build_arg.yml
RUN ln -s bifrost-base-source/* bifrost \
&& useradd --user-group bifrost \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /bifrost
WORKDIR /bifrost
{% if base_distro in ['ubuntu', 'debian'] %}
RUN sed -e "s/.*mariadb.*//Ig" -i /etc/apt/sources.list && apt-get purge -y mariadb* mysql*
{% endif %}
RUN bash -c './scripts/env-setup.sh && source ./env-vars && source /opt/stack/ansible/hacking/env-setup && \
ansible-playbook -vvvv -i /bifrost/playbooks/inventory/localhost /bifrost/playbooks/install.yaml \
-e @/tmp/build_arg.yml && \
{% if base_distro in ['ubuntu', 'debian'] %}
apt-get clean'
{% else %}
yum clean all'
{% endif %}
{% endif %}
COPY bifrost_sudoers /etc/sudoers.d/kolla_bifrost_sudoers
RUN usermod -a -G kolla bifrost \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_bifrost_sudoers \
&& chown -R bifrost:bifrost /bifrost
{% block bifrost_base_footer %}{% endblock %}

View File

@ -1 +0,0 @@
bifrost ALL=(ALL) NOPASSWD:ALL

View File

@ -1,5 +0,0 @@
---
skip_bootstrap: true
skip_start: true
install_dib: true
create_image_via_dib: false

View File

@ -1,61 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}bifrost-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block bifrost_deploy_header %}{% endblock %}
ENV container docker
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel', 'debian'] or (base_distro == 'ubuntu' and base_distro_tag == '16.04') %}
RUN bash -c ' $(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ \"$i\" == \"systemd-tmpfiles-setup.service\" ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;'
{% elif base_distro in ['ubuntu'] %}
# derived from https://raw.githubusercontent.com/tianon/dockerfiles/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile
ADD init-fake.conf /etc/init/fake-container-events.conf
# undo some leet hax of the base image
RUN rm /usr/sbin/policy-rc.d; \
rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl
# remove some pointless services
RUN /usr/sbin/update-rc.d -f ondemand remove; \
for f in \
/etc/init/u*.conf \
/etc/init/mounted-dev.conf \
/etc/init/mounted-proc.conf \
/etc/init/mounted-run.conf \
/etc/init/mounted-tmp.conf \
/etc/init/mounted-var.conf \
/etc/init/hostname.conf \
/etc/init/networking.conf \
/etc/init/tty*.conf \
/etc/init/plymouth*.conf \
/etc/init/hwclock*.conf \
/etc/init/module*.conf\
; do \
dpkg-divert --local --rename --add "$f"; \
done; \
echo '# /lib/init/fstab: cleared out for bare-bones Docker' > /lib/init/fstab
{% endif %}
{% set bifrost_deploy_packages = [
'e2fsprogs'
] %}
{{ macros.install_packages(bifrost_deploy_packages | customizable("packages")) }}
CMD [ "/sbin/init" ]
{% block bifrost_deploy_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -1,14 +0,0 @@
# copied from https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/init-fake.conf
# fake some events needed for correct startup other services
description "In-Container Upstart Fake Events"
start on startup
script
rm -rf /var/run/*.pid
rm -rf /var/run/network/*
/sbin/initctl emit stopped JOB=udevtrigger --no-wait
/sbin/initctl emit started JOB=udev --no-wait
/sbin/initctl emit runlevel RUNLEVEL=3 --no-wait
end script

View File

@ -1,66 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block ceilometer_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set ceilometer_api_packages = [
'openstack-ceilometer-api',
'httpd',
'mod_wsgi'
] %}
{{ macros.install_packages(ceilometer_api_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
{% elif base_distro in ['ubuntu'] %}
{% set ceilometer_api_packages = [
'ceilometer-api',
'apache2',
'libapache2-mod-wsgi'
] %}
{{ macros.install_packages(ceilometer_api_packages | customizable("packages")) }}
RUN echo > /etc/apache2/ports.conf
{% endif %}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set ceilometer_api_packages = [
'httpd',
'mod_wsgi',
'gettext'
] %}
{{ macros.install_packages(ceilometer_api_packages | customizable("packages")) }}
{% block ceilometer_api_redhat_source_setup %}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
{% endblock %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set ceilometer_api_packages = [
'apache2',
'libapache2-mod-wsgi',
'gettext'
] %}
{{ macros.install_packages(ceilometer_api_packages | customizable("packages")) }}
{% block ceilometer_api_ubuntu_source_setup %}
RUN echo > /etc/apache2/ports.conf
{% endblock %}
{% endif %}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_ceilometer_extend_start
RUN chmod 755 /usr/local/bin/kolla_ceilometer_extend_start
{% block ceilometer_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -1,26 +0,0 @@
#!/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
if [[ "${CEILOMETER_DATABASE_TYPE}" == "mysql" ]]; then
sudo -H -u ceilometer ceilometer-upgrade --skip-gnocchi-resource-types
elif [[ "${CEILOMETER_DATABASE_TYPE}" == "gnocchi" ]]; then
sudo -H -u ceilometer ceilometer-upgrade --skip-metering-database --skip-event-database
elif [[ "${CEILOMETER_DATABASE_TYPE}" == "mongodb" ]]; then
echo "Ceilometer doesn't need to initialize a database when MongoDB is configured as the database backend."
else
echo "Unsupported database type: ${CEILOMETER_DATABASE_TYPE}"
exit 1
fi
sudo chown -R ceilometer: /var/lib/ceilometer/
exit 0
fi
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
fi

View File

@ -1,44 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block ceilometer_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set ceilometer_base_packages = [
'openstack-ceilometer-common',
'python-tooz',
'python-oslo-db'
] %}
{% elif base_distro in ['ubuntu'] %}
{% set ceilometer_base_packages = [
'ceilometer-common',
'python-pymongo'
] %}
{% endif %}
{{ macros.install_packages(ceilometer_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
ADD ceilometer-base-archive /ceilometer-base-source
RUN ln -s ceilometer-base-source/* ceilometer \
&& useradd --user-group ceilometer \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /ceilometer[gnocchi,mongo,mysql] \
&& mkdir -p /etc/ceilometer /var/lib/ceilometer /home/ceilometer \
&& cp -r /ceilometer/etc/ceilometer/* /etc/ceilometer/ \
&& chown -R ceilometer: /etc/ceilometer /var/lib/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
{% endif %}
COPY ceilometer_sudoers /etc/sudoers.d/kolla_ceilometer_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla ceilometer \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_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

View File

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

View File

@ -1,15 +0,0 @@
#!/bin/bash
CEILOMETER_LOG_DIR=/var/log/kolla/ceilometer
if [[ ! -d "${CEILOMETER_LOG_DIR}" ]]; then
mkdir -p "${CEILOMETER_LOG_DIR}"
fi
if [[ $(stat -c %U:%G "${CEILOMETER_LOG_DIR}") != "ceilometer:kolla" ]]; then
chown ceilometer:kolla "${CEILOMETER_LOG_DIR}"
fi
if [[ $(stat -c %a "${CEILOMETER_LOG_DIR}") != "755" ]]; then
chmod 755 "${CEILOMETER_LOG_DIR}"
fi
. /usr/local/bin/kolla_ceilometer_extend_start

View File

@ -1,23 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block ceilometer_central_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set ceilometer_central_packages = ['openstack-ceilometer-central'] %}
{% elif base_distro in ['ubuntu'] %}
{% set ceilometer_central_packages = ['ceilometer-agent-central'] %}
{% endif %}
{{ macros.install_packages(ceilometer_central_packages | customizable("packages")) }}
{% endif %}
{% block ceilometer_central_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER ceilometer

View File

@ -1,23 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block ceilometer_collector_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set ceilometer_collector_packages = ['openstack-ceilometer-collector'] %}
{% elif base_distro in ['ubuntu'] %}
{% set ceilometer_collector_packages = ['ceilometer-collector'] %}
{% endif %}
{{ macros.install_packages(ceilometer_collector_packages | customizable("packages")) }}
{% endif %}
{% block ceilometer_collector_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER ceilometer

View File

@ -1,48 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block ceilometer_compute_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set ceilometer_compute_packages = [
'openstack-ceilometer-compute',
'python-ceilometerclient'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set ceilometer_compute_packages = [
'ceilometer-agent-compute',
'python-ceilometerclient'
] %}
{% endif %}
{{ macros.install_packages(ceilometer_compute_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
libvirt-devel \
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get -y install --no-install-recommends \
libvirt-dev \
&& apt-get clean
{% endif %}
RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt libvirt-python
{% endif %}
{% block ceilometer_compute_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
# NOTE(huikang): non-root user does not work with libvirt.sock.
# Need configuration in nova-libvirt container to allow
# USER ceilometer to access libvirt.sock

View File

@ -1,23 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block ceilometer_notification_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set ceilometer_notification_packages = ['openstack-ceilometer-notification'] %}
{% elif base_distro in ['ubuntu'] %}
{% set ceilometer_notification_packages = ['ceilometer-agent-notification'] %}
{% endif %}
{{ macros.install_packages(ceilometer_notification_packages | customizable("packages")) }}
{% endif %}
{% block ceilometer_notification_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER ceilometer

View File

@ -1,37 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block ceph_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set ceph_base_packages = [
'ceph',
'ceph-radosgw',
'parted',
'hdparm',
'btrfs-progs',
'xfsprogs',
'e2fsprogs'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set ceph_base_packages = [
'ceph',
'radosgw',
'parted',
'hdparm',
'btrfs-tools',
'xfsprogs',
'e2fsprogs'
] %}
{% endif %}
{{ macros.install_packages(ceph_base_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start \
&& usermod -a -G kolla ceph
{% block ceph_base_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

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

View File

@ -1,13 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block ceph_mon_header %}{% endblock %}
COPY fetch_ceph_keys.py /usr/bin/
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/bin/fetch_ceph_keys.py
{% block ceph_mon_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -1,44 +0,0 @@
#!/bin/bash
# Setup common paths
KEYRING_ADMIN="/etc/ceph/ceph.client.admin.keyring"
KEYRING_MON="/etc/ceph/ceph.client.mon.keyring"
KEYRING_RGW="/etc/ceph/ceph.client.radosgw.keyring"
MONMAP="/etc/ceph/ceph.monmap"
MON_DIR="/var/lib/ceph/mon/ceph-${HOSTNAME}"
if [[ ! -d "/var/log/kolla/ceph" ]]; then
mkdir -p /var/log/kolla/ceph
fi
if [[ $(stat -c %a /var/log/kolla/ceph) != "755" ]]; then
chmod 755 /var/log/kolla/ceph
fi
# 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
# Lookup our fsid from the ceph.conf
FSID=$(awk '/^fsid/ {print $3; exit}' /etc/ceph/ceph.conf)
# Generating initial keyrings and monmap
ceph-authtool --create-keyring "${KEYRING_MON}" --gen-key -n mon. --cap mon 'allow *'
ceph-authtool --create-keyring "${KEYRING_ADMIN}" --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow'
ceph-authtool --create-keyring "${KEYRING_RGW}" --gen-key -n client.radosgw.gateway --set-uid=0 --cap osd 'allow rwx' --cap mon 'allow rwx'
ceph-authtool "${KEYRING_MON}" --import-keyring "${KEYRING_ADMIN}"
ceph-authtool "${KEYRING_MON}" --import-keyring "${KEYRING_RGW}"
monmaptool --create --add "${HOSTNAME}" "${MON_IP}" --fsid "${FSID}" "${MONMAP}"
exit 0
fi
# This section runs on every mon that does not have a keyring already.
if [[ ! -e "${MON_DIR}/keyring" ]]; then
KEYRING_TMP="/tmp/ceph.mon.keyring"
# Generate keyring for current monitor
ceph-authtool --create-keyring "${KEYRING_TMP}" --import-keyring "${KEYRING_ADMIN}"
ceph-authtool "${KEYRING_TMP}" --import-keyring "${KEYRING_MON}"
mkdir -p "${MON_DIR}"
ceph-mon --mkfs -i "${HOSTNAME}" --monmap "${MONMAP}" --keyring "${KEYRING_TMP}"
rm "${KEYRING_TMP}"
fi

View File

@ -1,68 +0,0 @@
#!/usr/bin/python
# Copyright 2015 Sam Yaple
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This is a stripped down version of an ansible module I wrote in Yaodu to
# achieve the same goals we have for Kolla. I have relicensed it for Kolla
# https://github.com/SamYaple/yaodu/blob/master/ansible/library/bslurp
# Basically this module will fetch the admin and mon keyrings as well as the
# monmap file. It then hashes the content, compresses them, and finally it
# converts them to base64 to be safely transported around with ansible
import base64
import hashlib
import json
import os
import sys
import zlib
def json_exit(msg=None, failed=False, changed=False):
if type(msg) is not dict:
msg = {'msg': str(msg)}
msg.update({'failed': failed, 'changed': changed})
print(json.dumps(msg))
sys.exit()
def read_file(filename):
filename_path = os.path.join('/etc/ceph', filename)
if not os.path.exists(filename_path):
json_exit("file not found: {}".format(filename_path), failed=True)
if not os.access(filename_path, os.R_OK):
json_exit("file not readable: {}".format(filename_path), failed=True)
with open(filename_path, 'rb') as f:
raw_data = f.read()
return {'content': base64.b64encode(zlib.compress(raw_data)),
'sha1': hashlib.sha1(raw_data).hexdigest(),
'filename': filename}
def main():
admin_keyring = 'ceph.client.admin.keyring'
mon_keyring = 'ceph.client.mon.keyring'
rgw_keyring = 'ceph.client.radosgw.keyring'
monmap = 'ceph.monmap'
files = [admin_keyring, mon_keyring, rgw_keyring, monmap]
json_exit({filename: read_file(filename) for filename in files})
if __name__ == '__main__':
main()

View File

@ -1,11 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block ceph_osd_header %}{% endblock %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block ceph_osd_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -1,73 +0,0 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/ceph" ]]; then
mkdir -p /var/log/kolla/ceph
fi
if [[ $(stat -c %a /var/log/kolla/ceph) != "755" ]]; then
chmod 755 /var/log/kolla/ceph
fi
# 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
# NOTE(SamYaple): Static gpt partcodes
CEPH_JOURNAL_TYPE_CODE="45B0969E-9B03-4F30-B4C6-B4B80CEFF106"
CEPH_OSD_TYPE_CODE="4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D"
# Wait for ceph quorum before proceeding
ceph quorum_status
if [[ "${USE_EXTERNAL_JOURNAL}" == "False" ]]; then
# Formatting disk for ceph
sgdisk --zap-all -- "${OSD_DEV}"
sgdisk --new=2:1M:5G -- "${JOURNAL_DEV}"
sgdisk --largest-new=1 -- "${OSD_DEV}"
# NOTE(SamYaple): This command may throw errors that we can safely ignore
partprobe || true
fi
OSD_ID=$(ceph osd create)
OSD_DIR="/var/lib/ceph/osd/ceph-${OSD_ID}"
mkdir -p "${OSD_DIR}"
if [[ "${OSD_FILESYSTEM}" == "btrfs" ]]; then
mkfs.btrfs -f "${OSD_PARTITION}"
elif [[ "${OSD_FILESYSTEM}" == "ext4" ]]; then
mkfs.ext4 "${OSD_PARTITION}"
else
mkfs.xfs -f "${OSD_PARTITION}"
fi
mount "${OSD_PARTITION}" "${OSD_DIR}"
# This will through an error about no key existing. That is normal. It then
# creates the key in the next step.
ceph-osd -i "${OSD_ID}" --mkfs --osd-journal="${JOURNAL_PARTITION}" --mkkey
ceph auth add "osd.${OSD_ID}" osd 'allow *' mon 'allow profile osd' -i "${OSD_DIR}/keyring"
umount "${OSD_PARTITION}"
if [[ "${!CEPH_CACHE[@]}" ]]; then
CEPH_ROOT_NAME=cache
fi
if [[ "${OSD_INITIAL_WEIGHT}" == "auto" ]]; then
OSD_INITIAL_WEIGHT=$(parted --script ${OSD_PARTITION} unit TB print | awk 'match($0, /^Disk.* (.*)TB/, a){printf("%.2f", a[1])}')
fi
# These commands only need to be run once per host but are safe to run
# repeatedly. This can be improved later or if any problems arise.
ceph osd crush add-bucket "${HOSTNAME}${CEPH_ROOT_NAME:+-${CEPH_ROOT_NAME}}" host
ceph osd crush move "${HOSTNAME}${CEPH_ROOT_NAME:+-${CEPH_ROOT_NAME}}" root=${CEPH_ROOT_NAME:-default}
# Adding osd to crush map
ceph osd crush add "${OSD_ID}" "${OSD_INITIAL_WEIGHT}" host="${HOSTNAME}${CEPH_ROOT_NAME:+-${CEPH_ROOT_NAME}}"
# Setting partition name based on ${OSD_ID}
sgdisk "--change-name=${OSD_PARTITION_NUM}:KOLLA_CEPH_DATA_${OSD_ID}" "--typecode=${OSD_PARTITION_NUM}:${CEPH_OSD_TYPE_CODE}" -- "${OSD_DEV}"
sgdisk "--change-name=${JOURNAL_PARTITION_NUM}:KOLLA_CEPH_DATA_${OSD_ID}_J" "--typecode=${JOURNAL_PARTITION_NUM}:${CEPH_JOURNAL_TYPE_CODE}" -- "${JOURNAL_DEV}"
exit 0
fi
OSD_DIR="/var/lib/ceph/osd/ceph-${OSD_ID}"
ARGS="-i ${OSD_ID} --osd-journal ${JOURNAL_PARTITION} -k ${OSD_DIR}/keyring"

View File

@ -1,8 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block ceph_rgw_header %}{% endblock %}
{% block ceph_rgw_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -1,23 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block chrony_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% set chrony_packages = ['chrony'] %}
{% if base_distro in ['ubuntu', 'debian'] %}
# Ubuntu use _chrony username to use unified running user with RHEL system
RUN useradd --user-group --create-home --home-dir /var/lib/chrony chrony
{% endif %}
{{ macros.install_packages(chrony_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start \
&& usermod -a -G kolla chrony
{% block chrony_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -1,10 +0,0 @@
#!/bin/bash
rm -f /var/run/chronyd.pid
if [[ ! -d "/var/log/kolla/chrony" ]]; then
mkdir -p /var/log/kolla/chrony
fi
if [[ $(stat -c %a /var/log/kolla/chrony) != "755" ]]; then
chmod 755 /var/log/kolla/chrony
fi

View File

@ -1,35 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block cinder_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set cinder_api_packages = [
'python-keystone'
] %}
{% elif base_distro in ['ubuntu'] %}
{% set cinder_api_packages = [
'cinder-api'
] %}
{% endif %}
{{ macros.install_packages(cinder_api_packages | customizable("packages")) }}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_cinder_extend_start
RUN chmod 755 /usr/local/bin/kolla_cinder_extend_start
{% block cinder_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER cinder

View File

@ -1,9 +0,0 @@
#!/bin/bash
set -o errexit
# 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
cinder-manage db sync
exit 0
fi

View File

@ -1,47 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block cinder_backup_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set cinder_backup_packages = [
'nfs-utils'
] %}
{% elif base_distro in ['ubuntu'] %}
{% set cinder_backup_packages = [
'nfs-common',
'cinder-backup'
] %}
{% endif %}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set cinder_backup_packages = [
'nfs-utils'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set cinder_backup_packages = [
'nfs-common'
] %}
{% endif %}
{% endif %}
{{ macros.install_packages(cinder_backup_packages | customizable("packages")) }}
{% block cinder_backup_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER cinder

View File

@ -1,73 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block cinder_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set cinder_base_packages = [
'openstack-cinder',
'python-automaton',
'lvm2',
'ceph-common'
] %}
{% elif base_distro in ['ubuntu'] %}
{% set cinder_base_packages = [
'cinder-common',
'ceph-common',
'lvm2'
] %}
{% endif %}
{{ macros.install_packages(cinder_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set cinder_base_packages = [
'lvm2',
'qemu-img',
'ceph-common'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set cinder_base_packages = [
'lvm2',
'qemu-utils',
'ceph-common'
] %}
{% endif %}
{{ macros.install_packages(cinder_base_packages | customizable("packages")) }}
ADD cinder-base-archive /cinder-base-source
RUN ln -s cinder-base-source/* cinder \
&& useradd --user-group cinder \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /cinder \
&& mkdir -p /etc/cinder /var/lib/cinder /home/cinder \
&& cp -r /cinder/etc/cinder/* /etc/cinder/ \
&& chown -R cinder: /etc/cinder /var/lib/cinder /home/cinder \
&& 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/cinder/rootwrap.conf
{% endif %}
COPY cinder_sudoers /etc/sudoers.d/kolla_cinder_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla cinder \
&& mkdir -p /etc/ceph \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_cinder_sudoers \
&& touch /usr/local/bin/kolla_cinder_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_cinder_extend_start
{% block cinder_base_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -1 +0,0 @@
cinder ALL = (root) NOPASSWD: /var/lib/kolla/venv/bin/cinder-rootwrap /etc/cinder/rootwrap.conf *

View File

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

View File

@ -1,24 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block cinder_scheduler_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['ubuntu'] %}
{% set cinder_scheduler_packages = [
'cinder-scheduler'
] %}
{{ macros.install_packages(cinder_scheduler_packages | customizable("packages")) }}
{% endif %}
{% endif %}
{% block cinder_scheduler_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER cinder

View File

@ -1,58 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block cinder_volume_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set cinder_volume_packages = [
'nfs-utils',
'scsi-target-utils'
] %}
{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }}
{% block cinder_volume_redhat_setup %}
RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf
{% endblock %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set cinder_volume_packages = [
'tgt'
] %}
{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }}
{% block cinder_volume_ubuntu_setup %}
RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf
{% endblock %}
{% endif %}
{% if install_type == 'binary' %}
{% if base_distro in ['ubuntu', 'debian'] %}
{% set cinder_volume_packages = [
'cinder-volume',
'nfs-common'
] %}
{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }}
{% endif %}
{% endif %}
COPY cinder_sudoers /etc/sudoers.d/kolla_cinder_volume_sudoers
COPY extend_start.sh /usr/local/bin/kolla_cinder_extend_start
RUN chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_cinder_volume_sudoers \
&& chmod 755 /usr/local/bin/kolla_cinder_extend_start
{% block cinder_volume_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER cinder

View File

@ -1,5 +0,0 @@
cinder ALL = (root) NOPASSWD: /var/lib/kolla/venv/bin/cinder-rootwrap /etc/cinder/rootwrap.conf *
%kolla ALL=(root) NOPASSWD: /bin/chown -R cinder\:kolla /var/lib/cinder, /usr/bin/chown -R cinder\:kolla /var/lib/cinder
%kolla ALL=(root) NOPASSWD: /bin/chmod 2775 /var/lib/cinder, /usr/bin/chmod 2775 /var/lib/cinder
%kolla ALL=(root) NOPASSWD: /bin/chown -R cinder\:kolla /etc/iscsi, /usr/bin/chown -R cinder\:kolla /etc/iscsi
%kolla ALL=(root) NOPASSWD: /bin/chmod 2775 /etc/iscsi, /usr/bin/chmod 2775 /etc/iscsi

View File

@ -1,14 +0,0 @@
#!/bin/bash
if [[ $(stat -c %U:%G /var/lib/cinder) != "cinder:kolla" ]]; then
sudo chown -R cinder:kolla /var/lib/cinder
fi
if [[ $(stat -c %a /var/lib/cinder) != "2775" ]]; then
sudo chmod 2775 /var/lib/cinder
fi
if [[ $(stat -c %U:%G /etc/iscsi) != "cinder:kolla" ]]; then
sudo chown -R cinder:kolla /etc/iscsi
fi
if [[ $(stat -c %a /etc/iscsi) != "2775" ]]; then
sudo chmod 2775 /etc/iscsi
fi

View File

@ -1,22 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}cloudkitty-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block cloudkitty_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_cloudkitty_extend_start
RUN chmod 755 /usr/local/bin/kolla_cloudkitty_extend_start
{% block cloudkitty_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER cloudkitty

View File

@ -1,9 +0,0 @@
#!/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
cloudkitty-dbsync upgrade
cloudkitty-storage-init
exit 0
fi

View File

@ -1,31 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block cloudkitty_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
ADD cloudkitty-base-archive /cloudkitty-base-source
RUN ln -s cloudkitty-base-source/* cloudkitty \
&& useradd --user-group cloudkitty \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /cloudkitty \
&& mkdir -p /etc/cloudkitty /var/lib/cloudkitty /home/cloudkitty \
&& cp -r /cloudkitty/etc/cloudkitty/* /etc/cloudkitty/ \
&& chown -R cloudkitty: /etc/cloudkitty /var/lib/cloudkitty /home/cloudkitty
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla cloudkitty \
&& touch /usr/local/bin/kolla_cloudkitty_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_cloudkitty_extend_start
{% block cloudkitty_base_footer %}{% endblock %}

View File

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

View File

@ -1,19 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}cloudkitty-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block cloudkitty_processor_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% block cloudkitty_processor_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER cloudkitty

View File

@ -1,24 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block collectd_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% set collectd_packages = [
'collectd'
] %}
{{ macros.install_packages(collectd_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN useradd -r -m collectd \
&& chmod 755 /usr/local/bin/kolla_extend_start \
&& usermod -a -G kolla collectd \
&& chown -R collectd /var/lib/collectd \
&& chown -R collectd /etc/collectd* \
&& chown -R collectd /var/run/
{% block collectd_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER collectd

View File

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

View File

@ -1,13 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}congress-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block congress_api_header %}{% endblock %}
COPY extend_start.sh /usr/local/bin/kolla_congress_extend_start
RUN chmod 755 /usr/local/bin/kolla_congress_extend_start
{% block congress_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER congress

View File

@ -1,8 +0,0 @@
#!/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
congress-db-manage --config-file /etc/congress/congress.conf upgrade head
exit 0
fi

View File

@ -1,46 +0,0 @@
FROM {{ namespace }}/{{ image_prefix}}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block congress_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['ubuntu'] %}
{% set congress_base_packages = [
'congress-common',
'congress-server']
%}
# TODO(Md Nadeem): need to add congress binary package when it is available in rpm base distro
#https://trunk.rdoproject.org/
{% elif base_distro in ['centos', 'oraclelinux', 'rhel'] %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{{ macros.install_packages(congress_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
ADD congress-base-archive /congress-base-source
RUN ln -s congress-base-source/* congress \
&& useradd --user-group congress \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /congress \
&& mkdir -p /etc/congress /home/congress \
&& cp -r /congress/etc/* /etc/congress/ \
&& chown -R congress: /etc/congress /home/congress
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla congress \
&& touch /usr/local/bin/kolla_congress_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_congress_extend_start
{% block congress_base_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

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

View File

@ -1,10 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}congress-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block congress_datasource_header %}{% endblock %}
{% block congress_datasource_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER congress

View File

@ -1,10 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}congress-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block congress_policy_engine_header %}{% endblock %}
{% block congress_policy_engine_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER congress

View File

@ -1,27 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block cron_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set cron_packages = [
'cronie',
'logrotate'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set cron_packages = [
'cron',
'logrotate'
] %}
{% endif %}
{{ macros.install_packages(cron_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block cron_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -1,7 +0,0 @@
#!/bin/bash
# NOTE(elemoine): the cron daemon sends its logs to /dev/log. Heka's log socket
# is at /var/lib/kolla/heka/log so we symlink /dev/log to that location.
if [[ ! -h /dev/log ]]; then
ln -sf /var/lib/kolla/heka/log /dev/log
fi

View File

@ -1,21 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block designate_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set designate_api_packages = ['openstack-designate-api'] %}
{% elif base_distro in ['ubuntu'] %}
{% set designate_api_packages = ['designate-api'] %}
{% endif %}
{{ macros.install_packages(designate_api_packages | customizable("packages")) }}
{% endif %}
{% block designate_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER designate

View File

@ -1,28 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block designate_backend_bind9_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set designate_backend_bind9_packages = ['bind'] %}
{{ macros.install_packages(designate_backend_bind9_packages | customizable("packages")) }}
RUN mkdir -p /var/lib/kolla/ \
&& cp -pr /var/named /var/lib/kolla/var-named
{% elif base_distro in ['ubuntu'] %}
{% set designate_backend_bind9_packages = ['bind9'] %}
{{ macros.install_packages(designate_backend_bind9_packages | customizable("packages")) }}
{% endif %}
{% endif %}
{% block designate_backend_bind9_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER designate

View File

@ -1,59 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block designate_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
# Install designate-api because of /etc/designate/policy.json, which
# is needed in all services. This is probably a packaging bug. We do
# need the complete policy file because of some of the containers'
# requiring it. Remove the package when the file is moved though.
{% set designate_base_packages = [
'openstack-designate-api',
'openstack-designate-common',
'python-tooz',
'python2-oslo-reports',
'python2-suds'
] %}
{{ macros.install_packages(designate_base_packages | customizable("packages")) }}
RUN cp /etc/designate/policy.json /tmp/ \
&& rpm -e openstack-designate-api \
&& mv /tmp/policy.json /etc/designate/ \
&& chown designate: /etc/designate/policy.json
{% elif base_distro in ['ubuntu'] %}
{% set designate_base_packages = [
'designate-common',
'python-tooz'
] %}
{{ macros.install_packages(designate_base_packages | customizable("packages")) }}
{% endif %}
{% elif install_type == 'source' %}
ADD designate-base-archive /designate-base-source
RUN ln -s designate-base-source/* designate \
&& useradd --user-group designate \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /designate \
&& mkdir -p /etc/designate /var/log/designate /home/designate \
&& cp -r /designate/etc/designate/* /etc/designate/ \
&& mv /etc/designate/rootwrap.conf.sample /etc/designate/rootwrap.conf \
&& chown -R designate: /etc/designate /var/log/designate /home/designate \
&& 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/designate/rootwrap.conf
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN touch /usr/local/bin/kolla_designate_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_designate_extend_start
{% block designate_base_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
RUN usermod -a -G kolla designate

View File

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

View File

@ -1,24 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block designate_central_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set designate_central_packages = ['openstack-designate-central'] %}
{% elif base_distro in ['ubuntu']%}
{% set designate_central_packages = ['designate-central'] %}
{% endif %}
{{ macros.install_packages(designate_central_packages | customizable("packages")) }}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_designate_extend_start
RUN chmod 755 /usr/local/bin/kolla_designate_extend_start
{% block designate_central_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER designate

View File

@ -1,14 +0,0 @@
#!/bin/bash
if [[ ! -f "/var/log/kolla/designate/designate-manage.log" ]]; then
touch /var/log/kolla/designate/designate-manage.log
chmod 644 /var/log/kolla/designate/designate-manage.log
fi
# 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
designate-manage database sync
designate-manage pool-manager-cache sync
exit 0
fi

View File

@ -1,21 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block designate_mdns_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set designate_mdns_packages = ['openstack-designate-mdns'] %}
{% elif base_distro in ['ubuntu'] %}
{% set designate_mdns_packages = ['designate-mdns'] %}
{% endif %}
{{ macros.install_packages(designate_mdns_packages | customizable("packages")) }}
{% endif %}
{% block designate_mdns_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER designate

View File

@ -1,28 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block designate_pool_manager_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
# The bind9 package here is only to provide the rndc binary.
{% set designate_pool_manager_packages = [
'bind',
'openstack-designate-pool-manager'
] %}
{% elif base_distro in ['ubuntu'] %}
{% set designate_pool_manager_packages = [
'bind9',
'designate-pool-manager'
] %}
{% endif %}
{{ macros.install_packages(designate_pool_manager_packages | customizable("packages")) }}
{% endif %}
{% block designate_pool_manager_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER designate

View File

@ -1,27 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block designate_sink_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set designate_sink_packages = [
'openstack-designate-sink',
'python-designateclient'
] %}
{% elif base_distro in ['ubuntu'] %}
{% set designate_sink_packages = [
'designate-sink',
'python-designateclient'
] %}
{% endif %}
{{ macros.install_packages(designate_sink_packages | customizable("packages")) }}
{% endif %}
{% block designate_sink_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER designate

View File

@ -1,30 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block dind_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
# Since the gate cannot do DinD on centos due to the age of the kernel, we don't
# build a true DinD image. Should the time come that we get a newer kernel in
# the centos gate and we want to do multinode we can populate this container
RUN /bin/true
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set dind_packages = [
'btrfs-tools',
'docker-engine',
'openssh-server'
] %}
{{ macros.install_packages(dind_packages | customizable("packages")) }}
RUN pip --no-cache-dir install --upgrade docker-py
{% endif %}
COPY start.sh /usr/local/bin/kolla_start
RUN chmod 755 /usr/local/bin/kolla_start
{% block dind_footer %}{% endblock %}
{{ include_footer }}

View File

@ -1,28 +0,0 @@
#!/bin/bash
set -o errexit
set -o nounset
# External processes will be occurring and we must wait for them
while [[ ! -e "/kolla_dind_ready" ]]; do
sleep 1
done
docker daemon -s btrfs 2>&1 > docker.log &
docker_pid=$!
mkdir -p /var/run/sshd
/usr/sbin/sshd -D 2>&1 > sshd.log &
sshd_pid=$!
mkdir -p /root/.ssh/
echo "${SSH_PUB}" > /root/.ssh/authorized_keys
# Wait for docker daemon
sleep 5
# Due to a quirk in the cloning method we end up with a bunch of dead containers
docker rm -v -f $(docker ps -a --no-trunc -q)
# Wait until child processes exit (they should never exit)
wait

View File

@ -1,45 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block elasticsearch_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set elasticsearch_packages = [
'java-1.7.0-openjdk',
'elasticsearch'
] %}
ENV JAVA_HOME /usr/lib/jvm/jre-1.7.0-openjdk/
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set elasticsearch_packages = [
'openjdk-8-jre',
'elasticsearch'
] %}
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
{% endif %}
{{ macros.install_packages(elasticsearch_packages | customizable("packages")) }}
COPY elasticsearch_sudoers /etc/sudoers.d/kolla_elasticsearch_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
# NOTE: By default the shell of the elasticsearch user is /bin/false. We have to
# change the shell to /bin/bash to be able to run elasticsearch as a non-root user.
#
# https://discuss.elastic.co/t/running-as-non-root-user-service-wrapper-has-changed/7863
RUN chmod 755 /usr/local/bin/kolla_extend_start \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_elasticsearch_sudoers \
&& usermod -a -G kolla elasticsearch \
&& usermod -s /bin/bash elasticsearch -d /usr/share/elasticsearch
{% block elasticsearch_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER elasticsearch

View File

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

View File

@ -1,13 +0,0 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/elasticsearch" ]]; then
mkdir -p /var/log/kolla/elasticsearch
fi
if [[ $(stat -c %a /var/log/kolla/elasticsearch) != "755" ]]; then
chmod 755 /var/log/kolla/elasticsearch
fi
# Only update permissions if permissions need to be updated
if [[ $(stat -c %U:%G /var/lib/elasticsearch/data) != "elasticsearch:elasticsearch" ]]; then
sudo chown elasticsearch: /var/lib/elasticsearch/data
fi

View File

@ -1,27 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block etcd_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set etcd_packages = ['etcd'] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set etcd_packages = ['etcd'] %}
{% endif %}
{{ macros.install_packages(etcd_packages | customizable("packages")) }}
COPY etcd_sudoers /etc/sudoers.d/kolla_etcd_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_etcd_sudoers \
&& usermod -a -G kolla etcd
{% block etcd_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER etcd

View File

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

View File

@ -1,16 +0,0 @@
#!/bin/bash
# Create log directory, with appropriate permissions
if [[ ! -d "/var/log/kolla/etcd" ]]; then
mkdir -p /var/log/kolla/etcd
fi
if [[ $(stat -c %a /var/log/kolla/etcd) != "755" ]]; then
chmod 755 /var/log/kolla/etcd
fi
# 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
sudo chown etcd: /var/lib/etcd/
exit 0
fi

View File

@ -1,54 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block fluentd_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
RUN rpm --import https://packages.treasuredata.com/GPG-KEY-td-agent
COPY td.repo /etc/yum.repos.d/td.repo
{% set fluentd_packages = [
'td-agent',
'gcc-c++',
'make'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN curl https://packages.treasuredata.com/GPG-KEY-td-agent | apt-key add - \
&& echo "deb http://packages.treasuredata.com/2/ubuntu/xenial/ xenial contrib" > /etc/apt/sources.list.d/treasure-data.list \
&& apt-get update
{% set fluentd_packages = [
'td-agent',
'make',
'g++'
] %}
{% endif %}
{{ macros.install_packages(fluentd_packages | customizable("packages")) }}
RUN ulimit -n 65536 \
&& sed -i -e "s/USER=td-agent/USER=root/" -e "s/GROUP=td-agent/GROUP=root/" /etc/init.d/td-agent \
&& td-agent-gem install fluent-plugin-kubernetes_metadata_filter fluent-plugin-elasticsearch fluent-plugin-grep \
&& rm -f /etc/td-agent/td-agent.conf
COPY fluentd_sudoers /etc/sudoers.d/kolla_fluentd_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla td-agent \
&& chmod 440 /etc/sudoers.d/kolla_fluentd_sudoers \
&& chmod 755 /usr/local/bin/kolla_extend_start \
&& chown -R td-agent: /etc/td-agent \
&& mkdir /var/lib/td-agent \
&& chown -R td-agent: /var/lib/td-agent
{% block fluentd_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER td-agent

View File

@ -1,16 +0,0 @@
#!/bin/bash
# Give processes executed with the "kolla" group the permission to create files
# and sub-directories in the /var/log/kolla directory.
#
# Also set the setgid permission on the /var/log/kolla directory so that new
# files and sub-directories in that directory inherit its group id ("kolla").
if [[ $(stat -c %U:%G /var/log/kolla) != "td-agent:kolla" ]]; then
sudo chown td-agent:kolla /var/log/kolla
fi
if [[ $(stat -c %a /var/log/kolla) != "2775" ]]; then
sudo chmod 2775 /var/log/kolla
fi
if [[ $(stat -c %U:%G /var/lib/td-agent) != "td-agent:kolla" ]]; then
sudo chown td-agent:kolla /var/lib/td-agent
fi

View File

@ -1,4 +0,0 @@
%kolla ALL=(root) NOPASSWD: /bin/chown td-agent\:kolla /var/log/kolla, /usr/bin/chown td-agent\:kolla /var/log/kolla
%kolla ALL=(root) NOPASSWD: /bin/chown td-agent\:kolla /var/lib/td-agent, /usr/bin/chown td-agent\:kolla /var/lib/td-agent
%kolla ALL=(root) NOPASSWD: /bin/chmod 2775 /var/log/kolla, /usr/bin/chmod 2775 /var/log/kolla
%kolla ALL=(root) NOPASSWD: /bin/chmod 2775 /var/lib/td-agent, /usr/bin/chmod 2775 /var/lib/td-agent

View File

@ -1,5 +0,0 @@
[treasuredata]
name=TreasureData
baseurl=http://packages.treasuredata.com/2/redhat/\$releasever/\$basearch
gpgcheck=1
gpgkey=https://packages.treasuredata.com/GPG-KEY-td-agent

View File

@ -1,49 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}freezer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block freezer_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set freezer_api_packages = [
'mod_wsgi',
'httpd'
] %}
{{ macros.install_packages(freezer_api_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set freezer_api_packages = [
'libapache2-mod-wsgi',
'apache2'
] %}
{{ macros.install_packages(freezer_api_packages | customizable("packages")) }}
RUN echo > /etc/apache2/ports.conf
{% endif %}
ADD freezer-api-archive /freezer-api-source
RUN ln -s freezer-api-source/* freezer-api \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /freezer-api \
&& cp -r /freezer-api/etc/freezer/* /etc/freezer/
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_freezer_extend_start
RUN chmod 755 /usr/local/bin/kolla_freezer_extend_start
{% block freezer_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER freezer

View File

@ -1,18 +0,0 @@
#!/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
freezer-manage db update
exit 0
fi
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
rm -rf /var/run/apache2/*
APACHE_DIR="apache2"
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
APACHE_DIR="httpd"
fi

View File

@ -1,34 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block freezer_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
ADD freezer-base-archive /freezer-base-source
RUN ln -s freezer-base-source/* freezer \
&& useradd --user-group freezer \
&& mkdir -p /etc/freezer /home/freezer \
&& chown -R freezer: /etc/freezer /home/freezer \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /freezer \
&& cp -r /freezer/etc/* /etc/freezer
{% endif %}
COPY freezer_sudoers /etc/sudoers.d/kolla_freezer_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla freezer \
&& chmod 750 /etc/sudoers.d \
&& chmod 640 /etc/sudoers.d/kolla_freezer_sudoers \
&& touch /usr/local/bin/kolla_freezer_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_freezer_extend_start
{% block freezer_base_footer %}{% endblock %}

View File

@ -1,15 +0,0 @@
#!/bin/bash
# Create log dir for freezer logs
LOG_DIR="/var/log/kolla/freezer"
if [[ ! -d "${LOG_DIR}" ]]; then
mkdir -p ${LOG_DIR}
fi
if [[ $(stat -c %U:%G ${LOG_DIR}) != "freezer:kolla" ]]; then
chown freezer:kolla ${LOG_DIR}
fi
if [[ $(stat -c %a ${LOG_DIR}) != "755" ]]; then
chmod 755 ${LOG_DIR}
fi
. /usr/local/bin/kolla_freezer_extend_start

View File

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

View File

@ -1,13 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}glance-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block glance_api_header %}{% endblock %}
COPY extend_start.sh /usr/local/bin/kolla_glance_extend_start
RUN chmod 755 /usr/local/bin/kolla_glance_extend_start
{% block glance_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER glance

View File

@ -1,10 +0,0 @@
#!/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
glance-manage db_sync
glance-manage db_load_metadefs
sudo chown -R glance: /var/lib/glance/
exit 0
fi

View File

@ -1,54 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block glance_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set glance_base_packages = [
'openstack-glance',
'python-rbd',
'python-rados'
] %}
{% elif base_distro in ['ubuntu'] %}
{% set glance_base_packages = [
'glance',
'python-rbd',
'python-rados'
] %}
{% endif %}
{{ macros.install_packages(glance_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
{% set glance_base_packages = [
'python-rbd',
'python-rados'
] %}
{{ macros.install_packages(glance_base_packages | customizable("packages")) }}
ADD glance-base-archive /glance-base-source
RUN ln -s glance-base-source/* glance \
&& useradd --user-group glance \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /glance[cinder] \
&& mkdir -p /etc/glance /var/lib/glance /home/glance \
&& cp -r /glance/etc/* /etc/glance/ \
&& chown -R glance: /etc/glance /var/lib/glance /home/glance
{% endif %}
COPY glance_sudoers /etc/sudoers.d/kolla_glance_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla glance \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_glance_sudoers \
&& touch /usr/local/bin/kolla_glance_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_glance_extend_start
{% block glance_base_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

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

View File

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

View File

@ -1,10 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}glance-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block glance_registry_header %}{% endblock %}
{% block glance_registry_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER glance

View File

@ -1,26 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}gnocchi-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block gnocchi_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set gnocchi_api_packages = [
'openstack-gnocchi-api',
'openstack-gnocchi-carbonara',
'openstack-gnocchi-indexer-sqlalchemy'
] %}
{% elif base_distro in ['ubuntu'] %}
{% set gnocchi_api_packages = ['gnocchi-api'] %}
{% endif %}
{{ macros.install_packages(gnocchi_api_packages | customizable("packages")) }}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_gnocchi_extend_start
RUN chmod 755 /usr/local/bin/kolla_gnocchi_extend_start
{% block gnocchi_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -1,18 +0,0 @@
#!/bin/bash
# NOTE(pbourke): httpd will not clean up after itself in some cases which
# results in the container not being able to restart. (bug #1489676, 1557036)
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
source /etc/apache2/envvars
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
fi
# 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
sudo -H -u gnocchi gnocchi-upgrade --create-legacy-resource-types --logfile /var/log/kolla/gnocchi/gnocchi-upgrade.log
exit 0
fi

View File

@ -1,83 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block gnocchi_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set gnocchi_base_packages = [
'openstack-gnocchi-common',
'python-gnocchiclient',
'httpd',
'mod_wsgi',
'python-ldappool',
'python-rados'
] %}
{{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
{% elif base_distro in ['ubuntu'] %}
{% set gnocchi_base_packages = [
'gnocchi-common',
'apache2',
'libapache2-mod-wsgi',
'python-ldappool',
'python-rados'
] %}
{{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }}
RUN truncate -s 0 /etc/apache2/ports.conf
{% endif %}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set gnocchi_base_packages = [
'httpd',
'mod_wsgi',
'python-ldappool',
'python-rados'
] %}
{{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }}
RUN mkdir -p /var/www/cgi-bin/gnocchi \
&& sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set gnocchi_base_packages = [
'apache2',
'libapache2-mod-wsgi',
'python-ldappool',
'python-rados'
] %}
{{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }}
RUN truncate -s 0 /etc/apache2/ports.conf
{% endif %}
ADD gnocchi-base-archive /gnocchi-base-source
RUN ln -s gnocchi-base-source/* gnocchi \
&& useradd --user-group gnocchi \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt gnocchiclient /gnocchi[keystone,mysql,file,ceph] \
&& mkdir -p /etc/gnocchi /var/log/kolla/gnocchi /home/gnocchi \
&& cp -r /gnocchi/etc/gnocchi/* /etc/gnocchi/ \
&& chown -R gnocchi: /etc/gnocchi /var/log/kolla/gnocchi
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
COPY gnocchi_sudoers /etc/sudoers.d/kolla_gnocchi_sudoers
RUN usermod -a -G kolla gnocchi \
&& mkdir -p /var/lib/gnocchi \
&& chown -R gnocchi: /var/lib/gnocchi \
&& chmod 750 /etc/sudoers.d \
&& chmod 640 /etc/sudoers.d/kolla_gnocchi_sudoers \
&& touch /usr/local/bin/kolla_gnocchi_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_gnocchi_extend_start
{% block gnocchi_base_footer %}{% endblock %}

Some files were not shown because too many files have changed in this diff Show More