diff --git a/docker/aodh/aodh-api/Dockerfile.j2 b/docker/aodh/aodh-api/Dockerfile.j2 deleted file mode 100644 index 370b772869..0000000000 --- a/docker/aodh/aodh-api/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/aodh/aodh-api/extend_start.sh b/docker/aodh/aodh-api/extend_start.sh deleted file mode 100644 index 0826a46452..0000000000 --- a/docker/aodh/aodh-api/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/aodh/aodh-base/Dockerfile.j2 b/docker/aodh/aodh-base/Dockerfile.j2 deleted file mode 100644 index 02949b5d96..0000000000 --- a/docker/aodh/aodh-base/Dockerfile.j2 +++ /dev/null @@ -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 %} diff --git a/docker/aodh/aodh-base/aodh_sudoers b/docker/aodh/aodh-base/aodh_sudoers deleted file mode 100644 index 2ec268c9dc..0000000000 --- a/docker/aodh/aodh-base/aodh_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R aodh\: /var/lib/aodh/, /bin/chown -R aodh\: /var/lib/aodh/ diff --git a/docker/aodh/aodh-base/extend_start.sh b/docker/aodh/aodh-base/extend_start.sh deleted file mode 100755 index f3b1d2d49c..0000000000 --- a/docker/aodh/aodh-base/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/aodh/aodh-evaluator/Dockerfile.j2 b/docker/aodh/aodh-evaluator/Dockerfile.j2 deleted file mode 100644 index 4fa319ce84..0000000000 --- a/docker/aodh/aodh-evaluator/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/aodh/aodh-expirer/Dockerfile.j2 b/docker/aodh/aodh-expirer/Dockerfile.j2 deleted file mode 100644 index c43af18c78..0000000000 --- a/docker/aodh/aodh-expirer/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/aodh/aodh-listener/Dockerfile.j2 b/docker/aodh/aodh-listener/Dockerfile.j2 deleted file mode 100644 index 45b41a3adb..0000000000 --- a/docker/aodh/aodh-listener/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/aodh/aodh-notifier/Dockerfile.j2 b/docker/aodh/aodh-notifier/Dockerfile.j2 deleted file mode 100644 index 7e1fbadc15..0000000000 --- a/docker/aodh/aodh-notifier/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/barbican/barbican-api/Dockerfile.j2 b/docker/barbican/barbican-api/Dockerfile.j2 deleted file mode 100644 index bc019d4466..0000000000 --- a/docker/barbican/barbican-api/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/barbican/barbican-api/extend_start.sh b/docker/barbican/barbican-api/extend_start.sh deleted file mode 100755 index c541d0343e..0000000000 --- a/docker/barbican/barbican-api/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/barbican/barbican-base/Dockerfile.j2 b/docker/barbican/barbican-base/Dockerfile.j2 deleted file mode 100644 index 5f44432bf3..0000000000 --- a/docker/barbican/barbican-base/Dockerfile.j2 +++ /dev/null @@ -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 %} diff --git a/docker/barbican/barbican-base/barbican_sudoers b/docker/barbican/barbican-base/barbican_sudoers deleted file mode 100644 index 26ae4710ea..0000000000 --- a/docker/barbican/barbican-base/barbican_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R barbican\: /var/lib/barbican/, /bin/chown -R barbican\: /var/lib/barbican/ diff --git a/docker/barbican/barbican-base/extend_start.sh b/docker/barbican/barbican-base/extend_start.sh deleted file mode 100755 index 16b41ad09c..0000000000 --- a/docker/barbican/barbican-base/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/barbican/barbican-keystone-listener/Dockerfile.j2 b/docker/barbican/barbican-keystone-listener/Dockerfile.j2 deleted file mode 100644 index 9319b3214d..0000000000 --- a/docker/barbican/barbican-keystone-listener/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/barbican/barbican-worker/Dockerfile.j2 b/docker/barbican/barbican-worker/Dockerfile.j2 deleted file mode 100644 index b0a9c63be4..0000000000 --- a/docker/barbican/barbican-worker/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/bifrost/bifrost-base/Dockerfile.j2 b/docker/bifrost/bifrost-base/Dockerfile.j2 deleted file mode 100644 index 2a79b0baa0..0000000000 --- a/docker/bifrost/bifrost-base/Dockerfile.j2 +++ /dev/null @@ -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 %} diff --git a/docker/bifrost/bifrost-base/bifrost_sudoers b/docker/bifrost/bifrost-base/bifrost_sudoers deleted file mode 100644 index 6c343a9561..0000000000 --- a/docker/bifrost/bifrost-base/bifrost_sudoers +++ /dev/null @@ -1 +0,0 @@ -bifrost ALL=(ALL) NOPASSWD:ALL diff --git a/docker/bifrost/bifrost-base/build_arg.yml b/docker/bifrost/bifrost-base/build_arg.yml deleted file mode 100644 index b1384f793d..0000000000 --- a/docker/bifrost/bifrost-base/build_arg.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -skip_bootstrap: true -skip_start: true -install_dib: true -create_image_via_dib: false diff --git a/docker/bifrost/bifrost-deploy/Dockerfile.j2 b/docker/bifrost/bifrost-deploy/Dockerfile.j2 deleted file mode 100644 index 3b5a54fb49..0000000000 --- a/docker/bifrost/bifrost-deploy/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/bifrost/bifrost-deploy/init-fake.conf b/docker/bifrost/bifrost-deploy/init-fake.conf deleted file mode 100644 index 00a8f8ccdc..0000000000 --- a/docker/bifrost/bifrost-deploy/init-fake.conf +++ /dev/null @@ -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 diff --git a/docker/ceilometer/ceilometer-api/Dockerfile.j2 b/docker/ceilometer/ceilometer-api/Dockerfile.j2 deleted file mode 100644 index dbe6c264ed..0000000000 --- a/docker/ceilometer/ceilometer-api/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/ceilometer/ceilometer-api/extend_start.sh b/docker/ceilometer/ceilometer-api/extend_start.sh deleted file mode 100644 index 1780742d04..0000000000 --- a/docker/ceilometer/ceilometer-api/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/ceilometer/ceilometer-base/Dockerfile.j2 b/docker/ceilometer/ceilometer-base/Dockerfile.j2 deleted file mode 100644 index ca64609ee0..0000000000 --- a/docker/ceilometer/ceilometer-base/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/ceilometer/ceilometer-base/ceilometer_sudoers b/docker/ceilometer/ceilometer-base/ceilometer_sudoers deleted file mode 100644 index dd861bb58c..0000000000 --- a/docker/ceilometer/ceilometer-base/ceilometer_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R ceilometer\: /var/lib/ceilometer/, /bin/chown -R ceilometer\: /var/lib/ceilometer/ diff --git a/docker/ceilometer/ceilometer-base/extend_start.sh b/docker/ceilometer/ceilometer-base/extend_start.sh deleted file mode 100644 index 4d3fe6b618..0000000000 --- a/docker/ceilometer/ceilometer-base/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/ceilometer/ceilometer-central/Dockerfile.j2 b/docker/ceilometer/ceilometer-central/Dockerfile.j2 deleted file mode 100644 index 3d3d4e9219..0000000000 --- a/docker/ceilometer/ceilometer-central/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/ceilometer/ceilometer-collector/Dockerfile.j2 b/docker/ceilometer/ceilometer-collector/Dockerfile.j2 deleted file mode 100644 index c2e67bbc55..0000000000 --- a/docker/ceilometer/ceilometer-collector/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/ceilometer/ceilometer-compute/Dockerfile.j2 b/docker/ceilometer/ceilometer-compute/Dockerfile.j2 deleted file mode 100644 index b60a539340..0000000000 --- a/docker/ceilometer/ceilometer-compute/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/ceilometer/ceilometer-notification/Dockerfile.j2 b/docker/ceilometer/ceilometer-notification/Dockerfile.j2 deleted file mode 100644 index 6d351391bd..0000000000 --- a/docker/ceilometer/ceilometer-notification/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/ceph/ceph-base/Dockerfile.j2 b/docker/ceph/ceph-base/Dockerfile.j2 deleted file mode 100644 index 7edc3ebdfe..0000000000 --- a/docker/ceph/ceph-base/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/ceph/ceph-base/extend_start.sh b/docker/ceph/ceph-base/extend_start.sh deleted file mode 100644 index 968be09809..0000000000 --- a/docker/ceph/ceph-base/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/ceph/ceph-mon/Dockerfile.j2 b/docker/ceph/ceph-mon/Dockerfile.j2 deleted file mode 100644 index 0627eff006..0000000000 --- a/docker/ceph/ceph-mon/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/ceph/ceph-mon/extend_start.sh b/docker/ceph/ceph-mon/extend_start.sh deleted file mode 100644 index 30ffba5fc4..0000000000 --- a/docker/ceph/ceph-mon/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/ceph/ceph-mon/fetch_ceph_keys.py b/docker/ceph/ceph-mon/fetch_ceph_keys.py deleted file mode 100644 index 3303bdf5c0..0000000000 --- a/docker/ceph/ceph-mon/fetch_ceph_keys.py +++ /dev/null @@ -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() diff --git a/docker/ceph/ceph-osd/Dockerfile.j2 b/docker/ceph/ceph-osd/Dockerfile.j2 deleted file mode 100644 index 3f38fd016d..0000000000 --- a/docker/ceph/ceph-osd/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/ceph/ceph-osd/extend_start.sh b/docker/ceph/ceph-osd/extend_start.sh deleted file mode 100644 index ee745d0af0..0000000000 --- a/docker/ceph/ceph-osd/extend_start.sh +++ /dev/null @@ -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" diff --git a/docker/ceph/ceph-rgw/Dockerfile.j2 b/docker/ceph/ceph-rgw/Dockerfile.j2 deleted file mode 100644 index 721bd8f05b..0000000000 --- a/docker/ceph/ceph-rgw/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/chrony/Dockerfile.j2 b/docker/chrony/Dockerfile.j2 deleted file mode 100644 index 8443bcc4e8..0000000000 --- a/docker/chrony/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/chrony/extend_start.sh b/docker/chrony/extend_start.sh deleted file mode 100644 index 80af48dba9..0000000000 --- a/docker/chrony/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 deleted file mode 100644 index fe343fea37..0000000000 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/cinder/cinder-api/extend_start.sh b/docker/cinder/cinder-api/extend_start.sh deleted file mode 100644 index 176515189d..0000000000 --- a/docker/cinder/cinder-api/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/cinder/cinder-backup/Dockerfile.j2 b/docker/cinder/cinder-backup/Dockerfile.j2 deleted file mode 100644 index 02a30c4933..0000000000 --- a/docker/cinder/cinder-backup/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/cinder/cinder-base/Dockerfile.j2 b/docker/cinder/cinder-base/Dockerfile.j2 deleted file mode 100644 index 8d59f54414..0000000000 --- a/docker/cinder/cinder-base/Dockerfile.j2 +++ /dev/null @@ -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 %} diff --git a/docker/cinder/cinder-base/cinder_sudoers b/docker/cinder/cinder-base/cinder_sudoers deleted file mode 100644 index 3750f31a0d..0000000000 --- a/docker/cinder/cinder-base/cinder_sudoers +++ /dev/null @@ -1 +0,0 @@ -cinder ALL = (root) NOPASSWD: /var/lib/kolla/venv/bin/cinder-rootwrap /etc/cinder/rootwrap.conf * diff --git a/docker/cinder/cinder-base/extend_start.sh b/docker/cinder/cinder-base/extend_start.sh deleted file mode 100644 index 21fae59364..0000000000 --- a/docker/cinder/cinder-base/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/cinder/cinder-scheduler/Dockerfile.j2 b/docker/cinder/cinder-scheduler/Dockerfile.j2 deleted file mode 100644 index b19cb83594..0000000000 --- a/docker/cinder/cinder-scheduler/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/cinder/cinder-volume/Dockerfile.j2 b/docker/cinder/cinder-volume/Dockerfile.j2 deleted file mode 100644 index ef90fcd91a..0000000000 --- a/docker/cinder/cinder-volume/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/cinder/cinder-volume/cinder_sudoers b/docker/cinder/cinder-volume/cinder_sudoers deleted file mode 100644 index f3bec8b134..0000000000 --- a/docker/cinder/cinder-volume/cinder_sudoers +++ /dev/null @@ -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 diff --git a/docker/cinder/cinder-volume/extend_start.sh b/docker/cinder/cinder-volume/extend_start.sh deleted file mode 100644 index 67e8661435..0000000000 --- a/docker/cinder/cinder-volume/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 b/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 deleted file mode 100644 index 897808b1da..0000000000 --- a/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/cloudkitty/cloudkitty-api/extend_start.sh b/docker/cloudkitty/cloudkitty-api/extend_start.sh deleted file mode 100644 index 26d4a8c36d..0000000000 --- a/docker/cloudkitty/cloudkitty-api/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 b/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 deleted file mode 100644 index ff01520d2d..0000000000 --- a/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 +++ /dev/null @@ -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 %} diff --git a/docker/cloudkitty/cloudkitty-base/extend_start.sh b/docker/cloudkitty/cloudkitty-base/extend_start.sh deleted file mode 100644 index cf49f9caf1..0000000000 --- a/docker/cloudkitty/cloudkitty-base/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 b/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 deleted file mode 100644 index 9d78b260f6..0000000000 --- a/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/collectd/Dockerfile.j2 b/docker/collectd/Dockerfile.j2 deleted file mode 100644 index ded2fa271d..0000000000 --- a/docker/collectd/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/collectd/extend_start.sh b/docker/collectd/extend_start.sh deleted file mode 100644 index 80ef63db34..0000000000 --- a/docker/collectd/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/congress/congress-api/Dockerfile.j2 b/docker/congress/congress-api/Dockerfile.j2 deleted file mode 100644 index 4a47d6b944..0000000000 --- a/docker/congress/congress-api/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/congress/congress-api/extend_start.sh b/docker/congress/congress-api/extend_start.sh deleted file mode 100644 index b18446d7f4..0000000000 --- a/docker/congress/congress-api/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/congress/congress-base/Dockerfile.j2 b/docker/congress/congress-base/Dockerfile.j2 deleted file mode 100644 index 01890efca6..0000000000 --- a/docker/congress/congress-base/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/congress/congress-base/extend_start.sh b/docker/congress/congress-base/extend_start.sh deleted file mode 100644 index 99e16e1bf0..0000000000 --- a/docker/congress/congress-base/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/congress/congress-datasource/Dockerfile.j2 b/docker/congress/congress-datasource/Dockerfile.j2 deleted file mode 100644 index f807ddb695..0000000000 --- a/docker/congress/congress-datasource/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/congress/congress-policy-engine/Dockerfile.j2 b/docker/congress/congress-policy-engine/Dockerfile.j2 deleted file mode 100644 index 88de855717..0000000000 --- a/docker/congress/congress-policy-engine/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/cron/Dockerfile.j2 b/docker/cron/Dockerfile.j2 deleted file mode 100644 index a2cf93ecd0..0000000000 --- a/docker/cron/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/cron/extend_start.sh b/docker/cron/extend_start.sh deleted file mode 100644 index 08efca96fa..0000000000 --- a/docker/cron/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/designate/designate-api/Dockerfile.j2 b/docker/designate/designate-api/Dockerfile.j2 deleted file mode 100644 index b664578261..0000000000 --- a/docker/designate/designate-api/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/designate/designate-backend-bind9/Dockerfile.j2 b/docker/designate/designate-backend-bind9/Dockerfile.j2 deleted file mode 100644 index 83aa68c73e..0000000000 --- a/docker/designate/designate-backend-bind9/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/designate/designate-base/Dockerfile.j2 b/docker/designate/designate-base/Dockerfile.j2 deleted file mode 100644 index 6cc36f639f..0000000000 --- a/docker/designate/designate-base/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/designate/designate-base/extend_start.sh b/docker/designate/designate-base/extend_start.sh deleted file mode 100644 index 66b376c301..0000000000 --- a/docker/designate/designate-base/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/designate/designate-central/Dockerfile.j2 b/docker/designate/designate-central/Dockerfile.j2 deleted file mode 100644 index 1edf5bd457..0000000000 --- a/docker/designate/designate-central/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/designate/designate-central/extend_start.sh b/docker/designate/designate-central/extend_start.sh deleted file mode 100644 index 50a31c737a..0000000000 --- a/docker/designate/designate-central/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/designate/designate-mdns/Dockerfile.j2 b/docker/designate/designate-mdns/Dockerfile.j2 deleted file mode 100644 index 6028bdef4f..0000000000 --- a/docker/designate/designate-mdns/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/designate/designate-pool-manager/Dockerfile.j2 b/docker/designate/designate-pool-manager/Dockerfile.j2 deleted file mode 100644 index 4b9ca6f26f..0000000000 --- a/docker/designate/designate-pool-manager/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/designate/designate-sink/Dockerfile.j2 b/docker/designate/designate-sink/Dockerfile.j2 deleted file mode 100644 index 6d2e6acd3f..0000000000 --- a/docker/designate/designate-sink/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/dind/Dockerfile.j2 b/docker/dind/Dockerfile.j2 deleted file mode 100644 index d0389dc785..0000000000 --- a/docker/dind/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/dind/start.sh b/docker/dind/start.sh deleted file mode 100644 index 8d861f7441..0000000000 --- a/docker/dind/start.sh +++ /dev/null @@ -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 diff --git a/docker/elasticsearch/Dockerfile.j2 b/docker/elasticsearch/Dockerfile.j2 deleted file mode 100644 index 7b24f330e3..0000000000 --- a/docker/elasticsearch/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/elasticsearch/elasticsearch_sudoers b/docker/elasticsearch/elasticsearch_sudoers deleted file mode 100644 index 76396c68a7..0000000000 --- a/docker/elasticsearch/elasticsearch_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /bin/chown elasticsearch\: /var/lib/elasticsearch/data, /usr/bin/chown elasticsearch\: /var/lib/elasticsearch/data diff --git a/docker/elasticsearch/extend_start.sh b/docker/elasticsearch/extend_start.sh deleted file mode 100644 index 97067b7df9..0000000000 --- a/docker/elasticsearch/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/etcd/Dockerfile.j2 b/docker/etcd/Dockerfile.j2 deleted file mode 100644 index ca59c5a062..0000000000 --- a/docker/etcd/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/etcd/etcd_sudoers b/docker/etcd/etcd_sudoers deleted file mode 100644 index d3e244be05..0000000000 --- a/docker/etcd/etcd_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown etcd\: /var/lib/etcd/, /bin/chown etcd\: /var/lib/etcd/ diff --git a/docker/etcd/extend_start.sh b/docker/etcd/extend_start.sh deleted file mode 100644 index 718de9ebbd..0000000000 --- a/docker/etcd/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/fluentd/Dockerfile.j2 b/docker/fluentd/Dockerfile.j2 deleted file mode 100644 index 81586925c8..0000000000 --- a/docker/fluentd/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/fluentd/extend_start.sh b/docker/fluentd/extend_start.sh deleted file mode 100644 index bcdbed09df..0000000000 --- a/docker/fluentd/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/fluentd/fluentd_sudoers b/docker/fluentd/fluentd_sudoers deleted file mode 100644 index 0111a26c48..0000000000 --- a/docker/fluentd/fluentd_sudoers +++ /dev/null @@ -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 diff --git a/docker/fluentd/td.repo b/docker/fluentd/td.repo deleted file mode 100644 index abecf7e2c2..0000000000 --- a/docker/fluentd/td.repo +++ /dev/null @@ -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 diff --git a/docker/freezer/freezer-api/Dockerfile.j2 b/docker/freezer/freezer-api/Dockerfile.j2 deleted file mode 100644 index 5596f550f6..0000000000 --- a/docker/freezer/freezer-api/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/freezer/freezer-api/extend_start.sh b/docker/freezer/freezer-api/extend_start.sh deleted file mode 100755 index d12b6b7d45..0000000000 --- a/docker/freezer/freezer-api/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/freezer/freezer-base/Dockerfile.j2 b/docker/freezer/freezer-base/Dockerfile.j2 deleted file mode 100644 index b4d42d24a6..0000000000 --- a/docker/freezer/freezer-base/Dockerfile.j2 +++ /dev/null @@ -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 %} diff --git a/docker/freezer/freezer-base/extend_start.sh b/docker/freezer/freezer-base/extend_start.sh deleted file mode 100755 index 44a641dd72..0000000000 --- a/docker/freezer/freezer-base/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/freezer/freezer-base/freezer_sudoers b/docker/freezer/freezer-base/freezer_sudoers deleted file mode 100644 index 8185fa5071..0000000000 --- a/docker/freezer/freezer-base/freezer_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R freezer\: /var/lib/freezer/, /bin/chown -R freezer\: /var/lib/freezer/ diff --git a/docker/glance/glance-api/Dockerfile.j2 b/docker/glance/glance-api/Dockerfile.j2 deleted file mode 100644 index 51693533d8..0000000000 --- a/docker/glance/glance-api/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/glance/glance-api/extend_start.sh b/docker/glance/glance-api/extend_start.sh deleted file mode 100644 index be4b839611..0000000000 --- a/docker/glance/glance-api/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/glance/glance-base/Dockerfile.j2 b/docker/glance/glance-base/Dockerfile.j2 deleted file mode 100644 index 95983f45cc..0000000000 --- a/docker/glance/glance-base/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/glance/glance-base/extend_start.sh b/docker/glance/glance-base/extend_start.sh deleted file mode 100644 index 4f5f5ecafa..0000000000 --- a/docker/glance/glance-base/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/glance/glance-base/glance_sudoers b/docker/glance/glance-base/glance_sudoers deleted file mode 100644 index ffb536abf5..0000000000 --- a/docker/glance/glance-base/glance_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R glance\: /var/lib/glance/, /bin/chown -R glance\: /var/lib/glance/ diff --git a/docker/glance/glance-registry/Dockerfile.j2 b/docker/glance/glance-registry/Dockerfile.j2 deleted file mode 100644 index 2f214f8533..0000000000 --- a/docker/glance/glance-registry/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/docker/gnocchi/gnocchi-api/Dockerfile.j2 b/docker/gnocchi/gnocchi-api/Dockerfile.j2 deleted file mode 100644 index edee1bc7f3..0000000000 --- a/docker/gnocchi/gnocchi-api/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/gnocchi/gnocchi-api/extend_start.sh b/docker/gnocchi/gnocchi-api/extend_start.sh deleted file mode 100644 index 9b751c7755..0000000000 --- a/docker/gnocchi/gnocchi-api/extend_start.sh +++ /dev/null @@ -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 diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/docker/gnocchi/gnocchi-base/Dockerfile.j2 deleted file mode 100644 index 0dcc85fa72..0000000000 --- a/docker/gnocchi/gnocchi-base/Dockerfile.j2 +++ /dev/null @@ -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 %} diff --git a/docker/gnocchi/gnocchi-base/extend_start.sh b/docker/gnocchi/gnocchi-base/extend_start.sh deleted file mode 100644 index adc05b1b31..0000000000 --- a/docker/gnocchi/gnocchi-base/extend_start.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# Create log dir for Gnocchi logs -GNOCCHI_LOG_DIR="/var/log/kolla/gnocchi" -if [[ ! -d "${GNOCCHI_LOG_DIR}" ]]; then - mkdir -p ${GNOCCHI_LOG_DIR} -fi -if [[ $(stat -c %U:%G ${GNOCCHI_LOG_DIR}) != "gnocchi:kolla" ]]; then - chown gnocchi:kolla ${GNOCCHI_LOG_DIR} -fi -if [[ $(stat -c %a ${GNOCCHI_LOG_DIR}) != "755" ]]; then - chmod 755 ${GNOCCHI_LOG_DIR} -fi - -. /usr/local/bin/kolla_gnocchi_extend_start diff --git a/docker/gnocchi/gnocchi-base/gnocchi_sudoers b/docker/gnocchi/gnocchi-base/gnocchi_sudoers deleted file mode 100644 index c2a01d7098..0000000000 --- a/docker/gnocchi/gnocchi-base/gnocchi_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R gnocchi\: /var/lib/gnocchi/, /bin/chown -R gnocchi\: /var/lib/gnocchi/ diff --git a/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 b/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 deleted file mode 100644 index 7ef3955ce9..0000000000 --- a/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 +++ /dev/null @@ -1,22 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}gnocchi-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block gnocchi_metricd_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set gnocchi_metricd_packages = ['openstack-gnocchi-metricd'] %} - {% elif base_distro in ['ubuntu'] %} - {% set gnocchi_metricd_packages = ['gnocchi-metricd'] %} - {% endif %} -{{ macros.install_packages(gnocchi_metricd_packages | customizable("packages")) }} - -{% endif %} -{% block gnocchi_metricd_footer %}{% endblock %} -{% block footer %}{% endblock %} - -{{ include_footer }} - -USER gnocchi diff --git a/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 b/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 deleted file mode 100644 index 20ab2135b6..0000000000 --- a/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}gnocchi-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block gnocchi_statsd_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set gnocchi_statsd_packages = ['openstack-gnocchi-statsd'] %} - {% endif %} -{{ macros.install_packages(gnocchi_statsd_packages | customizable("packages")) }} - -{% endif %} -{% block gnocchi_statsd_footer %}{% endblock %} -{% block footer %}{% endblock %} - -{{ include_footer }} - -USER gnocchi diff --git a/docker/grafana/Dockerfile.j2 b/docker/grafana/Dockerfile.j2 deleted file mode 100644 index ba54e144c8..0000000000 --- a/docker/grafana/Dockerfile.j2 +++ /dev/null @@ -1,25 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block grafana_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% set grafana_packages = ['grafana'] %} -{{ macros.install_packages(grafana_packages | customizable("packages")) }} - -WORKDIR /usr/share/grafana - -COPY grafana_sudoers /etc/sudoers.d/kolla_grafana_sudoers -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN grafana-cli plugins install sileht-gnocchi-datasource \ - && chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_grafana_sudoers \ - && usermod -a -G kolla grafana - -{% block grafana_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER grafana diff --git a/docker/grafana/extend_start.sh b/docker/grafana/extend_start.sh deleted file mode 100644 index 5ed4dc56d7..0000000000 --- a/docker/grafana/extend_start.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/grafana" ]]; then - mkdir -p /var/log/kolla/grafana -fi -if [[ $(stat -c %a /var/log/kolla/grafana) != "755" ]]; then - chmod 755 /var/log/kolla/grafana -fi diff --git a/docker/grafana/grafana_sudoers b/docker/grafana/grafana_sudoers deleted file mode 100644 index 386829969a..0000000000 --- a/docker/grafana/grafana_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R grafana\: /var/lib/grafana/, /bin/chown -R grafana\: /var/lib/grafana/ diff --git a/docker/haproxy/Dockerfile.j2 b/docker/haproxy/Dockerfile.j2 deleted file mode 100644 index db21b55fd2..0000000000 --- a/docker/haproxy/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block haproxy_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% set haproxy_packages = ['haproxy'] %} -{{ macros.install_packages(haproxy_packages | customizable("packages")) }} - -RUN usermod -a -G kolla haproxy \ - && mkdir -p /var/lib/kolla/haproxy \ - && chown -R haproxy: /var/lib /run - -COPY ensure_latest_config.sh /usr/local/bin/kolla_ensure_haproxy_latest_config -RUN chmod 755 /usr/local/bin/kolla_ensure_haproxy_latest_config - -{% block haproxy_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/haproxy/ensure_latest_config.sh b/docker/haproxy/ensure_latest_config.sh deleted file mode 100644 index 4b84f3aedb..0000000000 --- a/docker/haproxy/ensure_latest_config.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -o errexit - -CURRENT_CONFIG_HASH=$(sha1sum /etc/haproxy/haproxy.cfg | cut -f1 -d' ') -NEW_CONFIG_HASH=$(sha1sum /var/lib/kolla/config_files/haproxy.cfg | cut -f1 -d' ') - -if [[ $CURRENT_CONFIG_HASH != $NEW_CONFIG_HASH ]]; then - changed=changed - python /usr/local/bin/kolla_set_configs - kill -USR2 $(pgrep -f /usr/sbin/haproxy-systemd-wrapper) -fi - -echo $changed diff --git a/docker/heat/heat-api-cfn/Dockerfile.j2 b/docker/heat/heat-api-cfn/Dockerfile.j2 deleted file mode 100644 index 0654edbfa0..0000000000 --- a/docker/heat/heat-api-cfn/Dockerfile.j2 +++ /dev/null @@ -1,21 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}heat-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block heat_api_cfn_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set heat_api_cfn_packages = ['openstack-heat-api-cfn'] %} - {% elif base_distro in ['ubuntu'] %} - {% set heat_api_cfn_packages = ['heat-api-cfn'] %} - {% endif %} -{{ macros.install_packages(heat_api_cfn_packages | customizable("packages")) }} -{% endif %} - -{% block heat_api_cfn_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER heat diff --git a/docker/heat/heat-api/Dockerfile.j2 b/docker/heat/heat-api/Dockerfile.j2 deleted file mode 100644 index d7486cc7b8..0000000000 --- a/docker/heat/heat-api/Dockerfile.j2 +++ /dev/null @@ -1,24 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}heat-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block heat_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set heat_api_packages = ['openstack-heat-api'] %} - {% elif base_distro in ['ubuntu'] %} - {% set heat_api_packages = ['heat-api'] %} - {% endif %} -{{ macros.install_packages(heat_api_packages | customizable("packages")) }} -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_heat_extend_start -RUN chmod 755 /usr/local/bin/kolla_heat_extend_start - -{% block heat_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER heat diff --git a/docker/heat/heat-api/extend_start.sh b/docker/heat/heat-api/extend_start.sh deleted file mode 100644 index be87c09235..0000000000 --- a/docker/heat/heat-api/extend_start.sh +++ /dev/null @@ -1,15 +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 - heat-manage db_sync - CURRENT_HEAT_DOMAIN_NAME=$(openstack domain list | grep heat | awk '{print $4}') - - if [[ "heat_user_domain" != "$CURRENT_HEAT_DOMAIN_NAME" ]]; then - openstack domain create heat_user_domain - openstack user create --domain heat_user_domain heat_domain_admin --password ${HEAT_DOMAIN_ADMIN_PASSWORD} - openstack role add --domain heat_user_domain --user-domain heat_user_domain --user heat_domain_admin admin - fi - exit 0 -fi diff --git a/docker/heat/heat-base/Dockerfile.j2 b/docker/heat/heat-base/Dockerfile.j2 deleted file mode 100644 index d936318bd5..0000000000 --- a/docker/heat/heat-base/Dockerfile.j2 +++ /dev/null @@ -1,36 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block heat_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set heat_base_packages = ['openstack-heat-common'] %} -{% elif base_distro in ['ubuntu'] %} - {% set heat_base_packages = ['heat-common'] %} -{% endif %} -{{ macros.install_packages(heat_base_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD heat-base-archive /heat-base-source -RUN ln -s heat-base-source/* heat \ - && useradd --user-group heat \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /heat \ - && mkdir -p /etc/heat /home/heat \ - && cp -r /heat/etc/heat/* /etc/heat/ \ - && chown -R heat: /etc/heat /home/heat - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla heat \ - && touch /usr/local/bin/kolla_heat_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_heat_extend_start - -{% block heat_base_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/heat/heat-base/extend_start.sh b/docker/heat/heat-base/extend_start.sh deleted file mode 100644 index a73f17345f..0000000000 --- a/docker/heat/heat-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/heat" ]]; then - mkdir -p /var/log/kolla/heat -fi -if [[ $(stat -c %a /var/log/kolla/heat) != "755" ]]; then - chmod 755 /var/log/kolla/heat -fi - -. /usr/local/bin/kolla_heat_extend_start diff --git a/docker/heat/heat-engine/Dockerfile.j2 b/docker/heat/heat-engine/Dockerfile.j2 deleted file mode 100644 index 48b600695f..0000000000 --- a/docker/heat/heat-engine/Dockerfile.j2 +++ /dev/null @@ -1,26 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}heat-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block heat_engine_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set heat_engine_packages = [ - 'python-barbicanclient', - 'python-zaqarclient', - 'openstack-heat-engine' - ] %} - {% elif base_distro in ['ubuntu'] %} - {% set heat_engine_packages = ['heat-engine'] %} - {% endif %} -{{ macros.install_packages(heat_engine_packages | customizable("packages")) }} - -{% endif %} -{% block heat_engine_footer %}{% endblock %} -{% block footer %}{% endblock %} - -{{ include_footer }} - -USER heat diff --git a/docker/heka/Dockerfile.j2 b/docker/heka/Dockerfile.j2 deleted file mode 100644 index 142bd2e0ea..0000000000 --- a/docker/heka/Dockerfile.j2 +++ /dev/null @@ -1,39 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block heka_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set heka_packages = [ - 'https://github.com/mozilla-services/heka/releases/download/v0.10.0/heka-0_10_0-linux-amd64.rpm' - ] %} -RUN useradd --user-group heka \ - && mkdir /etc/heka - -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set heka_packages = [ - 'https://github.com/mozilla-services/heka/releases/download/v0.10.0/heka_0.10.0_amd64.deb' - ] %} -{% endif %} - -{{ macros.install_packages(heka_packages | customizable("packages")) }} - -COPY plugins/modules /usr/share/heka/lua_modules/ -COPY plugins/decoders /usr/share/heka/lua_decoders/ -COPY plugins/encoders /usr/share/heka/lua_encoders/ - -COPY heka_sudoers /etc/sudoers.d/kolla_heka_sudoers -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla heka \ - && chmod 440 /etc/sudoers.d/kolla_heka_sudoers \ - && chmod 755 /usr/local/bin/kolla_extend_start \ - && chown -R heka: /usr/share/heka /etc/heka - -{% block heka_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER heka diff --git a/docker/heka/extend_start.sh b/docker/heka/extend_start.sh deleted file mode 100644 index 6e0b2b68c2..0000000000 --- a/docker/heka/extend_start.sh +++ /dev/null @@ -1,37 +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) != "heka:kolla" ]]; then - sudo chown heka:kolla /var/log/kolla -fi -if [[ $(stat -c %a /var/log/kolla) != "2775" ]]; then - sudo chmod 2775 /var/log/kolla -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 - exit 0 -fi - -# /var/cache/hekad is what the Heka daemon will use for persistent storage -# through process restarts, so make "heka" the user of that directory. -if [[ $(stat -c %U:%G /var/cache/hekad) != "heka:heka" ]]; then - sudo chown heka: /var/cache/hekad -fi - -# Give hekad the permission to create the "log" Unix socket file in the -# /var/lib/kolla/heka directory. -if [[ $(stat -c %U:%G /var/lib/kolla/heka) != "heka:kolla" ]]; then - sudo chown heka:kolla /var/lib/kolla/heka -fi - -# The Heka daemon will create the /var/lib/kolla/heka/log Unix socket file, so -# make sure it's not present or the Heka daemon will fail when starting. -if [[ -e "/var/lib/kolla/heka/log" ]]; then - rm -rf /var/lib/kolla/heka/log -fi diff --git a/docker/heka/heka_sudoers b/docker/heka/heka_sudoers deleted file mode 100644 index b42b22e752..0000000000 --- a/docker/heka/heka_sudoers +++ /dev/null @@ -1,4 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /bin/chown heka\:kolla /var/log/kolla, /usr/bin/chown heka\:kolla /var/log/kolla -%kolla ALL=(root) NOPASSWD: /bin/chmod 2775 /var/log/kolla, /usr/bin/chmod 2775 /var/log/kolla -%kolla ALL=(root) NOPASSWD: /bin/chown heka\: /var/cache/hekad, /usr/bin/chown heka\: /var/cache/hekad -%kolla ALL=(root) NOPASSWD: /bin/chown heka\:kolla /var/lib/kolla/heka, /usr/bin/chown heka\:kolla /var/lib/kolla/heka diff --git a/docker/heka/plugins/decoders/os_ceilometer_apache_log.lua b/docker/heka/plugins/decoders/os_ceilometer_apache_log.lua deleted file mode 100644 index bf9322c678..0000000000 --- a/docker/heka/plugins/decoders/os_ceilometer_apache_log.lua +++ /dev/null @@ -1,72 +0,0 @@ --- Copyright 2015 Mirantis, Inc. --- --- 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. - -local l = require 'lpeg' -l.locale(l) - -local common_log_format = require 'common_log_format' -local patt = require 'os_patterns' -local utils = require 'os_utils' - -local msg = { - Timestamp = nil, - Type = 'log', - Hostname = nil, - Payload = nil, - Pid = nil, - Fields = nil, - Severity = 6, -} - -local severity_label = utils.severity_to_label_map[msg.Severity] - -local apache_log_pattern = read_config("apache_log_pattern") or error( - "apache_log_pattern configuration must be specificed") -local apache_grammar = common_log_format.build_apache_grammar(apache_log_pattern) -local request_grammar = l.Ct(patt.http_request) - -function process_message () - - -- logger is either "ceilometer-apache-public" or "ceilometer-apache-admin" - local logger = read_message("Logger") - - local log = read_message("Payload") - - local m - - m = apache_grammar:match(log) - if m then - msg.Logger = 'openstack.ceilometer' - msg.Payload = log - msg.Timestamp = m.time - - msg.Fields = {} - msg.Fields.http_status = m.status - msg.Fields.http_response_time = m.request_time.value / 1e6 -- us to sec - msg.Fields.programname = logger - msg.Fields.severity_label = severity_label - - local request = m.request - m = request_grammar:match(request) - if m then - msg.Fields.http_method = m.http_method - msg.Fields.http_url = m.http_url - msg.Fields.http_version = m.http_version - end - - return utils.safe_inject_message(msg) - end - - return -1, string.format("Failed to parse %s log: %s", logger, string.sub(log, 1, 64)) -end diff --git a/docker/heka/plugins/decoders/os_grafana_log.lua b/docker/heka/plugins/decoders/os_grafana_log.lua deleted file mode 100644 index 794145d6b3..0000000000 --- a/docker/heka/plugins/decoders/os_grafana_log.lua +++ /dev/null @@ -1,72 +0,0 @@ --- Copyright 2015-2016 Mirantis, Inc. --- --- 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. -local dt = require "date_time" -local l = require 'lpeg' -l.locale(l) - -local patt = require 'os_patterns' -local utils = require 'os_utils' - -local msg = { - Timestamp = nil, - Type = 'log', - Hostname = nil, - Payload = nil, - Pid = nil, - Fields = nil, - Severity = nil, -} - --- Grafana message logs are formatted like this: --- =ERROR REPORT==== 2-Jan-2015::09:17:22 === --- Blabla --- Blabla --- -local message = l.Cg(patt.Message / utils.chomp, "Message") --- The token before 'REPORT' isn't standardized so it can be a valid severity --- level as 'INFO' or 'ERROR' but also 'CRASH' or 'SUPERVISOR'. -local severity = l.Cg(l.R"AZ"^1, "SeverityLabel") -local day = l.R"13" * l.R"09" + l.R"19" -local datetime = l.Cg(day, "day") * patt.dash * dt.date_mabbr * patt.dash * dt.date_fullyear * - "::" * dt.rfc3339_partial_time -local timestamp = l.Cg(l.Ct(datetime)/ dt.time_to_ns, "Timestamp") - -local grammar = l.Ct("=" * severity * " REPORT==== " * timestamp * " ===" * l.P'\n' * message) - -function process_message () - local log = read_message("Payload") - - local m = grammar:match(log) - if not m then - return -1 - end - - msg.Timestamp = m.Timestamp - msg.Payload = m.Message - msg.Logger = read_message("Logger") - - if utils.label_to_severity_map[m.SeverityLabel] then - msg.Severity = utils.label_to_severity_map[m.SeverityLabel] - elseif m.SeverityLabel == 'CRASH' then - msg.Severity = 2 -- CRITICAL - else - msg.Severity = 5 -- NOTICE - end - - msg.Fields = {} - msg.Fields.severity_label = utils.severity_to_label_map[msg.Severity] - msg.Fields.programname = 'grafana' - - return utils.safe_inject_message(msg) -end diff --git a/docker/heka/plugins/decoders/os_horizon_apache_log.lua b/docker/heka/plugins/decoders/os_horizon_apache_log.lua deleted file mode 100644 index e9421d0aa3..0000000000 --- a/docker/heka/plugins/decoders/os_horizon_apache_log.lua +++ /dev/null @@ -1,72 +0,0 @@ --- Copyright 2015 Mirantis, Inc. --- --- 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. - -local l = require 'lpeg' -l.locale(l) - -local common_log_format = require 'common_log_format' -local patt = require 'os_patterns' -local utils = require 'os_utils' - -local msg = { - Timestamp = nil, - Type = 'log', - Hostname = nil, - Payload = nil, - Pid = nil, - Fields = nil, - Severity = 6, -} - -local severity_label = utils.severity_to_label_map[msg.Severity] - -local apache_log_pattern = read_config("apache_log_pattern") or error( - "apache_log_pattern configuration must be specificed") -local apache_grammar = common_log_format.build_apache_grammar(apache_log_pattern) -local request_grammar = l.Ct(patt.http_request) - -function process_message () - - -- logger is either "horizon-apache-public" or "horizon-apache-admin" - local logger = read_message("Logger") - - local log = read_message("Payload") - - local m - - m = apache_grammar:match(log) - if m then - msg.Logger = 'openstack.horizon' - msg.Payload = log - msg.Timestamp = m.time - - msg.Fields = {} - msg.Fields.http_status = m.status - msg.Fields.http_response_time = m.request_time.value / 1e6 -- us to sec - msg.Fields.programname = logger - msg.Fields.severity_label = severity_label - - local request = m.request - m = request_grammar:match(request) - if m then - msg.Fields.http_method = m.http_method - msg.Fields.http_url = m.http_url - msg.Fields.http_version = m.http_version - end - - return utils.safe_inject_message(msg) - end - - return -1, string.format("Failed to parse %s log: %s", logger, string.sub(log, 1, 64)) -end diff --git a/docker/heka/plugins/decoders/os_keystone_apache_log.lua b/docker/heka/plugins/decoders/os_keystone_apache_log.lua deleted file mode 100644 index 8136ec052b..0000000000 --- a/docker/heka/plugins/decoders/os_keystone_apache_log.lua +++ /dev/null @@ -1,72 +0,0 @@ --- Copyright 2015 Mirantis, Inc. --- --- 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. - -local l = require 'lpeg' -l.locale(l) - -local common_log_format = require 'common_log_format' -local patt = require 'os_patterns' -local utils = require 'os_utils' - -local msg = { - Timestamp = nil, - Type = 'log', - Hostname = nil, - Payload = nil, - Pid = nil, - Fields = nil, - Severity = 6, -} - -local severity_label = utils.severity_to_label_map[msg.Severity] - -local apache_log_pattern = read_config("apache_log_pattern") or error( - "apache_log_pattern configuration must be specificed") -local apache_grammar = common_log_format.build_apache_grammar(apache_log_pattern) -local request_grammar = l.Ct(patt.http_request) - -function process_message () - - -- logger is either "keystone-apache-public" or "keystone-apache-admin" - local logger = read_message("Logger") - - local log = read_message("Payload") - - local m - - m = apache_grammar:match(log) - if m then - msg.Logger = 'openstack.keystone' - msg.Payload = log - msg.Timestamp = m.time - - msg.Fields = {} - msg.Fields.http_status = m.status - msg.Fields.http_response_time = m.request_time.value / 1e6 -- us to sec - msg.Fields.programname = logger - msg.Fields.severity_label = severity_label - - local request = m.request - m = request_grammar:match(request) - if m then - msg.Fields.http_method = m.http_method - msg.Fields.http_url = m.http_url - msg.Fields.http_version = m.http_version - end - - return utils.safe_inject_message(msg) - end - - return -1, string.format("Failed to parse %s log: %s", logger, string.sub(log, 1, 64)) -end diff --git a/docker/heka/plugins/decoders/os_mysql_log.lua b/docker/heka/plugins/decoders/os_mysql_log.lua deleted file mode 100644 index b5869d1889..0000000000 --- a/docker/heka/plugins/decoders/os_mysql_log.lua +++ /dev/null @@ -1,50 +0,0 @@ --- Copyright 2015-2016 Mirantis, Inc. --- --- 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. -require "string" -local l = require 'lpeg' -l.locale(l) - -local patt = require 'os_patterns' -local utils = require 'os_utils' - -local msg = { - Timestamp = nil, - Type = 'log', - Hostname = nil, - Payload = nil, - Pid = nil, - Fields = {}, - Severity = nil, -} - -local sp = patt.sp -local colon = patt.colon - --- mysqld logs are cranky,the date is YYMMMDD, the hours have no leading zero and the "real" severity level is enclosed by square brackets... -local mysql_grammar = l.Ct(l.digit^-6 * sp^1 * l.digit^-2 * colon * l.digit^-2 * colon * l.digit^-2 * sp^1 * l.P"[" * l.Cg(l.R("az", "AZ")^0 / string.upper, "SeverityLabel") * l.P"]" * sp^1 * l.Cg(patt.Message, "Message")) - - -function process_message () - local log = read_message("Payload") - local logger = read_message("Logger") - - local m = mysql_grammar:match(log) - if not m then return -1 end - - msg.Logger = logger - msg.Payload = m.Message - msg.Fields.severity_label = m.SeverityLabel - - return utils.safe_inject_message(msg) -end diff --git a/docker/heka/plugins/decoders/os_openstack_log.lua b/docker/heka/plugins/decoders/os_openstack_log.lua deleted file mode 100644 index d8f4446ee4..0000000000 --- a/docker/heka/plugins/decoders/os_openstack_log.lua +++ /dev/null @@ -1,140 +0,0 @@ --- Copyright 2015-2016 Mirantis, Inc. --- --- 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. -require "string" -require "table" -local l = require 'lpeg' -l.locale(l) - -local patt = require 'os_patterns' -local utils = require 'os_utils' - -local msg = { - Timestamp = nil, - Type = 'log', - Hostname = nil, - Payload = nil, - Pid = nil, - Fields = nil, - Severity = nil, -} - --- traceback_lines is a reference to a table used to accumulate lines of --- a Traceback. traceback_key represent the key of the Traceback lines --- being accumulated in traceback_lines. This is used to know when to --- stop accumulating and inject the Heka message. -local traceback_key = nil -local traceback_lines = nil - -function prepare_message (service, timestamp, pid, severity_label, - python_module, programname, payload) - msg.Logger = 'openstack.' .. service - msg.Timestamp = timestamp - msg.Payload = payload - msg.Pid = pid - msg.Severity = utils.label_to_severity_map[severity_label] or 7 - msg.Fields = {} - msg.Fields.severity_label = severity_label - msg.Fields.python_module = python_module - msg.Fields.programname = programname - msg.Payload = payload -end - --- OpenStack log messages are of this form: --- 2015-11-30 08:38:59.306 3434 INFO oslo_service.periodic_task [-] Blabla... --- --- [-] is the "request" part, it can take multiple forms. - -function process_message () - - -- Logger is of form "_" (e.g. "nova_nova-api", - -- "neutron_l3-agent"). - local logger = read_message("Logger") - local service, program = string.match(logger, '([^_]+)_(.+)') - - local log = read_message("Payload") - local m - - m = patt.openstack:match(log) - if not m then - return -1, string.format("Failed to parse %s log: %s", logger, string.sub(log, 1, 64)) - end - - local key = { - Timestamp = m.Timestamp, - Pid = m.Pid, - SeverityLabel = m.SeverityLabel, - PythonModule = m.PythonModule, - service = service, - program = program, - } - - if traceback_key ~= nil then - -- If traceback_key is not nil then it means we've started accumulated - -- lines of a Python traceback. We keep accumulating the traceback - -- lines util we get a different log key. - if utils.table_equal(traceback_key, key) then - table.insert(traceback_lines, m.Message) - return 0 - else - prepare_message(traceback_key.service, traceback_key.Timestamp, - traceback_key.Pid, traceback_key.SeverityLabel, - traceback_key.PythonModule, traceback_key.program, - table.concat(traceback_lines, '')) - traceback_key = nil - traceback_lines = nil - -- Ignore safe_inject_message status code here to still get a - -- chance to inject the current log message. - utils.safe_inject_message(msg) - end - end - - if patt.traceback:match(m.Message) then - -- Python traceback detected, begin accumulating the lines making - -- up the traceback. - traceback_key = key - traceback_lines = {} - table.insert(traceback_lines, m.Message) - return 0 - end - - prepare_message(service, m.Timestamp, m.Pid, m.SeverityLabel, m.PythonModule, - program, m.Message) - - m = patt.openstack_request_context:match(msg.Payload) - if m then - msg.Fields.request_id = m.RequestId - if m.UserId then - msg.Fields.user_id = m.UserId - end - if m.TenantId then - msg.Fields.tenant_id = m.TenantId - end - end - - m = patt.openstack_http:match(msg.Payload) - if m then - msg.Fields.http_method = m.http_method - msg.Fields.http_status = m.http_status - msg.Fields.http_url = m.http_url - msg.Fields.http_version = m.http_version - msg.Fields.http_response_size = m.http_response_size - msg.Fields.http_response_time = m.http_response_time - m = patt.ip_address:match(msg.Payload) - if m then - msg.Fields.http_client_ip_address = m.ip_address - end - end - - return utils.safe_inject_message(msg) -end diff --git a/docker/heka/plugins/decoders/os_rabbitmq_log.lua b/docker/heka/plugins/decoders/os_rabbitmq_log.lua deleted file mode 100644 index 5ce6c65fcb..0000000000 --- a/docker/heka/plugins/decoders/os_rabbitmq_log.lua +++ /dev/null @@ -1,72 +0,0 @@ --- Copyright 2015-2016 Mirantis, Inc. --- --- 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. -local dt = require "date_time" -local l = require 'lpeg' -l.locale(l) - -local patt = require 'os_patterns' -local utils = require 'os_utils' - -local msg = { - Timestamp = nil, - Type = 'log', - Hostname = nil, - Payload = nil, - Pid = nil, - Fields = nil, - Severity = nil, -} - --- RabbitMQ message logs are formatted like this: --- =ERROR REPORT==== 2-Jan-2015::09:17:22 === --- Blabla --- Blabla --- -local message = l.Cg(patt.Message / utils.chomp, "Message") --- The token before 'REPORT' isn't standardized so it can be a valid severity --- level as 'INFO' or 'ERROR' but also 'CRASH' or 'SUPERVISOR'. -local severity = l.Cg(l.R"AZ"^1, "SeverityLabel") -local day = l.R"13" * l.R"09" + l.R"19" -local datetime = l.Cg(day, "day") * patt.dash * dt.date_mabbr * patt.dash * dt.date_fullyear * - "::" * dt.rfc3339_partial_time -local timestamp = l.Cg(l.Ct(datetime)/ dt.time_to_ns, "Timestamp") - -local grammar = l.Ct("=" * severity * " REPORT==== " * timestamp * " ===" * l.P'\n' * message) - -function process_message () - local log = read_message("Payload") - - local m = grammar:match(log) - if not m then - return -1 - end - - msg.Timestamp = m.Timestamp - msg.Payload = m.Message - msg.Logger = read_message("Logger") - - if utils.label_to_severity_map[m.SeverityLabel] then - msg.Severity = utils.label_to_severity_map[m.SeverityLabel] - elseif m.SeverityLabel == 'CRASH' then - msg.Severity = 2 -- CRITICAL - else - msg.Severity = 5 -- NOTICE - end - - msg.Fields = {} - msg.Fields.severity_label = utils.severity_to_label_map[msg.Severity] - msg.Fields.programname = 'rabbitmq' - - return utils.safe_inject_message(msg) -end diff --git a/docker/heka/plugins/decoders/os_swift_log.lua b/docker/heka/plugins/decoders/os_swift_log.lua deleted file mode 100644 index 04aa6d20ff..0000000000 --- a/docker/heka/plugins/decoders/os_swift_log.lua +++ /dev/null @@ -1,49 +0,0 @@ --- Copyright 2016 Mirantis, Inc. --- --- 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. --- --- The code in this file was inspired by Heka's rsyslog.lua decoder plugin. --- https://github.com/mozilla-services/heka/blob/master/sandbox/lua/decoders/rsyslog.lua - -local syslog = require "syslog" -local utils = require "os_utils" - -local msg = { - Timestamp = nil, - Type = 'log', - Hostname = read_config("hostname"), - Payload = nil, - Pid = nil, - Severity = nil, - Fields = nil -} - --- See https://git.openstack.org/cgit/openstack/swift/tree/swift/common/utils.py?id=2a8b455#n1423 -local swift_grammar = syslog.build_rsyslog_grammar('<%PRI%>%programname%: %msg%') - -function process_message () - local log = read_message("Payload") - - local fields = swift_grammar:match(log) - if not fields then return -1 end - - msg.Severity = fields.pri.severity - fields.syslogfacility = fields.pri.facility - fields.pri = nil - - msg.Payload = fields.msg - fields.msg = nil - - msg.Fields = fields - return utils.safe_inject_message(msg) -end diff --git a/docker/heka/plugins/decoders/os_syslog.lua b/docker/heka/plugins/decoders/os_syslog.lua deleted file mode 100644 index 94e2744f8b..0000000000 --- a/docker/heka/plugins/decoders/os_syslog.lua +++ /dev/null @@ -1,55 +0,0 @@ --- Copyright 2016 Mirantis, Inc. --- --- 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. --- --- The code in this file was inspired by Heka's rsyslog.lua decoder plugin. --- https://github.com/mozilla-services/heka/blob/master/sandbox/lua/decoders/rsyslog.lua - -local syslog = require "syslog" -local utils = require "os_utils" - -local msg = { - Timestamp = nil, - Type = 'log', - Hostname = read_config("hostname"), - Payload = nil, - Pid = nil, - Severity = nil, - Fields = nil -} - --- See https://tools.ietf.org/html/rfc3164 -local grammar = syslog.build_rsyslog_grammar('<%PRI%>%TIMESTAMP% %syslogtag% %msg%') - -function process_message () - local log = read_message("Payload") - local fields = grammar:match(log) - if not fields then return -1 end - - msg.Timestamp = fields.timestamp - fields.timestamp = nil - - msg.Severity = fields.pri.severity - fields.syslogfacility = fields.pri.facility - fields.pri = nil - - fields.programname = fields.syslogtag.programname - msg.Pid = fields.syslogtag.pid - fields.syslogtag = nil - - msg.Payload = fields.msg - fields.msg = nil - - msg.Fields = fields - return utils.safe_inject_message(msg) -end diff --git a/docker/heka/plugins/encoders/os_syslog.lua b/docker/heka/plugins/encoders/os_syslog.lua deleted file mode 100644 index 0acab8d58d..0000000000 --- a/docker/heka/plugins/encoders/os_syslog.lua +++ /dev/null @@ -1,26 +0,0 @@ --- Copyright 2016 Mirantis, Inc. --- --- 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. -require "string" - -local interpolate = require "msg_interpolate" -local utils = require "os_utils" - -local header_template = "<%{Severity}>%{%FT%TZ} %{Hostname} %{programname}[%{Pid}]:" - -function process_message() - local timestamp = read_message("Timestamp") / 1e9 - local header = interpolate.interpolate_from_msg(header_template, timestamp) - local payload = string.format("%s %s\n", header, read_message("Payload")) - return utils.safe_inject_payload("txt", "", payload) -end diff --git a/docker/heka/plugins/modules/os_patterns.lua b/docker/heka/plugins/modules/os_patterns.lua deleted file mode 100644 index 4cf0680306..0000000000 --- a/docker/heka/plugins/modules/os_patterns.lua +++ /dev/null @@ -1,144 +0,0 @@ --- Copyright 2015-2016 Mirantis, Inc. --- --- 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. -local table = require 'table' -local dt = require "date_time" -local l = require 'lpeg' -l.locale(l) - -local tonumber = tonumber - -local M = {} -setfenv(1, M) -- Remove external access to contain everything in the module - -function format_uuid(t) - return table.concat(t, '-') -end - -function anywhere (patt) - return l.P { - patt + 1 * l.V(1) - } -end - -sp = l.space -colon = l.P":" -dash = l.P"-" -dot = l.P'.' -quote = l.P'"' - -local x4digit = l.xdigit * l.xdigit * l.xdigit * l.xdigit -local uuid_dash = l.C(x4digit * x4digit * dash * x4digit * dash * x4digit * dash * x4digit * dash * x4digit * x4digit * x4digit) -local uuid_nodash = l.Ct(l.C(x4digit * x4digit) * l.C(x4digit) * l.C(x4digit) * l.C(x4digit) * l.C(x4digit * x4digit * x4digit)) / format_uuid - --- Return a UUID string in canonical format (eg with dashes) -Uuid = uuid_nodash + uuid_dash - --- Parse a datetime string and return a table with the following keys --- year (string) --- month (string) --- day (string) --- hour (string) --- min (string) --- sec (string) --- sec_frac (number less than 1, can be nil) --- offset_sign ('-' or '+', can be nil) --- offset_hour (number, can be nil) --- offset_min (number, can be nil) --- --- The datetime string can be formatted as --- 'YYYY-MM-DD( |T)HH:MM:SS(.ssssss)?(offset indicator)?' -TimestampTable = l.Ct(dt.rfc3339_full_date * (sp + l.P"T") * dt.rfc3339_partial_time * (dt.rfc3339_time_offset + dt.timezone_offset)^-1) - --- Returns the parsed datetime converted to nanosec -Timestamp = TimestampTable / dt.time_to_ns - -programname = (l.R("az", "AZ", "09") + l.P"." + dash + l.P"_")^1 -Pid = l.digit^1 -SeverityLabel = l.P"CRITICAL" + l.P"ERROR" + l.P"WARNING" + l.P"INFO" + l.P"AUDIT" + l.P"DEBUG" -Message = l.P(1)^0 - --- Capture for OpenStack logs producing four values: Timestamp, Pid, --- SeverityLabel, PythonModule and Message. --- --- OpenStack log messages are of this form: --- 2015-11-30 08:38:59.306 3434 INFO oslo_service.periodic_task [-] Blabla... --- --- [-] is the "request" part, it can take multiple forms. See below. -openstack = l.Ct(l.Cg(Timestamp, "Timestamp")* sp * l.Cg(Pid, "Pid") * sp * - l.Cg(SeverityLabel, "SeverityLabel") * sp * l.Cg(programname, "PythonModule") * - sp * l.Cg(Message, "Message")) - --- Capture for OpenStack request context producing three values: RequestId, --- UserId and TenantId. --- --- Notes: --- --- OpenStack logs include a request context, enclosed between square brackets. --- It takes one of these forms: --- --- [-] --- [req-0fd2a9ba-448d-40f5-995e-33e32ac5a6ba - - - - -] --- [req-4db318af-54c9-466d-b365-fe17fe4adeed 8206d40abcc3452d8a9c1ea629b4a8d0 112245730b1f4858ab62e3673e1ee9e2 - - -] --- --- In the 1st case the capture produces nil. --- In the 2nd case the capture produces one value: RequestId. --- In the 3rd case the capture produces three values: RequestId, UserId, TenantId. --- --- The request id may be formatted as 'req-xxx' or 'xxx' depending on the project. --- The user id and tenant id may not be present depending on the OpenStack release. -openstack_request_context = (l.P(1) - "[" )^0 * "[" * l.P"req-"^-1 * - l.Ct(l.Cg(Uuid, "RequestId") * sp * ((l.Cg(Uuid, "UserId") * sp * - l.Cg(Uuid, "TenantId")) + l.P(1)^0)) - "]" - -local http_method = l.Cg(l.R"AZ"^3, "http_method") -local url = l.Cg( (1 - sp)^1, "http_url") -local http_version = l.Cg(l.digit * dot * l.digit, "http_version") - --- Pattern for the " HTTP/" format found --- found in both OpenStack and Apache log files. --- Example : OPTIONS /example.com HTTP/1.0 -http_request = http_method * sp * url * sp * l.P'HTTP/' * http_version - --- Patterns for HTTP status, HTTP response size and HTTP response time in --- OpenLayers logs. --- --- Notes: --- Nova changes the default log format of eventlet.wsgi (see nova/wsgi.py) and --- prefixes the HTTP status, response size and response time values with --- respectively "status: ", "len: " and "time: ". --- Other OpenStack services just rely on the default log format. --- TODO(pasquier-s): build the LPEG grammar based on the log_format parameter --- passed to eventlet.wsgi.server similar to what the build_rsyslog_grammar --- function does for RSyslog. -local openstack_http_status = l.P"status: "^-1 * l.Cg(l.digit^3, "http_status") -local openstack_response_size = l.P"len: "^-1 * l.Cg(l.digit^1 / tonumber, "http_response_size") -local openstack_response_time = l.P"time: "^-1 * l.Cg(l.digit^1 * dot^0 * l.digit^0 / tonumber, "http_response_time") - --- Capture for OpenStack HTTP producing six values: http_method, http_url, --- http_version, http_status, http_response_size and http_response_time. -openstack_http = anywhere(l.Ct( - quote * http_request * quote * sp * - openstack_http_status * sp * openstack_response_size * sp * - openstack_response_time -)) - --- Capture for IP addresses producing one value: ip_address. -ip_address = anywhere(l.Ct( - l.Cg(l.digit^-3 * dot * l.digit^-3 * dot * l.digit^-3 * dot * l.digit^-3, "ip_address") -)) - --- Pattern used to match the beginning of a Python Traceback. -traceback = l.P'Traceback (most recent call last):' - -return M diff --git a/docker/heka/plugins/modules/os_utils.lua b/docker/heka/plugins/modules/os_utils.lua deleted file mode 100644 index c5b71c72a4..0000000000 --- a/docker/heka/plugins/modules/os_utils.lua +++ /dev/null @@ -1,89 +0,0 @@ --- Copyright 2015-2016 Mirantis, Inc. --- --- 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. -local cjson = require 'cjson' -local string = require 'string' - -local patt = require 'os_patterns' - -local pairs = pairs -local inject_message = inject_message -local inject_payload = inject_payload -local read_message = read_message -local pcall = pcall - -local M = {} -setfenv(1, M) -- Remove external access to contain everything in the module - -severity_to_label_map = { - [0] = 'EMERGENCY', - [1] = 'ALERT', - [2] = 'CRITICAL', - [3] = 'ERROR', - [4] = 'WARNING', - [5] = 'NOTICE', - [6] = 'INFO', - [7] = 'DEBUG', -} - -label_to_severity_map = { - EMERGENCY = 0, - ALERT = 1, - CRITICAL = 2, - ERROR = 3, - WARNING = 4, - NOTICE = 5, - INFO= 6, - DEBUG = 7, -} - -function chomp(s) - return string.gsub(s, "\n$", "") -end - --- Call inject_message() wrapped by pcall() -function safe_inject_message(msg) - local ok, err_msg = pcall(inject_message, msg) - if not ok then - return -1, err_msg - else - return 0 - end -end - --- Call inject_payload() wrapped by pcall() -function safe_inject_payload(payload_type, payload_name, data) - local ok, err_msg = pcall(inject_payload, payload_type, payload_name, data) - if not ok then - return -1, err_msg - else - return 0 - end -end - --- Shallow comparison between two tables. --- Return true if the two tables have the same keys with identical --- values, otherwise false. -function table_equal(t1, t2) - -- all key-value pairs in t1 must be in t2 - for k, v in pairs(t1) do - if t2[k] ~= v then return false end - end - -- there must not be other keys in t2 - for k, v in pairs(t2) do - if t1[k] == nil then return false end - end - return true -end - -return M diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2 deleted file mode 100644 index d4a9ab7806..0000000000 --- a/docker/horizon/Dockerfile.j2 +++ /dev/null @@ -1,122 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block horizon_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set horizon_packages = [ - 'openstack-dashboard', - 'httpd', - 'mod_wsgi', - 'gettext', - 'openstack-neutron-lbaas-ui' - ] %} - -{{ macros.install_packages(horizon_packages | customizable("packages")) }} - -{% block horizon_redhat_binary_setup %} -RUN useradd --user-group horizon \ - && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ - && ln -s /usr/share/openstack-dashboard/openstack_dashboard /usr/lib/python2.7/site-packages/openstack_dashboard \ - && ln -s /usr/share/openstack-dashboard/static /usr/lib/python2.7/site-packages/static \ - && chown -R horizon: /etc/openstack-dashboard /usr/share/openstack-dashboard \ - && chown -R apache: /usr/share/openstack-dashboard/static \ - && sed -i "s|WEBROOT = '/dashboard/'|WEBROOT = '/'|" /etc/openstack-dashboard/local_settings \ - && cp /usr/share/openstack-dashboard/manage.py /usr/bin/manage.py \ - && (cd /usr/lib/python2.7/site-packages/horizon && /usr/bin/python /usr/bin/manage.py compilemessages) \ - && (cd /usr/lib/python2.7/site-packages/openstack_dashboard && /usr/bin/python /usr/bin/manage.py compilemessages) \ - && rm -f /usr/share/openstack-dashboard/openstack_dashboard/local/enabled/_148*_project*loadbalancersv2_panel.py* -{% endblock %} - - {% elif base_distro in ['ubuntu'] %} - - {% set horizon_packages = [ - 'openstack-dashboard', - 'apache2', - 'libapache2-mod-wsgi', - 'gettext' - ] %} - -{{ macros.install_packages(horizon_packages | customizable("packages")) }} - -{% block horizon_ubuntu_binary_setup %} -RUN echo > /etc/apache2/ports.conf \ - && sed -i 's|\(ServerTokens \)OS|\1Prod|' /etc/apache2/conf-available/security.conf \ - && ln -s ../mods-available/headers.load /etc/apache2/mods-enabled/headers.load \ - && ln -s ../mods-available/expires.load /etc/apache2/mods-enabled/expires.load \ - && cp /usr/share/openstack-dashboard/openstack_dashboard/conf/*.json /etc/openstack-dashboard \ - && sed -i "s|WEBROOT='/horizon/'|WEBROOT = '/'|" /etc/openstack-dashboard/local_settings.py \ - && sed -i "s|^POLICY_FILES_PATH|POLICY_FILES_PATH = '/etc/openstack-dashboard'|" /etc/openstack-dashboard/local_settings.py \ - && cp /usr/share/openstack-dashboard/manage.py /usr/bin/manage.py \ - && rm /etc/apache2/conf-enabled/openstack-dashboard.conf \ - && rm /etc/openstack-dashboard/local_settings.py \ - && rm /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py \ - && ln -s /etc/openstack-dashboard/local_settings /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py \ - && ln -s /usr/share/openstack-dashboard/openstack_dashboard /usr/lib/python2.7/site-packages/openstack_dashboard \ - && ln -s /usr/share/openstack-dashboard/static /usr/lib/python2.7/site-packages/static \ - && (cd /usr/lib/python2.7/site-packages/horizon && /usr/bin/python /usr/bin/manage.py compilemessages) \ - && (cd /usr/lib/python2.7/site-packages/openstack_dashboard && /usr/bin/python /usr/bin/manage.py compilemessages) -{% endblock %} - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set horizon_packages = [ - 'httpd', - 'mod_wsgi', - 'gettext' - ] %} - -{{ macros.install_packages(horizon_packages | customizable("packages")) }} - -{% block horizon_redhat_source_setup %} -RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf -{% endblock %} - - {% elif base_distro in ['ubuntu', 'debian'] %} - - {% set horizon_packages = [ - 'apache2', - 'libapache2-mod-wsgi', - 'gettext' - ] %} - -{{ macros.install_packages(horizon_packages | customizable("packages")) }} - -{% block horizon_ubuntu_source_setup %} -RUN echo > /etc/apache2/ports.conf \ - && ln -s ../mods-available/headers.load /etc/apache2/mods-enabled/headers.load -{% endblock %} - - {% endif %} - -ADD horizon-archive /horizon-source -ADD plugins-archive / -RUN ln -s horizon-source/* horizon \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /horizon \ - && useradd --user-group horizon \ - && mkdir -p /etc/openstack-dashboard /home/horizon \ - && ln -s /etc/openstack-dashboard/local_settings /var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \ - && cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \ - && cp /horizon/openstack_dashboard/local/local_settings.py.example /etc/openstack-dashboard/local_settings \ - && cp /horizon/manage.py /var/lib/kolla/venv/bin/manage.py \ - && if [ "$(ls /plugins)" ]; then \ - pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /plugins/*; \ - fi \ - && (cd /var/lib/kolla/venv/lib/python2.7/site-packages/horizon && /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compilemessages) \ - && (cd /var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard && /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compilemessages) \ - && chown -R horizon: /etc/openstack-dashboard /home/horizon /var/lib/kolla/venv/lib/python2.7/site-packages/static - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start - -{% block horizon_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/horizon/extend_start.sh b/docker/horizon/extend_start.sh deleted file mode 100644 index 3c618355db..0000000000 --- a/docker/horizon/extend_start.sh +++ /dev/null @@ -1,71 +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 - MANAGE_PY="/usr/bin/python /usr/bin/manage.py" - if [[ -f "/var/lib/kolla/venv/bin/python" ]]; then - MANAGE_PY="/var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py" - fi - $MANAGE_PY migrate --noinput - exit 0 -fi - -FORCE_GENERATE="no" - -if [[ ${KOLLA_INSTALL_TYPE} == "binary" ]]; then - SITE_PACKAGES="/usr/lib/python2.7/site-packages" -elif [[ ${KOLLA_INSTALL_TYPE} == "source" ]]; then - SITE_PACKAGES="/var/lib/kolla/venv/lib/python2.7/site-packages" -fi - -function config_neutron_lbaas { - SRC="${SITE_PACKAGES}/neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py" - DEST="${SITE_PACKAGES}/openstack_dashboard/local/enabled/_1481_project_ng_loadbalancersv2_panel.py" - if [[ "${ENABLE_NEUTRON_LBAAS}" == "yes" ]] && [[ ! -f ${DEST} ]]; then - cp -a $SRC $DEST - FORCE_GENERATE="yes" - elif [[ "${ENABLE_NEUTRON_LBAAS}" != "yes" ]] && [[ -f ${DEST} ]]; then - # remove pyc pyo files too - rm -f ${DEST} ${DEST}c ${DEST}o - FORCE_GENERATE="yes" - fi -} - -config_neutron_lbaas - -# 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 - -# NOTE(jeffrey4l): The local_settings file affect django-compress -# behavior, so re-generate the compressed javascript and css if it -# is changed -MD5SUM_TXT_PATH="/tmp/.local_settings.md5sum.txt" -if [[ ! -f ${MD5SUM_TXT_PATH} || $(md5sum -c --status ${MD5SUM_TXT_PATH};echo $?) != 0 || ${FORCE_GENERATE} == "yes" ]]; then - md5sum /etc/openstack-dashboard/local_settings > ${MD5SUM_TXT_PATH} - if [[ "${KOLLA_INSTALL_TYPE}" == "binary" ]]; then - /usr/bin/manage.py compress --force - /usr/bin/manage.py collectstatic --noinput --clear - elif [[ "${KOLLA_INSTALL_TYPE}" == "source" ]]; then - /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compress --force - /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py collectstatic --noinput --clear - fi -fi - -# NOTE(sbezverk) since Horizon is now storing logs in its own location, /var/log/horizon -# needs to be created if it does not exist -if [[ ! -d "/var/log/kolla/horizon" ]]; then - mkdir -p /var/log/kolla/horizon -fi -if [[ $(stat -c %a /var/log/kolla/horizon) != "755" ]]; then - chmod 755 /var/log/kolla/horizon -fi diff --git a/docker/influxdb/Dockerfile.j2 b/docker/influxdb/Dockerfile.j2 deleted file mode 100644 index fdd1cf614e..0000000000 --- a/docker/influxdb/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block influxdb_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% set influxdb_packages = ['influxdb'] %} -{{ macros.install_packages(influxdb_packages | customizable("packages")) }} - -COPY influxdb_sudoers /etc/sudoers.d/kolla_influxdb_sudoers -RUN chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_influxdb_sudoers \ - && usermod -a -G kolla influxdb - -{% block influxdb_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER influxdb diff --git a/docker/influxdb/influxdb_sudoers b/docker/influxdb/influxdb_sudoers deleted file mode 100644 index a9757b264e..0000000000 --- a/docker/influxdb/influxdb_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R influxdb\: /var/lib/influxdb, /bin/chown -R influxdb\: /var/lib/influxdb diff --git a/docker/ironic/ironic-api/Dockerfile.j2 b/docker/ironic/ironic-api/Dockerfile.j2 deleted file mode 100644 index 1fd82dcfa8..0000000000 --- a/docker/ironic/ironic-api/Dockerfile.j2 +++ /dev/null @@ -1,26 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block ironic_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set ironic_api_packages = ['openstack-ironic-api'] %} - {% elif base_distro in ['ubuntu'] %} - {% set ironic_api_packages = ['ironic-api'] %} - {% endif %} - -{{ macros.install_packages(ironic_api_packages | customizable("packages")) }} - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_ironic_extend_start -RUN chmod 755 /usr/local/bin/kolla_ironic_extend_start - -{% block ironic_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER ironic diff --git a/docker/ironic/ironic-api/extend_start.sh b/docker/ironic/ironic-api/extend_start.sh deleted file mode 100644 index cd9c95a126..0000000000 --- a/docker/ironic/ironic-api/extend_start.sh +++ /dev/null @@ -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 - ironic-dbsync upgrade - exit 0 -fi diff --git a/docker/ironic/ironic-base/Dockerfile.j2 b/docker/ironic/ironic-base/Dockerfile.j2 deleted file mode 100644 index 5029ae9314..0000000000 --- a/docker/ironic/ironic-base/Dockerfile.j2 +++ /dev/null @@ -1,41 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block ironic_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set ironic_base_packages = ['openstack-ironic-common'] %} - {% elif base_distro in ['ubuntu'] %} - {% set ironic_base_packages = ['ironic-common'] %} - {% endif %} - -{{ macros.install_packages(ironic_base_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD ironic-base-archive /ironic-base-source -RUN ln -s ironic-base-source/* ironic \ - && useradd --user-group --create-home --home-dir /var/lib/ironic ironic \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /ironic \ - && mkdir -p /etc/ironic /var/lib/ironic \ - && cp -r /ironic/etc/ironic/* /etc/ironic/ \ - && chown -R ironic: /etc/ironic /var/lib/ironic \ - && 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/ironic/rootwrap.conf - -ADD ironic_sudoers /etc/sudoers.d/kolla_ironic_sudoers -RUN chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_ironic_sudoers - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN touch /usr/local/bin/kolla_ironic_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_ironic_extend_start \ - && usermod -a -G kolla ironic \ - && chown -R ironic: /etc/ironic - -{% block ironic_base_footer %}{% endblock %} diff --git a/docker/ironic/ironic-base/extend_start.sh b/docker/ironic/ironic-base/extend_start.sh deleted file mode 100644 index e3b1d4e2dc..0000000000 --- a/docker/ironic/ironic-base/extend_start.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -LOG_PATH=/var/log/kolla/ironic - -if [[ ! -d "${LOG_PATH}" ]]; then - mkdir -p "${LOG_PATH}" -fi -if [[ $(stat -c %a "${LOG_PATH}") != "755" ]]; then - chmod 755 "${LOG_PATH}" -fi - -. /usr/local/bin/kolla_ironic_extend_start diff --git a/docker/ironic/ironic-base/ironic_sudoers b/docker/ironic/ironic-base/ironic_sudoers deleted file mode 100644 index 3e7c843f39..0000000000 --- a/docker/ironic/ironic-base/ironic_sudoers +++ /dev/null @@ -1 +0,0 @@ -ironic ALL = (root) NOPASSWD: /var/lib/kolla/venv/bin/ironic-rootwrap /etc/ironic/rootwrap.conf * diff --git a/docker/ironic/ironic-conductor/Dockerfile.j2 b/docker/ironic/ironic-conductor/Dockerfile.j2 deleted file mode 100644 index 3e3f7d315f..0000000000 --- a/docker/ironic/ironic-conductor/Dockerfile.j2 +++ /dev/null @@ -1,79 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block ironic_conductor_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - # TODO(Jeffrey4l): no python-scciclient, python-oneviewclient, - # python-seamicroclient, pyremotevbox package - {% set ironic_conductor_packages = [ - 'util-linux', - 'openstack-ironic-conductor', - 'qemu-img', - 'ipmitool', - 'parted', - 'gdisk', - 'psmisc', - 'python-dracclient', - 'python-proliantutils', - 'python-ironic-inspector-client', - 'python-pyghmi', - 'pysnmp', - 'python-UcsSdk', - 'openwsman-python', - 'python2-ImcSdk' - ] %} - {% elif base_distro in ['ubuntu'] %} - # TODO(jeffrey4l): no python-dracclient, python-oneviewclient, UcsSdk, - # pyremotevbox, ImcSdk package - {% set ironic_conductor_packages = [ - 'bsdmainutils', - 'ironic-conductor', - 'qemu-utils', - 'ipmitool', - 'gdisk', - 'psmisc', - 'parted', - 'python-proliantutils', - 'python-ironic-inspector-client', - 'python-pyghmi', - 'python-pysnmp4', - 'python-scciclient', - 'python-seamicroclient', - 'python-openwsman' - ] %} - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set ironic_conductor_packages = [ - 'util-linux', - 'qemu-img', - 'ipmitool', - 'parted', - 'gdisk', - 'psmisc', - 'fuse' - ] %} - {% elif base_distro in ['ubuntu', 'debian'] %} - {% set ironic_conductor_packages = [ - 'bsdmainutils', - 'qemu-utils', - 'ipmitool', - 'gdisk', - 'psmisc', - 'parted' - ] %} - {% endif %} -RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt -r /ironic/driver-requirements.txt -{% endif %} - -{{ macros.install_packages(ironic_conductor_packages | customizable("packages")) }} - -{% block ironic_conductor_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER ironic diff --git a/docker/ironic/ironic-inspector/Dockerfile.j2 b/docker/ironic/ironic-inspector/Dockerfile.j2 deleted file mode 100644 index 8870787974..0000000000 --- a/docker/ironic/ironic-inspector/Dockerfile.j2 +++ /dev/null @@ -1,45 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block ironic_inspector_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set ironic_inspector_packages = ['openstack-ironic-inspector'] %} - {% elif base_distro in ['ubuntu'] %} - {% set ironic_inspector_packages = [ - 'ironic-inspector', - 'iptables' - ] %} - {% endif %} - -{{ macros.install_packages(ironic_inspector_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - {% if base_distro in ['ubuntu'] %} - {% set ironic_inspector_packages = ['iptables'] %} - {% endif %} - -{{ macros.install_packages(ironic_inspector_packages | customizable("packages")) }} - -ADD ironic-inspector-archive /ironic-inspector-source -RUN ln -s ironic-inspector-source/* ironic-inspector \ - && mv /etc/ironic /etc/ironic-inspector \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /ironic-inspector \ - && cp /ironic-inspector/rootwrap.conf /etc/ironic-inspector/ \ - && cp -r /ironic-inspector/rootwrap.d/ /etc/ironic-inspector/ \ - && 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/ironic-inspector/rootwrap.conf - -{% endif %} - -COPY ironic_sudoers /etc/sudoers.d/kolla_ironic_inspector_sudoers -RUN chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_ironic_inspector_sudoers - -{% block ironic_inspector_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER ironic diff --git a/docker/ironic/ironic-inspector/ironic_sudoers b/docker/ironic/ironic-inspector/ironic_sudoers deleted file mode 100644 index 612f8dc3a4..0000000000 --- a/docker/ironic/ironic-inspector/ironic_sudoers +++ /dev/null @@ -1 +0,0 @@ -ironic ALL=(root) NOPASSWD: /var/lib/kolla/venv/bin/ironic-inspector-rootwrap /etc/ironic-inspector/rootwrap.conf * diff --git a/docker/ironic/ironic-pxe/Dockerfile.j2 b/docker/ironic/ironic-pxe/Dockerfile.j2 deleted file mode 100644 index 1ea8da88e4..0000000000 --- a/docker/ironic/ironic-pxe/Dockerfile.j2 +++ /dev/null @@ -1,30 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block ironic_pxe_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set ironic_pxe_packages = [ - 'tftp-server', - 'syslinux-tftpboot' - ] %} -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set ironic_pxe_packages = [ - 'tftpd-hpa', - 'syslinux-common', - 'syslinux', - 'pxelinux' - ] %} -{% endif %} - -{{ macros.install_packages(ironic_pxe_packages | customizable("packages")) }} - -COPY tftp-map-file /map-file -COPY extend_start.sh /usr/local/bin/kolla_ironic_extend_start -RUN chmod 755 /usr/local/bin/kolla_ironic_extend_start - -{% block ironic_pxe_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/ironic/ironic-pxe/extend_start.sh b/docker/ironic/ironic-pxe/extend_start.sh deleted file mode 100644 index 2496c61f76..0000000000 --- a/docker/ironic/ironic-pxe/extend_start.sh +++ /dev/null @@ -1,15 +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 - chown -R ironic: /tftpboot - for pxe_file in /var/lib/tftpboot/pxelinux.0 /var/lib/tftpboot/chain.c32 /usr/lib/syslinux/pxelinux.0 \ - /usr/lib/syslinux/chain.c32 /usr/lib/PXELINUX/pxelinux.0 \ - /usr/lib/syslinux/modules/bios/chain.c32 /usr/lib/syslinux/modules/bios/ldlinux.c32; do - if [[ -e "$pxe_file" ]]; then - cp "$pxe_file" /tftpboot - fi - done - exit 0 -fi diff --git a/docker/ironic/ironic-pxe/tftp-map-file b/docker/ironic/ironic-pxe/tftp-map-file deleted file mode 100644 index 812abe0c5c..0000000000 --- a/docker/ironic/ironic-pxe/tftp-map-file +++ /dev/null @@ -1,4 +0,0 @@ -re ^(/tftpboot/) /tftpboot/\2 -re ^/tftpboot/ /tftpboot/ -re ^(^/) /tftpboot/\1 -re ^([^/]) /tftpboot/\1 diff --git a/docker/iscsid/Dockerfile.j2 b/docker/iscsid/Dockerfile.j2 deleted file mode 100644 index 0f29fe5f34..0000000000 --- a/docker/iscsid/Dockerfile.j2 +++ /dev/null @@ -1,32 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block iscsid_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set iscsid_packages = [ - 'iscsi-initiator-utils', - 'targetcli', - 'python-rtslib' - ] %} - -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set iscsid_packages = [ - 'open-iscsi', - 'targetcli', - 'python-rtslib' - ] %} - -{% endif %} - -{{ macros.install_packages(iscsid_packages | customizable("packages")) }} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start \ - && rm /etc/iscsi/initiatorname.iscsi - -{% block iscsid_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/iscsid/extend_start.sh b/docker/iscsid/extend_start.sh deleted file mode 100644 index 78f2317d28..0000000000 --- a/docker/iscsid/extend_start.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# check if unique iSCSI initiator name already exists -if [[ ! -f /etc/iscsi/initiatorname.iscsi ]]; then - echo "Generating new iSCSI initiator name" - echo InitiatorName=$(/sbin/iscsi-iname) > /etc/iscsi/initiatorname.iscsi -fi diff --git a/docker/keepalived/Dockerfile.j2 b/docker/keepalived/Dockerfile.j2 deleted file mode 100644 index 2c3ad15f8e..0000000000 --- a/docker/keepalived/Dockerfile.j2 +++ /dev/null @@ -1,29 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block keepalived_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set keepalived_packages = [ - 'hostname', - 'keepalived', - 'socat' - ] %} -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set keepalived_packages = [ - 'keepalived', - 'socat' - ] %} -{% endif %} -{{ macros.install_packages(keepalived_packages | customizable("packages")) }} - -COPY check_alive.sh / - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start /check_alive.sh - -{% block keepalived_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/keepalived/check_alive.sh b/docker/keepalived/check_alive.sh deleted file mode 100644 index 9bb87d7b78..0000000000 --- a/docker/keepalived/check_alive.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# This will return 0 when it successfully talks to the haproxy daemon via the socket -# Failures return 1 - -echo "show info" | socat unix-connect:/var/lib/kolla/haproxy/haproxy.sock stdio diff --git a/docker/keepalived/extend_start.sh b/docker/keepalived/extend_start.sh deleted file mode 100644 index 0cb79767e6..0000000000 --- a/docker/keepalived/extend_start.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# NOTE(elemoine): keepalived cannot be configured to change the log address to -# anything other than /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 - -modprobe ip_vs - -# Workaround for bug #1485079 -if [ -f /run/keepalived.pid ]; then - rm /run/keepalived.pid -fi diff --git a/docker/keystone/keystone-base/Dockerfile.j2 b/docker/keystone/keystone-base/Dockerfile.j2 deleted file mode 100644 index 6a909a5d5b..0000000000 --- a/docker/keystone/keystone-base/Dockerfile.j2 +++ /dev/null @@ -1,81 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block keystone_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set keystone_base_packages = [ - 'openstack-keystone', - 'python-keystoneclient', - 'httpd', - 'mod_wsgi', - 'python-ldappool' - ] %} - -{{ macros.install_packages(keystone_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/keystone \ - && cp -a /usr/bin/keystone-wsgi-public /var/www/cgi-bin/keystone/main \ - && cp -a /usr/bin/keystone-wsgi-admin /var/www/cgi-bin/keystone/admin \ - && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf - - {% elif base_distro in ['ubuntu'] %} - {% set keystone_base_packages = [ - 'keystone', - 'apache2', - 'libapache2-mod-wsgi', - 'python-ldappool' - ] %} - -{{ macros.install_packages(keystone_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/keystone \ - && cp -a /usr/bin/keystone-wsgi-public /var/www/cgi-bin/keystone/main \ - && cp -a /usr/bin/keystone-wsgi-admin /var/www/cgi-bin/keystone/admin \ - && echo > /etc/apache2/ports.conf \ - && rm /etc/apache2/sites-enabled/keystone.conf - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set keystone_base_packages = [ - 'httpd', - 'mod_wsgi', - 'python-ldappool' - ] %} -{{ macros.install_packages(keystone_base_packages | customizable("packages")) }} -RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf - - {% elif base_distro in ['ubuntu', 'debian'] %} - {% set keystone_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi', - 'python-ldappool' - ] %} -{{ macros.install_packages(keystone_base_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf - - {% endif %} - -{% block keystone_source_install %} -ADD keystone-base-archive /keystone-base-source -RUN ln -s keystone-base-source/* keystone \ - && useradd --user-group --create-home --home-dir /var/lib/keystone keystone \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /keystone \ - && mkdir -p /etc/keystone /var/www/cgi-bin/keystone /var/log/apache2 \ - && cp -r /keystone/etc/* /etc/keystone/ \ - && cp /var/lib/kolla/venv/bin/keystone-wsgi-admin /var/www/cgi-bin/keystone/admin \ - && cp /var/lib/kolla/venv/bin/keystone-wsgi-public /var/www/cgi-bin/keystone/main \ - && chown -R keystone: /etc/keystone /var/www/cgi-bin/keystone /var/log/apache2 -{% endblock %} - -{% endif %} - -RUN usermod -a -G kolla keystone \ - && chown -R keystone: /var/www/cgi-bin/keystone \ - && chmod 755 /var/www/cgi-bin/keystone/* - -{% block keystone_base_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/keystone/keystone-fernet/Dockerfile.j2 b/docker/keystone/keystone-fernet/Dockerfile.j2 deleted file mode 100644 index 6710490c46..0000000000 --- a/docker/keystone/keystone-fernet/Dockerfile.j2 +++ /dev/null @@ -1,30 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}keystone-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block keystone_fernet_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set keystone_fernet_packages = [ - 'cronie', - 'openssh-clients', - 'rsync' - ] %} -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set keystone_fernet_packages = [ - 'cron', - 'openssh-client', - 'rsync' - ] %} -{% endif %} -{{ macros.install_packages(keystone_fernet_packages | customizable("packages")) }} - -COPY fetch_fernet_tokens.py /usr/bin/ -COPY keystone_bootstrap.sh /usr/local/bin/kolla_keystone_bootstrap -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_keystone_bootstrap /usr/bin/fetch_fernet_tokens.py - -{% block keystone_fernet_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/keystone/keystone-fernet/extend_start.sh b/docker/keystone/keystone-fernet/extend_start.sh deleted file mode 100644 index cf356949fb..0000000000 --- a/docker/keystone/keystone-fernet/extend_start.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -FERNET_SYNC=/usr/bin/fernet-node-sync.sh -FERNET_TOKEN_DIR="/etc/keystone/fernet-keys" - -if [[ -f "${FERNET_SYNC}" ]]; then - ${FERNET_SYNC} -fi - -if [[ $(stat -c %U:%G ${FERNET_TOKEN_DIR}) != "keystone:keystone" ]]; then - chown keystone:keystone ${FERNET_TOKEN_DIR} -fi diff --git a/docker/keystone/keystone-fernet/fetch_fernet_tokens.py b/docker/keystone/keystone-fernet/fetch_fernet_tokens.py deleted file mode 100644 index 7ef7be0858..0000000000 --- a/docker/keystone/keystone-fernet/fetch_fernet_tokens.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/python - -# 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. - -# Basically this module will fetch the fernet tokens and compare them to the -# required time constrains to determine whether the host needs to resync with -# other nodes in the cluster. - -from __future__ import print_function -import argparse -from datetime import datetime -from datetime import timedelta -import json -import os -import sys - -TOKEN_PATH = '/etc/keystone/fernet-keys' - - -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 has_file(filename_path): - if not os.path.exists(filename_path): - return False - return True - - -def num_tokens(): - _, _, files = os.walk(TOKEN_PATH).next() - return len(files) - - -def tokens_populated(expected): - return num_tokens() == int(expected) - - -def token_stale(seconds, filename='0'): - max_token_age = datetime.now() - timedelta(seconds=int(seconds)) - filename_path = os.path.join(TOKEN_PATH, filename) - - if not has_file(filename_path): - return True - modified_date = datetime.fromtimestamp(os.path.getmtime(filename_path)) - return modified_date < max_token_age - - -def main(): - parser = argparse.ArgumentParser(description='''Checks to see if a fernet - token no older than a desired time.''') - parser.add_argument('-t', '--time', - help='Time in seconds for a token rotation', - required=True) - parser.add_argument('-f', '--filename', - help='Filename of token to check', - default='0') - parser.add_argument('-n', '--number', - help='Number of tokens that should exist', - required=True) - args = parser.parse_args() - - json_exit({ - 'populated': tokens_populated(args.number), - 'update_required': token_stale(args.time, args.filename), - }) - - -if __name__ == '__main__': - main() diff --git a/docker/keystone/keystone-fernet/keystone_bootstrap.sh b/docker/keystone/keystone-fernet/keystone_bootstrap.sh deleted file mode 100644 index d361767bbc..0000000000 --- a/docker/keystone/keystone-fernet/keystone_bootstrap.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -# 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. - -set -x - -USERNAME=$1 -GROUP=$2 - -function fail_json { - echo '{"failed": true, "msg": "'$1'", "changed": true}' - exit 1 -} - -function exit_json { - echo '{"failed": false, "changed": '"${changed}"'}' -} - -changed="false" -keystone_bootstrap=$(keystone-manage --config-file /etc/keystone/keystone.conf fernet_setup --keystone-user ${USERNAME} --keystone-group ${GROUP} 2>&1) -if [[ $? != 0 ]]; then - fail_json "${keystone_bootstrap}" -fi - -changed=$(echo "${keystone_bootstrap}" | awk ' - /Key repository is already initialized/ {count++} - END { - if (count == 1) changed="true"; else changed="false" - print changed - }' -) - -exit_json diff --git a/docker/keystone/keystone-ssh/Dockerfile.j2 b/docker/keystone/keystone-ssh/Dockerfile.j2 deleted file mode 100644 index 5b52879816..0000000000 --- a/docker/keystone/keystone-ssh/Dockerfile.j2 +++ /dev/null @@ -1,30 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}keystone-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block keystone_ssh_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set keystone_ssh_packages = [ - 'openssh-server', - 'rsync' - ] %} -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set keystone_ssh_packages = [ - 'openssh-server', - 'rsync' - ] %} - -RUN mkdir -p /var/run/sshd \ - && chmod 0755 /var/run/sshd - -{% endif %} -{{ macros.install_packages(keystone_ssh_packages | customizable("packages")) }} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start - -{% block keystone_ssh_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/keystone/keystone-ssh/extend_start.sh b/docker/keystone/keystone-ssh/extend_start.sh deleted file mode 100644 index 23744cead2..0000000000 --- a/docker/keystone/keystone-ssh/extend_start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -if [[ ! -L /dev/log ]]; then - ln -sf /var/lib/kolla/heka/log /dev/log -fi - -SSH_HOST_KEY_TYPES=( "rsa" "dsa" "ecdsa" "ed25519" ) - -for key_type in ${SSH_HOST_KEY_TYPES[@]}; do - KEY_PATH=/etc/ssh/ssh_host_${key_type}_key - if [[ ! -f "${KEY_PATH}" ]]; then - ssh-keygen -q -t ${key_type} -f ${KEY_PATH} -N "" - fi -done - -mkdir -p /var/lib/keystone/.ssh - -if [[ $(stat -c %U:%G /var/lib/keystone/.ssh) != "keystone:keystone" ]]; then - sudo chown keystone: /var/lib/keystone/.ssh -fi diff --git a/docker/keystone/keystone/Dockerfile.j2 b/docker/keystone/keystone/Dockerfile.j2 deleted file mode 100644 index 761be7893f..0000000000 --- a/docker/keystone/keystone/Dockerfile.j2 +++ /dev/null @@ -1,12 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}keystone-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block keystone_header %}{% endblock %} - -COPY keystone_bootstrap.sh /usr/local/bin/kolla_keystone_bootstrap -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_keystone_bootstrap - -{% block keystone_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/keystone/keystone/extend_start.sh b/docker/keystone/keystone/extend_start.sh deleted file mode 100644 index b509c7065b..0000000000 --- a/docker/keystone/keystone/extend_start.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -function kolla_kubernetes { - KUBE_TOKEN=$(&1) -if [[ $? != 0 ]]; then - fail_json "${keystone_bootstrap}" -fi - -changed=$(echo "${keystone_bootstrap}" | awk ' - /Domain default already exists, skipping creation./ || - /Project '"${PROJECT}"' already exists, skipping creation./ || - /User '"${USERNAME}"' already exists, skipping creation./ || - /Role '"${ROLE}"' exists, skipping creation./ || - /User '"${USERNAME}"' already has '"${ROLE}"' on '"${PROJECT}"'./ || - /Region '"${REGION}"' exists, skipping creation./ || - /Skipping admin endpoint as already created/ || - /Skipping internal endpoint as already created/ || - /Skipping public endpoint as already created/ {count++} - END { - if (count == 9) changed="false"; else changed="true" - print changed - }' -) - -exit_json diff --git a/docker/kibana/Dockerfile.j2 b/docker/kibana/Dockerfile.j2 deleted file mode 100644 index a41c86d859..0000000000 --- a/docker/kibana/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block kibana_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN useradd -r -m --user-group kibana \ - && usermod -a -G kolla kibana \ - && chmod 755 /usr/local/bin/kolla_extend_start - -{% set kibana_packages = ['kibana'] %} -{{ macros.install_packages(kibana_packages | customizable("packages")) }} - -{% block kibana_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER kibana diff --git a/docker/kibana/extend_start.sh b/docker/kibana/extend_start.sh deleted file mode 100644 index 4f6143181a..0000000000 --- a/docker/kibana/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -KIBANA_LOG_DIR="/var/log/kolla/kibana" - -if [[ ! -d "${KIBANA_LOG_DIR}" ]]; then - mkdir -p "${KIBANA_LOG_DIR}" -fi -if [[ $(stat -c %U:%G "${KIBANA_LOG_DIR}") != "kibana:kolla" ]]; then - chown kibana:kolla "${KIBANA_LOG_DIR}" -fi diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2 deleted file mode 100644 index c2f1c47a6f..0000000000 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ /dev/null @@ -1,80 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block kolla_toolbox_header %}{% endblock %} - -{% set os_client_config='/usr/lib/python2.7/site-packages/os_client_config/defaults.json' %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set kolla_toolbox_packages = [ - 'crudini', - 'gcc', - 'gdisk', - 'git', - 'jq', - 'libffi-devel', - 'libxml2-devel', - 'libxslt-devel', - 'MariaDB-devel', - 'MariaDB-shared', - 'MariaDB-client', - 'openssl-devel', - 'python-devel', - 'openssh-clients' - ] %} - -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set kolla_toolbox_packages = [ - 'build-essential', - 'ca-certificates', - 'crudini', - 'gdisk', - 'git', - 'jq', - 'libffi-dev', - 'libmariadbclient-dev', - 'mariadb-client', - 'libssl-dev', - 'libxslt1-dev', - 'python-dev' - ] %} - -{% if base_distro == 'debian' %} - {% set os_client_config='/usr/local/lib/python2.7/dist-packages/os_client_config/defaults.json' %} -{% endif %} - -{% endif %} -{{ macros.install_packages(kolla_toolbox_packages | customizable("packages")) }} - -{% block kolla_toolbox_source_install_python_pip %} -RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ - && python get-pip.py \ - && rm get-pip.py -{% endblock %} - -RUN pip --no-cache-dir install \ - pytz \ - ansible==2.1.1.0 \ - MySQL-python \ - os-client-config==1.16.0 \ - pyudev \ - shade==1.5.0 - -RUN useradd -m --user-group ansible --groups kolla \ - && mkdir -p /etc/ansible /usr/share/ansible \ - && echo 'localhost ansible_connection=local' > /etc/ansible/hosts \ - && sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' {{ os_client_config }} - -COPY find_disks.py kolla_keystone_service.py kolla_keystone_user.py kolla_sanity.py /usr/share/ansible/ -COPY ansible.cfg /home/ansible/.ansible.cfg - -COPY ansible_sudoers /etc/sudoers.d/kolla_ansible_sudoers -RUN chmod 440 /etc/sudoers.d/kolla_ansible_sudoers - -{% block kolla_toolbox_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER ansible diff --git a/docker/kolla-toolbox/ansible.cfg b/docker/kolla-toolbox/ansible.cfg deleted file mode 100644 index 53708de396..0000000000 --- a/docker/kolla-toolbox/ansible.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[defaults] -remote_tmp = /tmp -log_path = /var/log/kolla/ansible.log diff --git a/docker/kolla-toolbox/ansible_sudoers b/docker/kolla-toolbox/ansible_sudoers deleted file mode 100644 index 2f486cef99..0000000000 --- a/docker/kolla-toolbox/ansible_sudoers +++ /dev/null @@ -1 +0,0 @@ -ansible ALL=(root) NOPASSWD: /usr/bin/ansible localhost -m find_disks -a * diff --git a/docker/kolla-toolbox/find_disks.py b/docker/kolla-toolbox/find_disks.py deleted file mode 100644 index 3a7fa4602c..0000000000 --- a/docker/kolla-toolbox/find_disks.py +++ /dev/null @@ -1,179 +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 module has been relicensed from the source below: -# https://github.com/SamYaple/yaodu/blob/master/ansible/library/ceph_osd_list - -DOCUMENTATION = ''' ---- -module: find_disks -short_description: Return list of devices containing a specfied name or label -description: - - This will return a list of all devices with either GPT partition name - or filesystem label of the name specified. -options: - match_mode: - description: - - Label match mode, either strict or prefix - default: 'strict' - required: False - choices: [ "strict", "prefix" ] - type: str - name: - description: - - Partition name or filesystem label - required: True - type: str - aliases: [ 'partition_name' ] -author: Sam Yaple -''' - -EXAMPLES = ''' -- hosts: ceph-osd - tasks: - - name: Return all valid formated devices with the name KOLLA_CEPH_OSD - find_disks: - name: 'KOLLA_CEPH_OSD' - register: osds - -- hosts: swift-object-server - tasks: - - name: Return all valid devices with the name KOLLA_SWIFT - find_disks: - name: 'KOLLA_SWIFT' - register: swift_disks - -- hosts: swift-object-server - tasks: - - name: Return all valid devices with wildcard name 'swift_d*' - find_disks: - name: 'swift_d' match_mode: 'prefix' - register: swift_disks -''' - -import json -import pyudev -import re -import subprocess # nosec - - -def get_id_part_entry_name(dev): - # NOTE(pbourke): Old versions of udev have trouble retrieving GPT partition - # labels. In this case shell out to sgdisk. - try: - udev_version = pyudev.udev_version() - except (ValueError, EnvironmentError, subprocess.CalledProcessError): - udev_version = -1 - - if udev_version >= 180: - dev_name = dev.get('ID_PART_ENTRY_NAME', '') - else: - part = re.sub(r'.*[^\d]', '', dev.device_node) - parent = dev.find_parent('block').device_node - # NOTE(Mech422): Need to use -i as -p truncates the partition name - # TODO(pbourke): Consider some form of validation to be performed on - # part/parent [0] - out = subprocess.Popen(['/usr/sbin/sgdisk', '-i', part, # nosec [0] - parent], - stdout=subprocess.PIPE).communicate() - match = re.search(r'Partition name: \'(\w+)\'', out[0]) - if match: - dev_name = match.group(1) - else: - dev_name = '' - return dev_name - - -def is_dev_matched_by_name(dev, name, mode): - if dev.get('DEVTYPE', '') == 'partition': - dev_name = get_id_part_entry_name(dev) - else: - dev_name = dev.get('ID_FS_LABEL', '') - - if mode == 'strict': - return dev_name == name - elif mode == 'prefix': - return dev_name.startswith(name) - else: - return False - - -def find_disk(ct, name, match_mode): - for dev in ct.list_devices(subsystem='block'): - if is_dev_matched_by_name(dev, name, match_mode): - yield dev - - -def extract_disk_info(ct, dev, name): - if not dev: - return - kwargs = dict() - kwargs['fs_uuid'] = dev.get('ID_FS_UUID', '') - kwargs['fs_label'] = dev.get('ID_FS_LABEL', '') - if dev.get('DEVTYPE', '') == 'partition': - kwargs['device'] = dev.find_parent('block').device_node - kwargs['partition'] = dev.device_node - kwargs['partition_num'] = \ - re.sub(r'.*[^\d]', '', dev.device_node) - if is_dev_matched_by_name(dev, name, 'strict'): - kwargs['external_journal'] = False - kwargs['journal'] = dev.device_node[:-1] + '2' - kwargs['journal_device'] = kwargs['device'] - kwargs['journal_num'] = 2 - else: - kwargs['external_journal'] = True - journal_name = get_id_part_entry_name(dev) + '_J' - for journal in find_disk(ct, journal_name, 'strict'): - kwargs['journal'] = journal.device_node - kwargs['journal_device'] = \ - journal.find_parent('block').device_node - kwargs['journal_num'] = \ - re.sub(r'.*[^\d]', '', journal.device_node) - break - if 'journal' not in kwargs: - # NOTE(SamYaple): Journal not found, not returning info - return - else: - kwargs['device'] = dev.device_node - yield kwargs - - -def main(): - argument_spec = dict( - match_mode=dict(required=False, choices=['strict', 'prefix'], - default='strict'), - name=dict(aliases=['partition_name'], required=True, type='str') - ) - module = AnsibleModule(argument_spec) - match_mode = module.params.get('match_mode') - name = module.params.get('name') - - try: - ret = list() - ct = pyudev.Context() - for dev in find_disk(ct, name, match_mode): - for info in extract_disk_info(ct, dev, name): - if info: - ret.append(info) - - module.exit_json(disks=json.dumps(ret)) - except Exception as e: - module.exit_json(failed=True, msg=repr(e)) - -# import module snippets -from ansible.module_utils.basic import * # noqa -if __name__ == '__main__': - main() diff --git a/docker/kolla-toolbox/kolla_keystone_service.py b/docker/kolla-toolbox/kolla_keystone_service.py deleted file mode 100644 index 6dd2a1b25b..0000000000 --- a/docker/kolla-toolbox/kolla_keystone_service.py +++ /dev/null @@ -1,99 +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 file is a barebones file needed to file a gap until Ansible 2.0. No -# error checking, no deletions, no updates. Idempotent creation only. - -# If you look closely, you will see we arent _really_ using the shade module -# we just use it to slightly abstract the authentication model. As patches land -# in upstream shade we will be able to use more of the shade module. Until then -# if we want to be 'stable' we really need to be using it as a passthrough - -import traceback - -import shade - - -def main(): - argument_spec = openstack_full_argument_spec( - description=dict(required=True, type='str'), - service_name=dict(required=True, type='str'), - service_type=dict(required=True, type='str'), - url=dict(required=True, type='str'), - interface=dict(required=True, type='str'), - endpoint_region=dict(required=True, type='str') - ) - module = AnsibleModule(argument_spec) - - try: - description = module.params.pop('description') - service_name = module.params.pop('service_name') - service_type = module.params.pop('service_type') - url = module.params.pop('url') - interface = module.params.pop('interface') - endpoint_region = module.params.pop('endpoint_region') - - changed = False - service = None - endpoint = None - - cloud = shade.operator_cloud(**module.params) - - for _service in cloud.keystone_client.services.list(): - if _service.type == service_type: - service = _service - if service.name != service_name or \ - service.description != description: - changed = True - cloud.keystone_client.services.update( - service, - name=service_name, - description=description) - break - else: - changed = True - service = cloud.keystone_client.services.create( - name=service_name, - service_type=service_type, - description=description) - - for _endpoint in cloud.keystone_client.endpoints.list(): - if _endpoint.service_id == service.id and \ - _endpoint.interface == interface: - endpoint = _endpoint - if endpoint.url != url: - changed = True - cloud.keystone_client.endpoints.update( - endpoint, url=url) - break - else: - changed = True - cloud.keystone_client.endpoints.create( - service=service.id, - url=url, - interface=interface, - region=endpoint_region) - - module.exit_json(changed=changed) - except Exception: - module.exit_json(failed=True, changed=True, - msg=repr(traceback.format_exc())) - -# import module snippets -from ansible.module_utils.basic import * # noqa -from ansible.module_utils.openstack import * # noqa -if __name__ == '__main__': - main() diff --git a/docker/kolla-toolbox/kolla_keystone_user.py b/docker/kolla-toolbox/kolla_keystone_user.py deleted file mode 100644 index d8af461ae2..0000000000 --- a/docker/kolla-toolbox/kolla_keystone_user.py +++ /dev/null @@ -1,91 +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 file is a barebones file needed to file a gap until Ansible 2.0. No -# error checking, no deletions, no updates. Idempotent creation only. - -# If you look closely, you will see we arent _really_ using the shade module -# we just use it to slightly abstract the authentication model. As patches land -# in upstream shade we will be able to use more of the shade module. Until then -# if we want to be 'stable' we really need to be using it as a passthrough - -import traceback - -import shade - - -def main(): - argument_spec = openstack_full_argument_spec( - password=dict(required=True, type='str'), - project=dict(required=True, type='str'), - role=dict(required=True, type='str'), - user=dict(required=True, type='str') - ) - module = AnsibleModule(argument_spec) - - try: - password = module.params.pop('password') - project_name = module.params.pop('project') - role_name = module.params.pop('role') - user_name = module.params.pop('user') - - changed = False - project = None - role = None - user = None - - cloud = shade.operator_cloud(**module.params) - - for _project in cloud.keystone_client.projects.list(): - if _project.name == project_name: - project = _project - - for _role in cloud.keystone_client.roles.list(): - if _role.name == role_name: - role = _role - - for _user in cloud.keystone_client.users.list(): - if _user.name == user_name: - user = _user - - if not project: - changed = True - project = cloud.keystone_client.projects.create( - name=project_name, domain='default') - - if not role: - changed = True - role = cloud.keystone_client.roles.create(name=role_name) - - if not user: - changed = True - user = cloud.keystone_client.users.create(name=user_name, - password=password, - project=project) - cloud.keystone_client.roles.grant(role=role, - user=user, - project=project) - - module.exit_json(changed=changed) - except Exception: - module.exit_json(failed=True, changed=True, - msg=repr(traceback.format_exc())) - -# import module snippets -from ansible.module_utils.basic import * # noqa -from ansible.module_utils.openstack import * # noqa -if __name__ == '__main__': - main() diff --git a/docker/kolla-toolbox/kolla_sanity.py b/docker/kolla-toolbox/kolla_sanity.py deleted file mode 100644 index b950204f40..0000000000 --- a/docker/kolla-toolbox/kolla_sanity.py +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/python - -# Copyright 2015 Intel corporation -# -# 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 file is a barebones file needed to file a gap until Ansible 2.0. No -# error checking, no deletions, no updates. Idempotent creation only. - -# If you look closely, you will see we arent _really_ using the shade module -# we just use it to slightly abstract the authentication model. As patches land -# in upstream shade we will be able to use more of the shade module. Until then -# if we want to be 'stable' we really need to be using it as a passthrough - -import tempfile -import traceback - -import shade - - -class SanityChecks(object): - @staticmethod - def keystone(cloud): - [tenant for tenant in cloud.keystone_client.tenants.list()] - - @staticmethod - def glance(cloud): - with tempfile.NamedTemporaryfile(suffix='qcow2') as image: - cloud.create_image("test", filename=image.name, - disk_format="qcow2", container_format="bare") - testid = cloud.get_image_id("test") - cloud.delete_image(testid) - - @staticmethod - def cinder(cloud): - [volume for volume in cloud.cinder_client.volumes.list()] - - @staticmethod - def swift(cloud): - [container for container in cloud.swift_client.list()] - - -def main(): - module = AnsibleModule( - argument_spec=openstack_full_argument_spec( - password=dict(required=True, type='str'), - project=dict(required=True, type='str'), - role=dict(required=True, type='str'), - user=dict(required=True, type='str'), - service=dict(required=True, type='str'), - ) - ) - - try: - changed = True - cloud = shade.operator_cloud(**module.params) - - getattr(SanityChecks, module.params.pop("service"))(cloud) - - module.exit_json(changed=changed) - except Exception: - module.exit_json(failed=True, changed=True, - msg=repr(traceback.format_exc())) - -# import module snippets -from ansible.module_utils.basic import * # noqa -from ansible.module_utils.openstack import * # noqa -if __name__ == '__main__': - main() diff --git a/docker/kubetoolbox/Dockerfile.j2 b/docker/kubetoolbox/Dockerfile.j2 deleted file mode 100644 index 0fd631d2e1..0000000000 --- a/docker/kubetoolbox/Dockerfile.j2 +++ /dev/null @@ -1,21 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block kubetoolbox_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% set kubetoolbox_packages = [ - 'jq', - 'ceph-common', - 'ipmitool' -] %} - -{{ macros.install_packages(kubetoolbox_packages | customizable("packages")) }} - -RUN curl -o /usr/bin/kubectl http://storage.googleapis.com/kubernetes-release/release/v1.4.0/bin/linux/amd64/kubectl \ - && chmod 755 /usr/bin/kubectl - -{% block kubetoolbox_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/kuryr/kuryr-base/Dockerfile.j2 b/docker/kuryr/kuryr-base/Dockerfile.j2 deleted file mode 100644 index 1269bced86..0000000000 --- a/docker/kuryr/kuryr-base/Dockerfile.j2 +++ /dev/null @@ -1,24 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block kuryr_base_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% elif install_type == 'source' %} - -ADD kuryr-base-archive /kuryr-base-source -# NOTE(Jeffrey4l): remove kuryr-lib constraint in upper-constraints.txt file. -# Otherwise, it will be failed. -RUN ln -s kuryr-base-source/* kuryr-base \ - && sed -i 's|^kuryr-lib===.*$||g' requirements/upper-constraints.txt \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /kuryr-base - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -{% block kuryr_base_footer %}{% endblock %} diff --git a/docker/kuryr/kuryr-base/extend_start.sh b/docker/kuryr/kuryr-base/extend_start.sh deleted file mode 100644 index ee7045d04d..0000000000 --- a/docker/kuryr/kuryr-base/extend_start.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - mkdir -p /usr/lib/docker/plugins/kuryr - exit 0 -fi diff --git a/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 b/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 deleted file mode 100644 index 7f64cf4dad..0000000000 --- a/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 +++ /dev/null @@ -1,21 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}kuryr-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block kuryr_libnetwork_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% elif install_type == 'source' %} - -ADD kuryr-libnetwork-archive /kuryr-libnetwork-source -RUN ln -s kuryr-libnetwork-source/* kuryr-libnetwork \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /kuryr-libnetwork - -{% endif %} - -{% block kuryr_libnetwork_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/macros.j2 b/docker/macros.j2 deleted file mode 100644 index 89ce4ec2d3..0000000000 --- a/docker/macros.j2 +++ /dev/null @@ -1,19 +0,0 @@ -{% macro install_packages(packages) -%} -{% if packages is defined and packages|length > 0 -%} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] -%} - RUN yum -y install {{ packages | join(' ') }} && yum clean all - {%- elif base_distro in ['ubuntu', 'debian'] -%} - {#- - debian_package_install is a utility method to build up an appropriate - set of commands to install packages in a debian-based environment that - may include URL links to a .deb package (e.g, heka) - -#} - RUN {{ debian_package_install(packages) }} - {%- endif %} -{%- endif %} -{%- endmacro %} - - -{% macro install_pip(packages) %} -RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt {% for package in packages %}{{ package }} {% endfor %} -{% endmacro %} diff --git a/docker/magnum/magnum-api/Dockerfile.j2 b/docker/magnum/magnum-api/Dockerfile.j2 deleted file mode 100644 index a09c057cb7..0000000000 --- a/docker/magnum/magnum-api/Dockerfile.j2 +++ /dev/null @@ -1,24 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}magnum-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block magnum_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set magnum_api_packages = ['openstack-magnum-api'] %} - {% elif base_distro in ['ubuntu'] %} - {% set magnum_api_packages = ['magnum-api'] %} - {% endif %} -{{ macros.install_packages(magnum_api_packages | customizable("packages")) }} -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_magnum_extend_start -RUN chmod 755 /usr/local/bin/kolla_magnum_extend_start - -{% block magnum_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER magnum diff --git a/docker/magnum/magnum-api/extend_start.sh b/docker/magnum/magnum-api/extend_start.sh deleted file mode 100644 index 0f92f6e7bf..0000000000 --- a/docker/magnum/magnum-api/extend_start.sh +++ /dev/null @@ -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 - magnum-db-manage upgrade - exit 0 -fi diff --git a/docker/magnum/magnum-base/Dockerfile.j2 b/docker/magnum/magnum-base/Dockerfile.j2 deleted file mode 100644 index 8f5b43dbf9..0000000000 --- a/docker/magnum/magnum-base/Dockerfile.j2 +++ /dev/null @@ -1,32 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block magnum_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux'] %} - {% set magnum_base_packages = ['openstack-magnum-common'] %} - {% elif base_distro in ['ubuntu'] %} - {% set magnum_base_packages = ['magnum-common'] %} - {% endif %} -{{ macros.install_packages(magnum_base_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD magnum-base-archive /magnum-base-source -RUN ln -s magnum-base-source/* magnum \ - && useradd --user-group magnum \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /magnum \ - && mkdir -p /etc/magnum /home/magnum /var/lib/magnum \ - && cp -r /magnum/etc/magnum/* /etc/magnum \ - && chown -R magnum: /etc/magnum /home/magnum /var/lib/magnum - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla magnum \ - && touch /usr/local/bin/kolla_magnum_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_magnum_extend_start diff --git a/docker/magnum/magnum-base/extend_start.sh b/docker/magnum/magnum-base/extend_start.sh deleted file mode 100644 index 2e58c97765..0000000000 --- a/docker/magnum/magnum-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/magnum" ]]; then - mkdir -p /var/log/kolla/magnum -fi -if [[ $(stat -c %a /var/log/kolla/magnum) != "755" ]]; then - chmod 755 /var/log/kolla/magnum -fi - -. /usr/local/bin/kolla_magnum_extend_start diff --git a/docker/magnum/magnum-conductor/Dockerfile.j2 b/docker/magnum/magnum-conductor/Dockerfile.j2 deleted file mode 100644 index 080ef693b5..0000000000 --- a/docker/magnum/magnum-conductor/Dockerfile.j2 +++ /dev/null @@ -1,32 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}magnum-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block magnum_conductor_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set magnum_conductor_packages = [ - 'openstack-magnum-conductor' - ] %} - - {% elif base_distro in ['ubuntu'] %} - {% set magnum_conductor_packages = [ - 'magnum-conductor' - ] %} - - {% endif %} -{{ macros.install_packages(magnum_conductor_packages | customizable("packages")) }} - -# Install kubectl binary -RUN curl -Lo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.2.0/bin/linux/amd64/kubectl \ - && chmod +x /usr/local/bin/kubectl - -{% endif %} - -{% block magnum_conductor_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER magnum diff --git a/docker/manila/manila-api/Dockerfile.j2 b/docker/manila/manila-api/Dockerfile.j2 deleted file mode 100644 index 70908d82c1..0000000000 --- a/docker/manila/manila-api/Dockerfile.j2 +++ /dev/null @@ -1,27 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}manila-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block manila_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['ubuntu'] %} - - {% set manila_api_packages = [ - 'manila-api' - ] %} - -{{ macros.install_packages(manila_api_packages | customizable("packages")) }} - - {% endif%} -{% endif%} - -COPY extend_start.sh /usr/local/bin/kolla_manila_extend_start -RUN chmod 755 /usr/local/bin/kolla_manila_extend_start - -{% block manila_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER manila diff --git a/docker/manila/manila-api/extend_start.sh b/docker/manila/manila-api/extend_start.sh deleted file mode 100644 index bea77dbba4..0000000000 --- a/docker/manila/manila-api/extend_start.sh +++ /dev/null @@ -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 - manila-manage db sync - exit 0 -fi diff --git a/docker/manila/manila-base/Dockerfile.j2 b/docker/manila/manila-base/Dockerfile.j2 deleted file mode 100644 index cd8b70b668..0000000000 --- a/docker/manila/manila-base/Dockerfile.j2 +++ /dev/null @@ -1,63 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block manila_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set manila_base_packages = [ - 'openstack-manila', - 'openvswitch' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set manila_base_packages = [ - 'manila-common', - 'openvswitch-switch' - ] %} - - {% endif %} - -{{ macros.install_packages(manila_base_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set manila_base_packages = ['openvswitch'] %} - - {% elif base_distro in ['ubuntu', 'debian'] %} - - {% set manila_base_packages = ['openvswitch-switch'] %} - - {% endif %} - -{{ macros.install_packages(manila_base_packages | customizable("packages")) }} - -ADD manila-base-archive /manila-base-source -RUN ln -s manila-base-source/* manila \ - && useradd --user-group manila \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /manila \ - && mkdir -p /etc/manila /var/lib/manila /var/cache/manila /home/manila \ - && cp -r /manila/etc/manila/* /etc/manila/ \ - && chown -R manila: /etc/manila /var/lib/manila /var/cache/manila /home/manila \ - && 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/manila/rootwrap.conf - -COPY manila_sudoers /etc/sudoers.d/kolla_manila_sudoers -RUN chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_manila_sudoers - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN touch /usr/local/bin/kolla_manila_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_manila_extend_start - -RUN usermod -a -G kolla manila - -{% block manila_base_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/manila/manila-base/extend_start.sh b/docker/manila/manila-base/extend_start.sh deleted file mode 100644 index c018416a33..0000000000 --- a/docker/manila/manila-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/manila" ]]; then - mkdir -p /var/log/kolla/manila -fi -if [[ $(stat -c %a /var/log/kolla/manila) != "755" ]]; then - chmod 755 /var/log/kolla/manila -fi - -. /usr/local/bin/kolla_manila_extend_start diff --git a/docker/manila/manila-base/manila_sudoers b/docker/manila/manila-base/manila_sudoers deleted file mode 100644 index 623e6789b3..0000000000 --- a/docker/manila/manila-base/manila_sudoers +++ /dev/null @@ -1 +0,0 @@ -manila ALL = (root) NOPASSWD: /var/lib/kolla/venv/bin/manila-rootwrap /etc/manila/rootwrap.conf * diff --git a/docker/manila/manila-data/Dockerfile.j2 b/docker/manila/manila-data/Dockerfile.j2 deleted file mode 100644 index ec538dddda..0000000000 --- a/docker/manila/manila-data/Dockerfile.j2 +++ /dev/null @@ -1,29 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}manila-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block manila_data_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% elif base_distro in ['ubuntu'] %} - - {% set manila_data_packages = [ - 'manila-data' - ] %} - -{{ macros.install_packages(manila_data_packages | customizable("packages")) }} - - {% endif %} -{% endif %} - -{% block manila_data_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER manila diff --git a/docker/manila/manila-scheduler/Dockerfile.j2 b/docker/manila/manila-scheduler/Dockerfile.j2 deleted file mode 100644 index 56ee3ad3f7..0000000000 --- a/docker/manila/manila-scheduler/Dockerfile.j2 +++ /dev/null @@ -1,24 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}manila-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block manila_scheduler_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['ubuntu'] %} - - {% set manila_scheduler_packages = [ - 'manila-scheduler' - ] %} - -{{ macros.install_packages(manila_scheduler_packages | customizable("packages")) }} - - {% endif%} -{% endif%} - -{% block manila_scheduler_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER manila diff --git a/docker/manila/manila-share/Dockerfile.j2 b/docker/manila/manila-share/Dockerfile.j2 deleted file mode 100644 index 42e8d1d533..0000000000 --- a/docker/manila/manila-share/Dockerfile.j2 +++ /dev/null @@ -1,24 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}manila-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block manila_share_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set manila_share_packages = [ - 'openstack-manila-share' - ] %} - -{{ macros.install_packages(manila_share_packages | customizable("packages")) }} - - {% endif %} -{% endif %} - -{% block manila_share_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER manila diff --git a/docker/mariadb/Dockerfile.j2 b/docker/mariadb/Dockerfile.j2 deleted file mode 100644 index 44ecf4b52a..0000000000 --- a/docker/mariadb/Dockerfile.j2 +++ /dev/null @@ -1,45 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block mariadb_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set mariadb_packages = [ - 'MariaDB-Galera-server', - 'MariaDB-client', - 'rsync', - 'galera', - 'socat', - 'hostname', - 'percona-xtrabackup', - 'pv', - 'tar', - 'expect' - ] %} -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set mariadb_packages = [ - 'mariadb-galera-server', - 'percona-xtrabackup', - 'socat', - 'expect' - ] %} -{% endif %} - -{{ macros.install_packages(mariadb_packages | customizable("packages")) }} -COPY mariadb_sudoers /etc/sudoers.d/kolla_mariadb_sudoers -COPY extend_start.sh /usr/local/bin/kolla_extend_start -COPY security_reset.expect /usr/local/bin/kolla_security_reset -RUN chmod 755 /usr/local/bin/kolla_extend_start \ - && chmod 755 /usr/local/bin/kolla_security_reset \ - && chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_mariadb_sudoers \ - && usermod -a -G kolla mysql \ - && rm -rf /var/lib/mysql/* - -{% block mariadb_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER mysql diff --git a/docker/mariadb/extend_start.sh b/docker/mariadb/extend_start.sh deleted file mode 100644 index 8e6be1a1e4..0000000000 --- a/docker/mariadb/extend_start.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -function bootstrap_db { - mysqld_safe --wsrep-new-cluster & - # Wait for the mariadb server to be "Ready" before starting the security reset with a max timeout - # NOTE(huikang): the location of mysql's socket file varies depending on the OS distributions. - # Querying the cluster status has to be executed after the existence of mysql.sock and mariadb.pid. - TIMEOUT=${DB_MAX_TIMEOUT:-60} - while [[ ! -S /var/lib/mysql/mysql.sock ]] && \ - [[ ! -S /var/run/mysqld/mysqld.sock ]] || \ - [[ ! -f /var/lib/mysql/mariadb.pid ]]; do - if [[ ${TIMEOUT} -gt 0 ]]; then - let TIMEOUT-=1 - sleep 1 - else - exit 1 - fi - done -# NOTE(sbezverk): Currently kolla-kubernetes does not use Galera and disables wsrep driver. -# This check will run only for non kolla-kubernetes bootstrap deployments. - if [[ ! "${!KOLLA_KUBERNETES[@]}" ]]; then - CLUSTER_READY=$(mysql -u root --exec="SHOW STATUS LIKE 'wsrep_ready'" | grep ON) - TIMEOUT=${DB_MAX_TIMEOUT:-60} - while [[ -z "${CLUSTER_READY}" ]]; do - if [[ ${TIMEOUT} -gt 0 ]]; then - let TIMEOUT-=1 - sleep 1 - else - exit 1 - fi - done - fi - sudo -E kolla_security_reset - mysql -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;" - mysql -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;" - mysqladmin -uroot -p"${DB_ROOT_PASSWORD}" shutdown -} - -# Only update permissions if permissions need to be updated -if [[ $(stat -c %U:%G /var/lib/mysql) != "mysql:mysql" ]]; then - sudo chown mysql: /var/lib/mysql -fi - -# Create log directory, with appropriate permissions -if [[ ! -d "/var/log/kolla/mariadb" ]]; then - mkdir -p /var/log/kolla/mariadb -fi -if [[ $(stat -c %a /var/log/kolla/mariadb) != "755" ]]; then - chmod 755 /var/log/kolla/mariadb -fi - -# This catches all cases of the BOOTSTRAP variable being set, including empty -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - mysql_install_db - bootstrap_db - exit 0 -fi - -if [[ "${!BOOTSTRAP_ARGS[@]}" ]]; then - ARGS="${BOOTSTRAP_ARGS}" -fi diff --git a/docker/mariadb/mariadb_sudoers b/docker/mariadb/mariadb_sudoers deleted file mode 100644 index c95b1e2ad5..0000000000 --- a/docker/mariadb/mariadb_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /bin/chown mysql\: /var/lib/mysql, /usr/bin/chown mysql\: /var/lib/mysql, /usr/local/bin/kolla_security_reset diff --git a/docker/mariadb/security_reset.expect b/docker/mariadb/security_reset.expect deleted file mode 100644 index af71463fb8..0000000000 --- a/docker/mariadb/security_reset.expect +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/expect -f - -set timeout 10 -spawn mysql_secure_installation -expect { - timeout { send_user "\nFailed to get 'Enter current password for root (enter for none):' prompt\n"; exit 1 } - eof { send_user "\nFailed to get 'Enter current password for root (enter for none):' prompt\n"; exit 1 } - "Enter current password for root (enter for none):" -} -send "\r" -expect { - timeout { send_user "\nFailed to get 'Set root password?' prompt\n"; exit 1 } - eof { send_user "\nFailed to get 'Set root password?' prompt\n"; exit 1 } - "Set root password?" -} -send "y\r" -expect { - timeout { send_user "\nFailed to get 'New password:' prompt\n"; exit 1 } - eof { send_user "\nFailed to get 'New password:' prompt\n"; exit 1 } - "New password:" -} -send "$env(DB_ROOT_PASSWORD)\r" - -expect { - timeout { send_user "\nFailed to get 'Re-enter new password:' prompt\n"; exit 1 } - eof { send_user "\nFailed to get 'Re-enter new password:' prompt\n"; exit 1 } - "Re-enter new password:" -} -send "$env(DB_ROOT_PASSWORD)\r" - -expect { - timeout { send_user "\nFailed to get 'Remove anonymous users?' prompt\n"; exit 1 } - eof { send_user "\nFailed to get 'Remove anonymous users?' prompt\n"; exit 1 } - "Remove anonymous users?" -} -send "y\r" - -expect { - timeout { send_user "\nFailed to get 'Disallow root login remotely?' prompt\n"; exit 1 } - eof { send_user "\nFailed to get 'Disallow root login remotely?' prompt\n"; exit 1 } - "Disallow root login remotely?" -} -send "n\r" - -expect { - timeout { send_user "\nFailed to get 'Remove test database and access to it?' prompt\n"; exit 1 } - eof { send_user "\nFailed to get 'Remove test database and access to it?' prompt\n"; exit 1 } - "Remove test database and access to it?" -} -send "y\r" - -expect { - timeout { send_user "\nFailed to get 'Reload privilege tables now?' prompt\n"; exit 1 } - eof { send_user "\nFailed to get 'Reload privilege tables now?' prompt\n"; exit 1 } - "Reload privilege tables now?" -} -send "y\r" -expect eof diff --git a/docker/memcached/Dockerfile.j2 b/docker/memcached/Dockerfile.j2 deleted file mode 100644 index 933085cf13..0000000000 --- a/docker/memcached/Dockerfile.j2 +++ /dev/null @@ -1,28 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block memcached_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - -{% set user = 'memcached' %} - {% set memcached_packages = ['memcached'] %} -{{ macros.install_packages(memcached_packages | customizable("packages")) }} \ - && usermod -a -G kolla {{ user }} - -{% elif base_distro in ['ubuntu', 'debian'] %} - -{% set user = 'memcache' %} - {% set memcached_packages = ['memcached'] %} -{{ macros.install_packages(memcached_packages | customizable("packages")) }} \ - && usermod -a -G kolla {{ user }} - -{% endif %} - -{% block memcached_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER {{ user }} diff --git a/docker/mistral/mistral-api/Dockerfile.j2 b/docker/mistral/mistral-api/Dockerfile.j2 deleted file mode 100644 index 0b0335fbf7..0000000000 --- a/docker/mistral/mistral-api/Dockerfile.j2 +++ /dev/null @@ -1,24 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}mistral-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block mistral_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set mistral_api_packages = ['openstack-mistral-api'] %} - {% elif base_distro in ['ubuntu'] %} - {% set mistral_api_packages = ['mistral-api'] %} - {% endif %} -{{ macros.install_packages(mistral_api_packages | customizable("packages")) }} -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_mistral_extend_start -RUN chmod 755 /usr/local/bin/kolla_mistral_extend_start - -{% block mistral_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER mistral diff --git a/docker/mistral/mistral-api/extend_start.sh b/docker/mistral/mistral-api/extend_start.sh deleted file mode 100644 index 113adb8a21..0000000000 --- a/docker/mistral/mistral-api/extend_start.sh +++ /dev/null @@ -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 - mistral-db-manage --config-file /etc/mistral/mistral.conf upgrade head - mistral-db-manage --config-file /etc/mistral/mistral.conf populate - exit 0 -fi diff --git a/docker/mistral/mistral-base/Dockerfile.j2 b/docker/mistral/mistral-base/Dockerfile.j2 deleted file mode 100644 index 92aa1cad82..0000000000 --- a/docker/mistral/mistral-base/Dockerfile.j2 +++ /dev/null @@ -1,33 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block mistral_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set mistral_base_packages = ['openstack-mistral-common'] %} -{% elif base_distro in ['ubuntu'] %} - {% set mistral_base_packages = ['mistral-common'] %} -{% endif %} -{{ macros.install_packages(mistral_base_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD mistral-base-archive /mistral-base-source -RUN ln -s mistral-base-source/* mistral \ - && useradd --user-group mistral \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install /mistral \ - && mkdir -p /etc/mistral /home/mistral \ - && cp -r /mistral/etc/* /etc/mistral/ \ - && chown -R mistral: /etc/mistral /home/mistral - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla mistral \ - && touch /usr/local/bin/kolla_mistral_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_mistral_extend_start diff --git a/docker/mistral/mistral-base/extend_start.sh b/docker/mistral/mistral-base/extend_start.sh deleted file mode 100644 index ac2980d6c7..0000000000 --- a/docker/mistral/mistral-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/mistral" ]]; then - mkdir -p /var/log/kolla/mistral -fi -if [[ $(stat -c %a /var/log/kolla/mistral) != "755" ]]; then - chmod 755 /var/log/kolla/mistral -fi - -. /usr/local/bin/kolla_mistral_extend_start diff --git a/docker/mistral/mistral-engine/Dockerfile.j2 b/docker/mistral/mistral-engine/Dockerfile.j2 deleted file mode 100644 index 2fe8dcd49d..0000000000 --- a/docker/mistral/mistral-engine/Dockerfile.j2 +++ /dev/null @@ -1,22 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}mistral-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block mistral_engine_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set mistral_engine_packages = ['openstack-mistral-engine'] %} - {% elif base_distro in ['ubuntu'] %} - {% set mistral_engine_packages = ['mistral-engine'] %} - {% endif %} -{{ macros.install_packages(mistral_engine_packages | customizable("packages")) }} - -{% endif %} -{% block mistral_engine_footer %}{% endblock %} -{% block footer %}{% endblock %} - -{{ include_footer }} - -USER mistral diff --git a/docker/mistral/mistral-executor/Dockerfile.j2 b/docker/mistral/mistral-executor/Dockerfile.j2 deleted file mode 100644 index ed4977baeb..0000000000 --- a/docker/mistral/mistral-executor/Dockerfile.j2 +++ /dev/null @@ -1,22 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}mistral-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block mistral_executor_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set mistral_executor_packages = ['openstack-mistral-executor'] %} - {% elif base_distro in ['ubuntu'] %} - {% set mistral_executor_packages = ['mistral-executor'] %} - {% endif %} -{{ macros.install_packages(mistral_executor_packages | customizable("packages")) }} - -{% endif %} -{% block mistral_executor_footer %}{% endblock %} -{% block footer %}{% endblock %} - -{{ include_footer }} - -USER mistral diff --git a/docker/mongodb/Dockerfile.j2 b/docker/mongodb/Dockerfile.j2 deleted file mode 100644 index 0de18edf6f..0000000000 --- a/docker/mongodb/Dockerfile.j2 +++ /dev/null @@ -1,36 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block mongodb_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set mongodb_packages = [ - 'mongodb', - 'mongodb-server' - ] %} -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set mongodb_packages = [ - 'mongodb-server' - ] %} -{% endif %} - -{{ macros.install_packages(mongodb_packages | customizable("packages")) }} - -RUN mkdir -p /var/lib/mongodb /home/mongodb \ - && chown -R mongodb: /var/lib/mongodb /home/mongodb - -COPY mongodb_sudoers /etc/sudoers.d/kolla_mongodb_sudoers -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla mongodb \ - && chmod 755 /usr/local/bin/kolla_extend_start \ - && chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_mongodb_sudoers - -{% block mongodb_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER mongodb diff --git a/docker/mongodb/extend_start.sh b/docker/mongodb/extend_start.sh deleted file mode 100644 index 8d8933f903..0000000000 --- a/docker/mongodb/extend_start.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -echo "run extended start" - -if [[ ! -d "/var/log/kolla/mongodb" ]]; then - mkdir -p /var/log/kolla/mongodb -fi - -if [[ $(stat -c %a /var/log/kolla/mongodb) != "755" ]]; then - chmod 755 /var/log/kolla/mongodb -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 mongodb: /var/lib/mongodb/ - exit 0 -fi diff --git a/docker/mongodb/mongodb_sudoers b/docker/mongodb/mongodb_sudoers deleted file mode 100644 index 8a8f4e3cc8..0000000000 --- a/docker/mongodb/mongodb_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown mongodb\: /var/lib/mongodb/, /bin/chown mongodb\: /var/lib/mongodb/ diff --git a/docker/multipathd/Dockerfile.j2 b/docker/multipathd/Dockerfile.j2 deleted file mode 100644 index 391008e11f..0000000000 --- a/docker/multipathd/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block multipathd_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set multipathd_packages = ['device-mapper-multipath'] %} -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set multipathd_packages = ['multipath-tools'] %} -{% endif %} - -{{ macros.install_packages(multipathd_packages | customizable("packages")) }} - -{% block multipathd_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/murano/murano-api/Dockerfile.j2 b/docker/murano/murano-api/Dockerfile.j2 deleted file mode 100644 index 2a71f98cf1..0000000000 --- a/docker/murano/murano-api/Dockerfile.j2 +++ /dev/null @@ -1,28 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}murano-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block murano_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} -RUN ln -s /var/cache/murano/meta/io.murano.zip /io.murano.zip - {% set murano_api_packages = ['openstack-murano-api'] %} - {% elif base_distro in ['ubuntu'] %} -RUN ln -s /usr/share/murano-common/io.murano.zip /io.murano.zip - {% set murano_api_packages = ['murano-api'] %} - {% endif %} - -{{ macros.install_packages(murano_api_packages | customizable("packages")) }} - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_murano_extend_start -RUN chmod 755 /usr/local/bin/kolla_murano_extend_start - -{% block murano_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER murano diff --git a/docker/murano/murano-api/extend_start.sh b/docker/murano/murano-api/extend_start.sh deleted file mode 100644 index d46b2b0afb..0000000000 --- a/docker/murano/murano-api/extend_start.sh +++ /dev/null @@ -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 - murano-db-manage --config-file /etc/murano/murano.conf upgrade - exit 0 -fi diff --git a/docker/murano/murano-base/Dockerfile.j2 b/docker/murano/murano-base/Dockerfile.j2 deleted file mode 100644 index 30b4d5fcd6..0000000000 --- a/docker/murano/murano-base/Dockerfile.j2 +++ /dev/null @@ -1,39 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block murano_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set murano_base_packages = ['openstack-murano-common'] %} - {% elif base_distro in ['ubuntu'] %} - {% set murano_base_packages = ['murano-common'] %} - {% endif %} - -{{ macros.install_packages(murano_base_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD murano-base-archive /murano-base-source -RUN ln -s murano-base-source/* murano \ - && useradd --user-group murano \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /murano \ - && mkdir -p /etc/murano /home/murano \ - && cp -r /murano/etc/murano/* /etc/murano/ \ - && chown -R murano: /etc/murano /home/murano \ - && cd murano/meta/io.murano \ - && zip -r /io.murano.zip * - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla murano \ - && touch /usr/local/bin/kolla_murano_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_murano_extend_start - -{% block murano_base_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/murano/murano-base/extend_start.sh b/docker/murano/murano-base/extend_start.sh deleted file mode 100644 index 4d3b842b2d..0000000000 --- a/docker/murano/murano-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/murano" ]]; then - mkdir -p /var/log/kolla/murano -fi -if [[ $(stat -c %a /var/log/kolla/murano) != "755" ]]; then - chmod 755 /var/log/kolla/murano -fi - -. /usr/local/bin/kolla_murano_extend_start diff --git a/docker/murano/murano-engine/Dockerfile.j2 b/docker/murano/murano-engine/Dockerfile.j2 deleted file mode 100644 index 846a6e4bee..0000000000 --- a/docker/murano/murano-engine/Dockerfile.j2 +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}murano-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block murano_engine_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set murano_engine_packages = ['openstack-murano-engine'] %} - {% elif base_distro in ['ubuntu'] %} - {% set murano_engine_packages = ['murano-engine'] %} - {% endif %} - -{{ macros.install_packages(murano_engine_packages | customizable("packages")) }} - -{% endif %} - -{% block murano_engine_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER murano diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/docker/neutron/neutron-base/Dockerfile.j2 deleted file mode 100644 index 7ea2b585d7..0000000000 --- a/docker/neutron/neutron-base/Dockerfile.j2 +++ /dev/null @@ -1,96 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block neutron_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set neutron_base_packages = [ - 'openstack-neutron', - 'openstack-neutron-lbaas', - 'openstack-neutron-ml2', - 'openvswitch', - 'python-openvswitch' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set neutron_base_packages = [ - 'iproute2', - 'neutron-plugin-ml2', - 'neutron-server', - 'openvswitch-switch', - 'neutron-lbaas-common', - 'python-openvswitch' - ] %} - - {% endif %} - -{{ macros.install_packages(neutron_base_packages | customizable("packages")) }} - - {% if base_distro in ['ubuntu'] %} - -RUN mkdir -p /usr/share/neutron \ - && ln -s /etc/neutron/api-paste.ini /usr/share/neutron/api-paste.ini - - {% endif %} - -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set neutron_base_packages = [ - 'conntrack-tools', - 'dnsmasq', - 'dnsmasq-utils', - 'ipset', - 'openvswitch', - 'python-openvswitch', - 'uuid' - ] %} - - {% elif base_distro in ['ubuntu', 'debian'] %} - - {% set neutron_base_packages = [ - 'conntrack', - 'dnsmasq', - 'dnsmasq-utils', - 'iproute2', - 'ipset', - 'iptables', - 'iputils-arping', - 'openvswitch-switch', - 'python-openvswitch', - 'uuid-runtime' - ] %} - - {% endif %} - -{{ macros.install_packages(neutron_base_packages | customizable("packages")) }} - -ADD neutron-base-archive /neutron-base-source -RUN ln -s neutron-base-source/* neutron \ - && useradd --user-group neutron \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /neutron \ - && mkdir -p /etc/neutron /usr/share/neutron /var/lib/neutron /home/neutron \ - && cp -r /neutron/etc/* /etc/neutron/ \ - && cp -r /neutron/etc/neutron/* /etc/neutron/ \ - && cp /neutron/etc/api-paste.ini /usr/share/neutron \ - && mv /etc/neutron/neutron/ /etc/neutron/plugins/ \ - && chown -R neutron: /etc/neutron /usr/share/neutron /var/lib/neutron /home/neutron \ - && 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/neutron/rootwrap.conf - -{% endif %} - -COPY neutron_sudoers /etc/sudoers.d/kolla_neutron_sudoers -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla neutron \ - && chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_neutron_sudoers \ - && touch /usr/local/bin/kolla_neutron_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_neutron_extend_start - -{% block neutron_base_footer %}{% endblock %} diff --git a/docker/neutron/neutron-base/extend_start.sh b/docker/neutron/neutron-base/extend_start.sh deleted file mode 100644 index 12307fca19..0000000000 --- a/docker/neutron/neutron-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/neutron" ]]; then - mkdir -p /var/log/kolla/neutron -fi -if [[ $(stat -c %a /var/log/kolla/neutron) != "755" ]]; then - chmod 755 /var/log/kolla/neutron -fi - -. /usr/local/bin/kolla_neutron_extend_start diff --git a/docker/neutron/neutron-base/ip_wrapper.py b/docker/neutron/neutron-base/ip_wrapper.py deleted file mode 100644 index 3496be768f..0000000000 --- a/docker/neutron/neutron-base/ip_wrapper.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env 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 file exists because we want to create and delete any network -# namespaces from the host mount namespace. This allows the host to -# access all of the neutron network namespaces as well as all -# containers that bind mount /run/netns from the host. - -# This is required for "thin" neutron containers to function properly. However, -# due to a missing feature/bug in Docker it is not possible to use this script -# at this time. Once Docker updates with this feature we will usre this again. - -import nsenter -import subprocess # nosec -import sys - - -def host_mnt_exec(cmd): - try: - with nsenter.ExitStack() as stack: - stack.enter_context( - nsenter.Namespace( - '1', - 'mnt', - proc='/var/lib/kolla/host_proc/')) - process_ = subprocess.Popen(cmd) # nosec - - except Exception as e: - print( - "An error has occurred with a component that Kolla manages." - " Please file a bug") - print("Error: ", e) - - return process_ - - -if len(sys.argv) > 2: - # We catch all commands that ip will accept that refer - # to creating or deleteing a Network namespace - if str(sys.argv[1]).startswith("net") and ( - str(sys.argv[2]).startswith("a") or - str(sys.argv[2]).startswith("d")): - # This cmd is executed in the host mount namespace - cmd = ["/usr/bin/env", "ip"] + sys.argv[1:] - sys.exit(host_mnt_exec(cmd).returncode) - else: - cmd = ["/var/lib/kolla/ip"] + sys.argv[1:] -else: - cmd = ["/var/lib/kolla/ip"] - - if len(sys.argv) == 2: - cmd = cmd + sys.argv[1:] - -process_ = subprocess.Popen(cmd) # nosec -sys.exit(process_.returncode) diff --git a/docker/neutron/neutron-base/neutron_sudoers b/docker/neutron/neutron-base/neutron_sudoers deleted file mode 100644 index ad4489200c..0000000000 --- a/docker/neutron/neutron-base/neutron_sudoers +++ /dev/null @@ -1 +0,0 @@ -neutron ALL = (root) NOPASSWD: /var/lib/kolla/venv/bin/neutron-rootwrap /etc/neutron/rootwrap.conf * diff --git a/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 b/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 deleted file mode 100644 index 497f220025..0000000000 --- a/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 +++ /dev/null @@ -1,24 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block neutron_dhcp_agent_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['ubuntu', 'debian'] %} - {% if install_type == 'binary' %} - - {% set neutron_dhcp_agent_packages = [ - 'neutron-dhcp-agent' - ] %} - -{{ macros.install_packages(neutron_dhcp_agent_packages | customizable("packages")) }} - - {% endif %} -{% endif %} - -{% block neutron_dhcp_agent_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER neutron diff --git a/docker/neutron/neutron-l3-agent/Dockerfile.j2 b/docker/neutron/neutron-l3-agent/Dockerfile.j2 deleted file mode 100644 index 235ced6a3a..0000000000 --- a/docker/neutron/neutron-l3-agent/Dockerfile.j2 +++ /dev/null @@ -1,31 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block neutron_l3_agent_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['ubuntu', 'debian'] %} - - {% set neutron_l3_agent_packages = [ - 'neutron-l3-agent' - ] %} - - {% endif %} - -{% elif install_type == 'source' %} - - {% set neutron_l3_agent_packages = [ - 'keepalived' - ] %} - -{% endif %} - -{{ macros.install_packages(neutron_l3_agent_packages | customizable("packages")) }} - -{% block neutron_l3_agent_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER neutron diff --git a/docker/neutron/neutron-lbaas-agent/Dockerfile.j2 b/docker/neutron/neutron-lbaas-agent/Dockerfile.j2 deleted file mode 100644 index 9046712310..0000000000 --- a/docker/neutron/neutron-lbaas-agent/Dockerfile.j2 +++ /dev/null @@ -1,50 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block neutron_lbaas_agent_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% set neutron_lbaas_agent_packages = [ - 'haproxy', - 'net-tools' -] %} -{{ macros.install_packages(neutron_lbaas_agent_packages | customizable("packages")) }} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set neutron_lbaas_agent_packages = [ - 'openstack-neutron-lbaas' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set neutron_lbaas_agent_packages = [ - 'neutron-lbaas-common', - 'neutron-lbaasv2-agent', - 'python-neutron-lbaas' - ] %} - - {% endif %} - -{{ macros.install_packages(neutron_lbaas_agent_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD neutron-lbaas-agent-archive /neutron-lbaas-agent-source -RUN ln -s neutron-lbaas-agent-source/* neutron_lbaas \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /neutron_lbaas \ - && cp /neutron_lbaas/etc/neutron/rootwrap.d/* /etc/neutron/rootwrap.d \ - && 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/neutron/rootwrap.conf - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start -RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start - -{% block neutron_lbaas_agent_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER neutron diff --git a/docker/neutron/neutron-lbaas-agent/extend_start.sh b/docker/neutron/neutron-lbaas-agent/extend_start.sh deleted file mode 100644 index 117fa04856..0000000000 --- a/docker/neutron/neutron-lbaas-agent/extend_start.sh +++ /dev/null @@ -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 - neutron-db-manage --subproject neutron-lbaas --config-file /etc/neutron/neutron.conf upgrade head - exit 0 -fi diff --git a/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 b/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 deleted file mode 100644 index 010c312d0e..0000000000 --- a/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 +++ /dev/null @@ -1,40 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block neutron_linuxbridge_agent_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set neutron_linuxbridge_agent_packages = [ - 'ebtables', - 'openstack-neutron-linuxbridge' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set neutron_linuxbridge_agent_packages = [ - 'ebtables', - 'neutron-plugin-linuxbridge-agent' - ] %} - - {% endif %} - -{% elif install_type == 'source' %} - - {% set neutron_linuxbridge_agent_packages = [ - 'bridge-utils', - 'ebtables' - ] %} - -{% endif %} - -{{ macros.install_packages(neutron_linuxbridge_agent_packages | customizable("packages")) }} - -{% block neutron_linuxbridge_agent_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER neutron diff --git a/docker/neutron/neutron-metadata-agent/Dockerfile.j2 b/docker/neutron/neutron-metadata-agent/Dockerfile.j2 deleted file mode 100644 index 383120501f..0000000000 --- a/docker/neutron/neutron-metadata-agent/Dockerfile.j2 +++ /dev/null @@ -1,31 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block neutron_metadata_agent_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['ubuntu', 'debian'] %} - {% if install_type == 'binary' %} - - {% set neutron_metadata_agent_packages = [ - 'neutron-metadata-agent' - ] %} - - {% endif %} -{% endif %} - -{{ macros.install_packages(neutron_metadata_agent_packages | customizable("packages")) }} - -COPY neutron_sudoers /etc/sudoers.d/kolla_neutron_metadata_sudoers -COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start -RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \ - && chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_neutron_metadata_sudoers \ - && usermod -a -G kolla neutron - -{% block neutron_metadata_agent_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER neutron diff --git a/docker/neutron/neutron-metadata-agent/extend_start.sh b/docker/neutron/neutron-metadata-agent/extend_start.sh deleted file mode 100644 index c46f60f555..0000000000 --- a/docker/neutron/neutron-metadata-agent/extend_start.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# Only update permissions if permissions need to be updated -if [[ $(stat -c %U:%G /var/lib/neutron/kolla) != "neutron:neutron" ]]; then - sudo chown neutron: /var/lib/neutron/kolla -fi diff --git a/docker/neutron/neutron-metadata-agent/neutron_sudoers b/docker/neutron/neutron-metadata-agent/neutron_sudoers deleted file mode 100644 index 17b8b3dee2..0000000000 --- a/docker/neutron/neutron-metadata-agent/neutron_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /bin/chown neutron\: /var/lib/neutron/kolla, /usr/bin/chown neutron\: /var/lib/neutron/kolla diff --git a/docker/neutron/neutron-metering-agent/Dockerfile.j2 b/docker/neutron/neutron-metering-agent/Dockerfile.j2 deleted file mode 100644 index b0133aaf68..0000000000 --- a/docker/neutron/neutron-metering-agent/Dockerfile.j2 +++ /dev/null @@ -1,25 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block neutron_metering_agent_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set neutron_metering_agent_packages = ['openstack-neutron-metering-agent'] %} - {% elif base_distro in ['ubuntu', 'debian'] %} - {% set neutron_metering_agent_packages = ['neutron-metering-agent'] %} - {% endif %} - -{{ macros.install_packages(neutron_metering_agent_packages | customizable("packages")) }} - -{% endif %} - - -{% block neutron_metering_agent_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER neutron diff --git a/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 b/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 deleted file mode 100644 index d41f71a8b9..0000000000 --- a/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 +++ /dev/null @@ -1,32 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block neutron_openvswitch_agent_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set neutron_openvswitch_agent_packages = [ - 'openstack-neutron-openvswitch', - 'openvswitch' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set neutron_openvswitch_agent_packages = [ - 'neutron-plugin-openvswitch-agent', - 'openvswitch-switch' - ] %} - - {% endif %} -{% endif %} - -{{ macros.install_packages(neutron_openvswitch_agent_packages | customizable("packages")) }} - -{% block neutron_openvswitch_agent_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER neutron diff --git a/docker/neutron/neutron-server/Dockerfile.j2 b/docker/neutron/neutron-server/Dockerfile.j2 deleted file mode 100644 index 1fee58600b..0000000000 --- a/docker/neutron/neutron-server/Dockerfile.j2 +++ /dev/null @@ -1,40 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block neutron_server_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set neutron_server_packages = [ - 'openstack-neutron-lbaas', - 'openstack-neutron-vpnaas', - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set neutron_server_packages = [ - 'neutron-lbaasv2-agent', - 'python-neutron-lbaas', - 'python-neutron-vpnaas', - ] %} - - {% endif %} -{% endif %} - -{{ macros.install_packages(neutron_server_packages | customizable("packages")) }} - -ADD plugins-archive / -COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start -RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \ - && if [ "$(ls /plugins)" ]; then \ - pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /plugins/*; \ - fi - -{% block neutron_server_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER neutron diff --git a/docker/neutron/neutron-server/extend_start.sh b/docker/neutron/neutron-server/extend_start.sh deleted file mode 100644 index dba1e632f2..0000000000 --- a/docker/neutron/neutron-server/extend_start.sh +++ /dev/null @@ -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 - neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head - exit 0 -fi diff --git a/docker/neutron/neutron-sfc-agent/Dockerfile.j2 b/docker/neutron/neutron-sfc-agent/Dockerfile.j2 deleted file mode 100644 index 2c30a2242b..0000000000 --- a/docker/neutron/neutron-sfc-agent/Dockerfile.j2 +++ /dev/null @@ -1,28 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block neutron_networking_sfc_agent_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% elif install_type == 'source' %} - -ADD neutron-sfc-agent-archive /neutron-sfc-agent-source -RUN ln -s neutron-sfc-agent-source/* neutron-sfc-agent \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /neutron-sfc-agent \ - && cp /neutron-sfc-agent/etc/neutron/rootwrap.d/* /etc/neutron/rootwrap.d \ - && 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/neutron/rootwrap.conf - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start -RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start - -{% block neutron_sfc_agent_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER neutron diff --git a/docker/neutron/neutron-sfc-agent/extend_start.sh b/docker/neutron/neutron-sfc-agent/extend_start.sh deleted file mode 100644 index d721b4d7bc..0000000000 --- a/docker/neutron/neutron-sfc-agent/extend_start.sh +++ /dev/null @@ -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 - neutron-db-manage --subproject networking-sfc --config-file /etc/neutron/neutron.conf upgrade head - exit 0 -fi diff --git a/docker/neutron/neutron-vpnaas-agent/Dockerfile.j2 b/docker/neutron/neutron-vpnaas-agent/Dockerfile.j2 deleted file mode 100644 index 32bc1508b5..0000000000 --- a/docker/neutron/neutron-vpnaas-agent/Dockerfile.j2 +++ /dev/null @@ -1,39 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block neutron_vpnaas_agent_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set neutron_vpnaas_agent_packages = [ - 'openswan', - 'openstack-neutron-vpn-agent' - ] %} - {% elif base_distro in ['ubuntu', 'debian'] %} - {% set neutron_vpnaas_agent_packages = [ - 'strongswan', - 'neutron-vpn-agent' - ] %} - {% endif %} - -{{ macros.install_packages(neutron_vpnaas_agent_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD neutron-vpnaas-agent-archive /neutron-vpnaas-agent-source -RUN ln -s neutron-vpnaas-agent-source/* neutron_vpnaas \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /neutron_vpnaas \ - && cp /neutron_vpnaas/etc/neutron/rootwrap.d/* /etc/neutron/rootwrap.d - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start -RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start - -{% block neutron_vpnaas_agent_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER neutron diff --git a/docker/neutron/neutron-vpnaas-agent/extend_start.sh b/docker/neutron/neutron-vpnaas-agent/extend_start.sh deleted file mode 100644 index 40ba0b696e..0000000000 --- a/docker/neutron/neutron-vpnaas-agent/extend_start.sh +++ /dev/null @@ -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 - neutron-db-manage --subproject neutron-vpnaas --config-file /etc/neutron/neutron.conf upgrade head - exit 0 -fi diff --git a/docker/nova/nova-api/Dockerfile.j2 b/docker/nova/nova-api/Dockerfile.j2 deleted file mode 100644 index 13a3dd92c6..0000000000 --- a/docker/nova/nova-api/Dockerfile.j2 +++ /dev/null @@ -1,35 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_api_packages = [ - 'openstack-nova-api' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set nova_api_packages = [ - 'nova-api', - 'python-memcache' - ] %} - - {% endif %} - -{{ macros.install_packages(nova_api_packages | customizable("packages")) }} - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start -RUN chmod 755 /usr/local/bin/kolla_nova_extend_start - -{% block nova_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER nova diff --git a/docker/nova/nova-api/extend_start.sh b/docker/nova/nova-api/extend_start.sh deleted file mode 100644 index 6878a7672b..0000000000 --- a/docker/nova/nova-api/extend_start.sh +++ /dev/null @@ -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 - nova-manage db sync - nova-manage api_db sync - nova-manage db online_data_migrations - exit 0 -fi diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2 deleted file mode 100644 index 7f85706933..0000000000 --- a/docker/nova/nova-base/Dockerfile.j2 +++ /dev/null @@ -1,80 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_base_packages = [ - 'openstack-nova-common', - 'python-keystoneclient', - 'python-cinderclient', - 'bridge-utils', - 'openvswitch' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set nova_base_packages = [ - 'nova-common', - 'python-nova', - 'bridge-utils', - 'openvswitch-switch' - ] %} - - {% endif %} - -{{ macros.install_packages(nova_base_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_base_packages = [ - 'bridge-utils', - 'openvswitch' - ] %} - - {% elif base_distro in ['ubuntu', 'debian'] %} - - {% set nova_base_packages = [ - 'iptables', - 'iproute2', - 'ebtables', - 'dnsmasq', - 'bridge-utils', - 'python-libvirt', - 'openssh-client', - 'openvswitch-switch' - ] %} - - {% endif %} - -{{ macros.install_packages(nova_base_packages | customizable("packages")) }} - -ADD nova-base-archive /nova-base-source -RUN ln -s nova-base-source/* nova \ - && useradd --user-group --create-home --home-dir /var/lib/nova nova \ - && chmod 755 /var/lib/nova \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /nova \ - && mkdir -p /etc/nova /var/lib/nova \ - && cp -r /nova/etc/nova/* /etc/nova/ \ - && chown -R nova: /etc/nova /var/lib/nova \ - && 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/nova/rootwrap.conf - -COPY nova_sudoers /etc/sudoers.d/kolla_nova_sudoers -RUN chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_nova_sudoers - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN touch /usr/local/bin/kolla_nova_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_nova_extend_start - -RUN usermod -a -G kolla nova - -{% block nova_base_footer %}{% endblock %} diff --git a/docker/nova/nova-base/extend_start.sh b/docker/nova/nova-base/extend_start.sh deleted file mode 100644 index eee0f16a1a..0000000000 --- a/docker/nova/nova-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/nova" ]]; then - mkdir -p /var/log/kolla/nova -fi -if [[ $(stat -c %a /var/log/kolla/nova) != "755" ]]; then - chmod 755 /var/log/kolla/nova -fi - -. /usr/local/bin/kolla_nova_extend_start diff --git a/docker/nova/nova-base/nova_sudoers b/docker/nova/nova-base/nova_sudoers deleted file mode 100644 index 6d73da6d35..0000000000 --- a/docker/nova/nova-base/nova_sudoers +++ /dev/null @@ -1 +0,0 @@ -nova ALL = (root) NOPASSWD: /var/lib/kolla/venv/bin/nova-rootwrap /etc/nova/rootwrap.conf * diff --git a/docker/nova/nova-compute-ironic/Dockerfile.j2 b/docker/nova/nova-compute-ironic/Dockerfile.j2 deleted file mode 100644 index 1fd22cef84..0000000000 --- a/docker/nova/nova-compute-ironic/Dockerfile.j2 +++ /dev/null @@ -1,34 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_compute_ironic_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_compute_ironic_packages = [ - 'openstack-nova-compute' - ] %} - -{{ macros.install_packages(nova_compute_ironic_packages | customizable("packages")) }} - - {% elif base_distro in ['ubuntu'] %} - - {% set nova_compute_ironic_packages = [ - 'nova-compute' - ] %} - -{{ macros.install_packages(nova_compute_ironic_packages | customizable("packages")) }} - -RUN rm /etc/nova/nova-compute.conf - - {% endif %} -{% endif %} - -{% block nova_compute_ironic_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER nova diff --git a/docker/nova/nova-compute/Dockerfile.j2 b/docker/nova/nova-compute/Dockerfile.j2 deleted file mode 100644 index 46e280a5f2..0000000000 --- a/docker/nova/nova-compute/Dockerfile.j2 +++ /dev/null @@ -1,96 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_compute_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_compute_packages = [ - 'openstack-nova-compute', - 'openvswitch', - 'sysfsutils', - 'ceph-common', - 'genisoimage', - 'iscsi-initiator-utils', - 'nfs-utils', - 'targetcli', - 'python-rtslib' - ] %} - -{{ macros.install_packages(nova_compute_packages | customizable("packages")) }} - - {% elif base_distro in ['ubuntu'] %} - - # ironic as workaround https://bugs.launchpad.net/packstack/+bug/1430388 - {% set nova_compute_packages = [ - 'nova-compute', - 'openvswitch-switch', - 'sysfsutils', - 'ceph-common', - 'ironic-common', - 'python-ironicclient', - 'genisoimage', - 'nfs-common', - 'open-iscsi', - 'targetcli', - 'python-rtslib' - ] %} - -{{ macros.install_packages(nova_compute_packages | customizable("packages")) }} - -RUN rm -f /etc/nova/nova-compute.conf - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_compute_packages = [ - 'libvirt-devel', - 'openvswitch', - 'qemu-img', - 'sysfsutils', - 'ceph-common', - 'genisoimage', - 'iscsi-initiator-utils', - 'nfs-utils', - 'targetcli', - 'python-rtslib' - ] %} - - {% elif base_distro in ['ubuntu', 'debian'] %} - - {% set nova_compute_packages = [ - 'libvirt-dev', - 'qemu-utils', - 'ceph-common', - 'genisoimage', - 'nfs-common', - 'open-iscsi', - 'targetcli', - 'python-rtslib' - ] %} - -RUN mkdir -p /etc/ceph - - {% endif %} - -{{ macros.install_packages(nova_compute_packages | customizable("packages")) }} - -RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt libvirt-python - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start -RUN chmod 755 /usr/local/bin/kolla_nova_extend_start \ - && rm -f /etc/machine-id - -ENV PATH $PATH:/lib/udev - -{% block nova_compute_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER nova diff --git a/docker/nova/nova-compute/extend_start.sh b/docker/nova/nova-compute/extend_start.sh deleted file mode 100644 index a458625ec6..0000000000 --- a/docker/nova/nova-compute/extend_start.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -if [[ ! -d /var/lib/nova/instances ]]; then - mkdir -p /var/lib/nova/instances -fi diff --git a/docker/nova/nova-conductor/Dockerfile.j2 b/docker/nova/nova-conductor/Dockerfile.j2 deleted file mode 100644 index ebb61a67a7..0000000000 --- a/docker/nova/nova-conductor/Dockerfile.j2 +++ /dev/null @@ -1,31 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_conductor_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_conductor_packages = [ - 'openstack-nova-conductor' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set nova_conductor_packages = [ - 'nova-conductor' - ] %} - - {% endif %} - -{{ macros.install_packages(nova_conductor_packages | customizable("packages")) }} - -{% endif %} - -{% block nova_conductor_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER nova diff --git a/docker/nova/nova-consoleauth/Dockerfile.j2 b/docker/nova/nova-consoleauth/Dockerfile.j2 deleted file mode 100644 index e5a8ad5c48..0000000000 --- a/docker/nova/nova-consoleauth/Dockerfile.j2 +++ /dev/null @@ -1,32 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_consoleauth_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_consoleauth_packages = [ - 'openstack-nova-console' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set nova_consoleauth_packages = [ - 'nova-consoleauth', - 'python-memcache' - ] %} - - {% endif %} - -{{ macros.install_packages(nova_consoleauth_packages | customizable("packages")) }} - -{% endif %} - -{% block nova_consoleauth_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER nova diff --git a/docker/nova/nova-libvirt/Dockerfile.j2 b/docker/nova/nova-libvirt/Dockerfile.j2 deleted file mode 100644 index 7fa39f8190..0000000000 --- a/docker/nova/nova-libvirt/Dockerfile.j2 +++ /dev/null @@ -1,73 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_libvirt_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_libvirt_packages = [ - 'libvirt-daemon', - 'libguestfs', - 'qemu-kvm', - 'libvirt-daemon-driver-nwfilter', - 'libvirt-daemon-config-nwfilter', - 'libvirt-daemon-driver-lxc', - 'ceph-common' - ] %} - -{% elif base_distro == 'ubuntu' %} - - {% set nova_libvirt_packages = [ - 'ceph-common', - 'libvirt-bin', - 'dmidecode', - 'pm-utils', - 'qemu', - 'qemu-block-extra', - 'ebtables', - 'xen-utils-4.6' - ] %} - - {% set libvirt_group = 'libvirtd' %} - -{% elif base_distro == 'debian' %} - - {% set nova_libvirt_packages = [ - 'ceph-common', - 'libvirt-bin', - 'dmidecode', - 'pm-utils', - 'qemu', - 'qemu-block-extra', - 'ebtables', - 'xen-utils-4.4', - 'usermode' - ] %} - - {% set libvirt_group = 'libvirt' %} - -{% endif %} - -{{ macros.install_packages(nova_libvirt_packages | customizable("packages")) }} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - -RUN usermod -a -G qemu nova - -{% elif base_distro in ['ubuntu', 'debian'] %} - -RUN mkdir -p /etc/ceph \ - && rm -f /etc/libvirt/qemu/networks/default.xml \ - /etc/libvirt/qemu/networks/autostart/default.xml \ - && usermod -a -G {{ libvirt_group }} nova - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start - -{% block nova_libvirt_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/nova/nova-libvirt/extend_start.sh b/docker/nova/nova-libvirt/extend_start.sh deleted file mode 100644 index e04d952654..0000000000 --- a/docker/nova/nova-libvirt/extend_start.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# TODO(SamYaple): Tweak libvirt.conf rather than change permissions. -# Fix permissions for libvirt -# Do not remove unless CentOS has been validated -if [[ -c /dev/kvm ]]; then - chmod 660 /dev/kvm - chown root:kvm /dev/kvm -fi - -# Mount xenfs for libxl to work -if [[ $(lsmod | grep xenfs) ]]; then - mount -t xenfs xenfs /proc/xen -fi - -if [[ ! -d "/var/log/kolla/libvirt" ]]; then - mkdir -p /var/log/kolla/libvirt - touch /var/log/kolla/libvirt/libvirtd.log - chmod 644 /var/log/kolla/libvirt/libvirtd.log -fi -if [[ $(stat -c %a /var/log/kolla/libvirt) != "755" ]]; then - chmod 755 /var/log/kolla/libvirt - chmod 644 /var/log/kolla/libvirt/libvirtd.log -fi diff --git a/docker/nova/nova-network/Dockerfile.j2 b/docker/nova/nova-network/Dockerfile.j2 deleted file mode 100644 index d6f4aeb085..0000000000 --- a/docker/nova/nova-network/Dockerfile.j2 +++ /dev/null @@ -1,41 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_network_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_network_packages = [ - 'openstack-nova-network', - 'bridge-utils', - 'initscripts' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set nova_network_packages = [ - 'nova-network' - ] %} - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_network_packages = [ - 'initscripts' - ] %} - - {% endif %} - -{{ macros.install_packages(nova_network_packages | customizable("packages")) }} - -{% endif %} - -{% block nova_network_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER nova diff --git a/docker/nova/nova-novncproxy/Dockerfile.j2 b/docker/nova/nova-novncproxy/Dockerfile.j2 deleted file mode 100644 index 7aa8c46577..0000000000 --- a/docker/nova/nova-novncproxy/Dockerfile.j2 +++ /dev/null @@ -1,39 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_novncproxy_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_novncproxy_packages = [ - 'novnc', - 'openstack-nova-novncproxy' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set nova_novncproxy_packages = [ - 'nova-novncproxy' - ] %} - - {% endif %} - -{{ macros.install_packages(nova_novncproxy_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD nova-novncproxy-archive /usr/share/nova-novncproxy-source -RUN cd /usr/share \ - && ln -s nova-novncproxy-source/* novnc \ - && chown -R nova: /usr/share/nova-novncproxy-source - -{% endif %} - -{% block nova_novncproxy_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER nova diff --git a/docker/nova/nova-scheduler/Dockerfile.j2 b/docker/nova/nova-scheduler/Dockerfile.j2 deleted file mode 100644 index edd49883cd..0000000000 --- a/docker/nova/nova-scheduler/Dockerfile.j2 +++ /dev/null @@ -1,31 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_scheduler_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_scheduler_packages = [ - 'openstack-nova-scheduler' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set nova_scheduler_packages = [ - 'nova-scheduler' - ] %} - - {% endif %} - -{{ macros.install_packages(nova_scheduler_packages | customizable("packages")) }} - -{% endif %} - -{% block nova_scheduler_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER nova diff --git a/docker/nova/nova-serialproxy/Dockerfile.j2 b/docker/nova/nova-serialproxy/Dockerfile.j2 deleted file mode 100644 index 025a888a1c..0000000000 --- a/docker/nova/nova-serialproxy/Dockerfile.j2 +++ /dev/null @@ -1,27 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_serialproxy_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set nova_serialproxy_packages = [ - 'openstack-nova-serialproxy' - ] %} - {% elif base_distro in ['ubuntu'] %} - {% set nova_serialproxy_packages = [ - 'nova-serialproxy' - ] %} - {% endif %} - -{{ macros.install_packages(nova_serialproxy_packages | customizable("packages")) }} - -{% endif %} - -{% block nova_serialproxy_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER nova diff --git a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 b/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 deleted file mode 100644 index f11bab9db8..0000000000 --- a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 +++ /dev/null @@ -1,40 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_spicehtml5proxy_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set nova_spicehtml5proxy_packages = [ - 'openstack-nova-spicehtml5proxy', - 'spice-html5', - 'numpy' - ] %} - - {% elif base_distro in ['ubuntu'] %} - - {% set nova_spicehtml5proxy_packages = [ - 'nova-spiceproxy', - 'websockify' - ] %} - - {% endif %} - -{{ macros.install_packages(nova_spicehtml5proxy_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD nova-spicehtml5proxy-archive /usr/share/nova-spicehtml5proxy-source -RUN cd /usr/share \ - && ln -s nova-spicehtml5proxy-source/* spice-html5 - -{% endif %} - -{% block nova_spicehtml5proxy_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER nova diff --git a/docker/nova/nova-ssh/Dockerfile.j2 b/docker/nova/nova-ssh/Dockerfile.j2 deleted file mode 100644 index 2ec3b5a5b7..0000000000 --- a/docker/nova/nova-ssh/Dockerfile.j2 +++ /dev/null @@ -1,28 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block nova_ssh_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% set nova_ssh_packages = [ - 'openssh-server' -] %} - -{% if base_distro in ['ubuntu', 'debian'] %} - -RUN mkdir -p /var/run/sshd \ - && chmod 0755 /var/run/sshd - -{% endif %} - -{{ macros.install_packages(nova_ssh_packages | customizable("packages")) }} - -RUN chsh -s /bin/bash nova - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start - -{% block nova_ssh_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/nova/nova-ssh/extend_start.sh b/docker/nova/nova-ssh/extend_start.sh deleted file mode 100644 index da05e4379a..0000000000 --- a/docker/nova/nova-ssh/extend_start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -if [[ ! -L /dev/log ]]; then - ln -sf /var/lib/kolla/heka/log /dev/log -fi - -SSH_HOST_KEY_TYPES=( "rsa" "dsa" "ecdsa" "ed25519" ) - -for key_type in ${SSH_HOST_KEY_TYPES[@]}; do - KEY_PATH=/etc/ssh/ssh_host_${key_type}_key - if [[ ! -f "${KEY_PATH}" ]]; then - ssh-keygen -q -t ${key_type} -f ${KEY_PATH} -N "" - fi -done - -mkdir -p /var/lib/nova/.ssh - -if [[ $(stat -c %U:%G /var/lib/nova/.ssh) != "nova:nova" ]]; then - chown nova: /var/lib/nova/.ssh -fi diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 deleted file mode 100644 index 4b9f912512..0000000000 --- a/docker/openstack-base/Dockerfile.j2 +++ /dev/null @@ -1,353 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block openstack_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set openstack_base_packages = [ - 'git', - 'iproute', - 'openssl' - ] %} - -{{ macros.install_packages(openstack_base_packages) }} - -{% endif %} -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - -# TODO(Allen) Remove python-dogpile-cache after the requirement of -# python-ironicclient is fixed. - {% set openstack_base_packages = [ - 'avahi-libs', - 'cups-libs', - 'fontconfig', - 'fontpackages-filesystem', - 'freetype', - 'initscripts', - 'libjpeg-turbo', - 'libpng', - 'libtomcrypt', - 'libtommath', - 'libX11', - 'libX11-common', - 'libXau', - 'libxcb', - 'libXext', - 'libXi', - 'libxslt', - 'libyaml', - 'MySQL-python', - 'Percona-Server-shared-56', - 'pyOpenSSL', - 'pyparsing', - 'python2-cffi', - 'python2-crypto', - 'python2-cryptography', - 'python2-debtcollector', - 'python2-eventlet', - 'python2-fasteners', - 'python2-funcsigs', - 'python2-futurist', - 'python2-greenlet', - 'python2-iso8601', - 'python2-msgpack', - 'python2-oslo-concurrency', - 'python2-oslo-config', - 'python2-oslo-context', - 'python2-oslo-db', - 'python2-oslo-i18n', - 'python2-oslo-log', - 'python2-oslo-messaging', - 'python2-oslo-middleware', - 'python2-oslo-policy', - 'python2-oslo-serialization', - 'python2-oslo-service', - 'python2-oslo-utils', - 'python2-pika', - 'python2-pika_pool', - 'python2-positional', - 'python2-pyasn1', - 'python2-PyMySQL', - 'python-alembic', - 'python-amqp', - 'python-anyjson', - 'python-barbicanclient', - 'python-beaker', - 'python-cachetools', - 'python-ceilometerclient', - 'python-cliff', - 'python-cmd2', - 'python-congressclient', - 'python-contextlib2', - 'python-dateutil', - 'python-decorator', - 'python-designateclient', - 'python-dogpile-cache', - 'python-editor', - 'python-enum34', - 'python-extras', - 'python-fixtures', - 'python-futures', - 'python-glanceclient', - 'python-heatclient', - 'python-httplib2', - 'python-idna', - 'python-inotify', - 'python-ipaddress', - 'python-ironicclient', - 'python-jsonpatch', - 'python-jsonpointer', - 'python-jsonschema', - 'python-keyring', - 'python-keystoneauth1', - 'python-keystoneclient', - 'python-keystonemiddleware', - 'python-kombu', - 'python-linecache2', - 'python-lxml', - 'python-magnumclient', - 'python-mako', - 'python-manilaclient', - 'python-memcached', - 'python-migrate', - 'python-mimeparse', - 'python-mistralclient', - 'python-monotonic', - 'python-muranoclient', - 'python-netaddr', - 'python-netifaces', - 'python-neutronclient', - 'python-novaclient', - 'python-openstackclient', - 'python-paste', - 'python-paste-deploy', - 'python-pbr', - 'python-pip', - 'python-ply', - 'python-posix_ipc', - 'python-prettytable', - 'python-pycparser', - 'python-PyMySQL', - 'python-repoze-lru', - 'python-requests', - 'python-retrying', - 'python-routes', - 'python-saharaclient', - 'python-simplejson', - 'python-sqlalchemy', - 'python-sqlparse', - 'python-stevedore', - 'python-swiftclient', - 'python-tempita', - 'python-testtools', - 'python-traceback2', - 'python-troveclient', - 'python-unicodecsv', - 'python-unittest2', - 'python-urllib3', - 'python-warlock', - 'python-webob', - 'python-wrapt', - 'python-zaqarclient', - 'PyYAML', - 'systemd-sysv', - 'sysvinit-tools', - 'tcp_wrappers-libs' - ] %} - {% elif base_distro in ['ubuntu'] %} - -# This will prevent questions from being asked during the install -ENV DEBIAN_FRONTEND noninteractive - {% set openstack_base_packages = [ - 'python-barbicanclient', - 'python-ceilometerclient', - 'python-congressclient', - 'python-designateclient', - 'python-heatclient', - 'python-ironicclient', - 'python-magnumclient', - 'python-manilaclient', - 'python-memcache', - 'python-mistralclient', - 'python-muranoclient', - 'python-mysqldb', - 'python-pip', - 'python-saharaclient', - 'python-swiftclient', - 'python-troveclient', - 'python-zaqarclient', - 'python-openstackclient', - 'python-pymysql', - 'python-keystoneclient', - 'python-oslo.log', - 'openssl', - 'patch' - ] %} - {% endif %} - -{{ macros.install_packages(openstack_base_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set openstack_base_packages = [ - 'gcc', - 'gcc-c++', - 'libffi-devel', - 'libxml2-devel', - 'libxslt-devel', - 'libyaml-devel', - 'MariaDB-devel', - 'openldap-devel', - 'openssl-devel', - 'postgresql', - 'postgresql-devel', - 'python-devel', - 'sqlite-devel', - 'zip' - ] %} - {% elif base_distro in ['ubuntu', 'debian'] %} - {% set openstack_base_packages = [ - 'ca-certificates', - 'build-essential', - 'python-dev', - 'libssl-dev', - 'libmariadbclient-dev', - 'libxslt1-dev', - 'libffi-dev', - 'libxml2-dev', - 'libyaml-dev', - 'libz-dev', - 'pkg-config', - 'git', - 'zip' - ] %} - {% endif %} - -{{ macros.install_packages(openstack_base_packages | customizable("packages")) }} - -{% block source_install_python_pip %} -RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ - && python get-pip.py \ - && rm get-pip.py -{% endblock %} - -{% set openstack_base_pip_packages = [ - 'Babel', - 'Mako', - 'MarkupSafe', - 'Paste', - 'PasteDeploy', - 'PyYAML', - 'Routes', - 'SQLAlchemy', - 'Tempita', - 'WebOb', - 'alembic', - 'amqp', - 'anyjson', - 'appdirs', - 'cachetools', - 'cliff', - 'cmd2', - 'contextlib2', - 'debtcollector', - 'decorator', - 'enum34', - 'eventlet', - 'fasteners', - 'funcsigs', - 'functools32', - 'futures', - 'futurist', - 'greenlet', - 'iso8601', - 'jinja2', - 'jsonpatch', - 'jsonpointer', - 'jsonschema', - 'keystoneauth1', - 'keystonemiddleware', - 'kombu', - 'monotonic', - 'msgpack-python', - 'MySQL-python', - 'netaddr', - 'netifaces', - 'os-client-config', - 'oslo.concurrency', - 'oslo.config', - 'oslo.context', - 'oslo.db', - 'oslo.i18n', - 'oslo.log', - 'oslo.messaging', - 'oslo.middleware', - 'oslo.policy', - 'oslo.serialization', - 'oslo.service', - 'oslo.utils', - 'oslo.vmware', - 'pbr', - 'pika', - 'pika-pool', - 'positional', - 'prettytable', - 'pycadf', - 'pycrypto', - 'pyinotify', - 'pymysql', - 'pyparsing', - 'python-barbicanclient', - 'python-ceilometerclient', - 'python-cinderclient', - 'python-congressclient', - 'python-dateutil', - 'python-designateclient', - 'python-editor', - 'python-glanceclient', - 'python-heatclient', - 'python-ironicclient', - 'python-keystoneclient', - 'python-magnumclient', - 'python-manilaclient', - 'python-memcached', - 'python-mistralclient', - 'python-muranoclient', - 'python-neutronclient', - 'python-novaclient', - 'python-openstackclient', - 'python-saharaclient', - 'python-swiftclient', - 'python-troveclient', - 'python-zaqarclient', - 'pytz', - 'repoze.lru', - 'requests', - 'requestsexceptions', - 'retrying', - 'simplejson', - 'six', - 'sqlalchemy-migrate', - 'sqlparse', - 'stevedore', - 'unicodecsv', - 'warlock', - 'wrapt' - ] -%} - -ADD openstack-base-archive /openstack-base-source -RUN ln -s openstack-base-source/* /requirements \ - && mkdir -p /var/lib/kolla \ - && pip --no-cache-dir install -U virtualenv \ - && virtualenv --system-site-packages /var/lib/kolla/venv -{{ macros.install_pip(openstack_base_pip_packages | customizable("pip_packages")) }} -ENV PATH /var/lib/kolla/venv/bin:$PATH - -{% endif %} - -{% block openstack_base_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/openvswitch/openvswitch-base/Dockerfile.j2 b/docker/openvswitch/openvswitch-base/Dockerfile.j2 deleted file mode 100644 index 0dce1ff776..0000000000 --- a/docker/openvswitch/openvswitch-base/Dockerfile.j2 +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block openvswitch_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set openvswitch_base_packages = ['openvswitch'] %} - -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set openvswitch_base_packages = ['openvswitch-switch'] %} - -{% endif %} -{{ macros.install_packages(openvswitch_base_packages | customizable("packages")) }} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN touch /usr/local/bin/kolla_openvswitch_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_openvswitch_extend_start - -{% block openvswitch_base_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/openvswitch/openvswitch-base/extend_start.sh b/docker/openvswitch/openvswitch-base/extend_start.sh deleted file mode 100644 index 767194e04b..0000000000 --- a/docker/openvswitch/openvswitch-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/openvswitch" ]]; then - mkdir -p /var/log/kolla/openvswitch -fi -if [[ $(stat -c %a /var/log/kolla/openvswitch) != "755" ]]; then - chmod 755 /var/log/kolla/openvswitch -fi - -. /usr/local/bin/kolla_openvswitch_extend_start diff --git a/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 b/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 deleted file mode 100644 index cf85de2bda..0000000000 --- a/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 +++ /dev/null @@ -1,15 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block openvswitch_db_server_header %}{% endblock %} - -COPY ovs_ensure_configured.sh /usr/local/bin/kolla_ensure_openvswitch_configured -COPY extend_start.sh /usr/local/bin/kolla_openvswitch_extend_start -COPY start_ovsdb_server.sh /usr/local/bin/start-ovsdb-server -RUN chmod 755 /usr/local/bin/kolla_ensure_openvswitch_configured \ - /usr/local/bin/kolla_openvswitch_extend_start \ - /usr/local/bin/start-ovsdb-server - -{% block openvswitch_db_server_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/openvswitch/openvswitch-db-server/extend_start.sh b/docker/openvswitch/openvswitch-db-server/extend_start.sh deleted file mode 100644 index 606cd5fc16..0000000000 --- a/docker/openvswitch/openvswitch-db-server/extend_start.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -mkdir -p "/run/openvswitch" -if [[ ! -e "/etc/openvswitch/conf.db" ]]; then - ovsdb-tool create "/etc/openvswitch/conf.db" -fi diff --git a/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh b/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh deleted file mode 100644 index 99bae3e874..0000000000 --- a/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -bridge=$1 -port=$2 - -ovs-vsctl br-exists $bridge; rc=$? -if [[ $rc == 2 ]]; then - changed=changed - ovs-vsctl --no-wait add-br $bridge -fi - -if [[ ! $(ovs-vsctl list-ports $bridge) =~ $(echo "\<$port\>") ]]; then - changed=changed - ovs-vsctl --no-wait add-port $bridge $port -fi - -echo $changed diff --git a/docker/openvswitch/openvswitch-db-server/start_ovsdb_server.sh b/docker/openvswitch/openvswitch-db-server/start_ovsdb_server.sh deleted file mode 100755 index 9db7fb5096..0000000000 --- a/docker/openvswitch/openvswitch-db-server/start_ovsdb_server.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# NOTE: (sbezverk) ovs_bridge and ovs_ext_intf variables get initialized only when -# this script is executed for kubernetes deployment. With Ansible deployment, only -# ovsdb-server gets launched and then the following workflow step will create -# an external bridge and plug an external interface. With Kubernetes we want to -# leverage its dynamic nature of automatic scaling up and down. It means all -# activities related to creating initial bridge, plugging external interface -# must be done by DaemonSet launched container. - -ovsdb_ip=$1 -ovs_bridge=$2 -ovs_ext_intf=$3 - -# NOTE: (sbezverk) The reason for introducing this script is to be able -# to launch ovsdb-server and to create the initial external bridge in one step. -# It is required in order to be able to use DaemonSet. - -if [ ! -e $ovs_bridge ] && [ ! -e $ovs_ext_intf ]; then -# NOTE: (sbezverk) This part is executed only by kubernetes deployment. -# Creating external bridge - /usr/sbin/ovsdb-server /etc/openvswitch/conf.db --remote=punix:/var/run/openvswitch/db.sock --run="ovs-vsctl --no-wait --db=unix:/var/run/openvswitch/db.sock add-br $ovs_bridge" -# Plug the external interface into the external bridge. - /usr/sbin/ovsdb-server /etc/openvswitch/conf.db --remote=punix:/var/run/openvswitch/db.sock --run="ovs-vsctl --no-wait --db=unix:/var/run/openvswitch/db.sock add-port $ovs_bridge $ovs_ext_intf" -# Run ovsdb server proces - /usr/sbin/ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/var/run/openvswitch/db.sock --remote=ptcp:6640 --log-file=/var/log/kolla/openvswitch/ovsdb-server.log -else -# NOTE: (sbezverk) This part is executed only by kolla-ansible deployment. - /usr/sbin/ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/run/openvswitch/db.sock --remote=ptcp:6640:$ovsdb_ip --log-file=/var/log/kolla/openvswitch/ovsdb-server.log -fi diff --git a/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 b/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 deleted file mode 100644 index ef7a5e6ed8..0000000000 --- a/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 +++ /dev/null @@ -1,11 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block openvswitch_vswitchd_header %}{% endblock %} - -COPY extend_start.sh /usr/local/bin/kolla_openvswitch_extend_start -RUN chmod 755 /usr/local/bin/kolla_openvswitch_extend_start - -{% block openvswitch_vswitchd_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/openvswitch/openvswitch-vswitchd/extend_start.sh b/docker/openvswitch/openvswitch-vswitchd/extend_start.sh deleted file mode 100644 index e2fc554650..0000000000 --- a/docker/openvswitch/openvswitch-vswitchd/extend_start.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -modprobe openvswitch diff --git a/docker/panko/panko-api/Dockerfile.j2 b/docker/panko/panko-api/Dockerfile.j2 deleted file mode 100644 index 0ef0de233c..0000000000 --- a/docker/panko/panko-api/Dockerfile.j2 +++ /dev/null @@ -1,25 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}panko-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block panko_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set panko_api_packages = ['openstack-panko-api'] %} - {% elif base_distro in ['ubuntu'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{{ macros.install_packages(panko_api_packages | customizable("packages")) }} -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_panko_extend_start -RUN chmod 755 /usr/local/bin/kolla_panko_extend_start - -{% block panko_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/panko/panko-api/extend_start.sh b/docker/panko/panko-api/extend_start.sh deleted file mode 100644 index cf3cc3bd46..0000000000 --- a/docker/panko/panko-api/extend_start.sh +++ /dev/null @@ -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 - panko-dbsync - exit 0 -fi diff --git a/docker/panko/panko-base/Dockerfile.j2 b/docker/panko/panko-base/Dockerfile.j2 deleted file mode 100644 index 98c95fc740..0000000000 --- a/docker/panko/panko-base/Dockerfile.j2 +++ /dev/null @@ -1,69 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block panko_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set panko_base_packages = [ - 'openstack-panko-common', - 'httpd', - 'mod_wsgi', - 'python-ldappool' - ] %} - -{{ macros.install_packages(panko_base_packages | customizable("packages")) }} -RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf - {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - - {% endif %} -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set panko_base_packages = [ - 'httpd', - 'mod_wsgi', - 'python-ldappool' - ] %} -{{ macros.install_packages(panko_base_packages | customizable("packages")) }} -RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf - - {% elif base_distro in ['ubuntu', 'debian'] %} - - {% set panko_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi', - 'python-ldappool' - ] %} - -{{ macros.install_packages(panko_base_packages | customizable("packages")) }} -RUN truncate -s 0 /etc/apache2/ports.conf - - {% endif %} - -ADD panko-base-archive /panko-base-source - -RUN ln -s panko-base-source/* panko \ - && useradd --user-group panko \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt \ - && mkdir -p /etc/panko /home/panko \ - && cp -r /panko/etc/panko/* /etc/panko/ \ - && chown -R panko: /etc/panko /home/panko - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla panko \ - && mkdir -p /var/lib/panko \ - && chown -R panko: /var/lib/panko \ - && touch /usr/local/bin/kolla_panko_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_panko_extend_start - -{% block panko_base_footer %}{% endblock %} diff --git a/docker/panko/panko-base/extend_start.sh b/docker/panko/panko-base/extend_start.sh deleted file mode 100644 index 6d8061ddcf..0000000000 --- a/docker/panko/panko-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/panko" ]]; then - mkdir -p /var/log/kolla/panko -fi -if [[ $(stat -c %a /var/log/kolla/panko) != "755" ]]; then - chmod 755 /var/log/kolla/panko -fi - -. /usr/local/bin/kolla_panko_extend_start diff --git a/docker/rabbitmq/Dockerfile.j2 b/docker/rabbitmq/Dockerfile.j2 deleted file mode 100644 index 30553726dd..0000000000 --- a/docker/rabbitmq/Dockerfile.j2 +++ /dev/null @@ -1,63 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block rabbitmq_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set rabbitmq_packages = [ - 'hostname', - 'rabbitmq-server' - ] %} - -{{ macros.install_packages(rabbitmq_packages | customizable("packages")) }} - -{% elif base_distro == 'ubuntu' %} - {% set rabbitmq_packages = [ - 'erlang-nox', - 'socat', - 'logrotate', - 'http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server_3.6.5-1_all.deb' - ] %} - -{{ macros.install_packages(rabbitmq_packages | customizable("packages")) }} - -{% elif base_distro == 'debian' %} - {% set rabbitmq_packages = [ - 'erlang-nox', - 'http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server_3.6.5-1_all.deb' - ] %} - -{{ macros.install_packages(rabbitmq_packages | customizable("packages")) }} - -{% endif %} - -{% block rabbitmq_install_plugins %} - -# NOTE(sdake): the /bin/true unblocks the rabbitmq-plugins tool. Not sure how -# or why. My suspicion is it sends a signal to the parent -# process. - -RUN rm -rf /var/lib/rabbitmq/* \ - && ln -s /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.* /usr/lib/rabbitmq/lib/rabbitmq_server-3.6 \ - && curl -o /usr/lib/rabbitmq/lib/rabbitmq_server-3.6/plugins/rabbitmq_clusterer-3.6.x-667f92b0.ez http://www.rabbitmq.com/community-plugins/v3.6.x/rabbitmq_clusterer-3.6.x-667f92b0.ez \ - && /usr/lib/rabbitmq/bin/rabbitmq-plugins enable --offline \ - rabbitmq_management \ - rabbitmq_clusterer \ - && /bin/true - -{% endblock %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -COPY rabbitmq_sudoers /etc/sudoers.d/kolla_rabbitmq_sudoers -COPY rabbitmq_get_gospel_node.py /usr/local/bin/rabbitmq_get_gospel_node -RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/rabbitmq_get_gospel_node \ - && chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_rabbitmq_sudoers \ - && usermod -a -G kolla rabbitmq - -{% block rabbitmq_footer %}{% endblock %} -{{ include_footer }} - -USER rabbitmq diff --git a/docker/rabbitmq/extend_start.sh b/docker/rabbitmq/extend_start.sh deleted file mode 100644 index 56d06aaf90..0000000000 --- a/docker/rabbitmq/extend_start.sh +++ /dev/null @@ -1,24 +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 - sudo chown -R rabbitmq: /var/lib/rabbitmq - -# NOTE(sbezverk): In kubernetes environment, if this file exists from previous -# bootstrap, the system does not allow to overwrite it (it bootstrap files with -# permission denied error) but it allows to delete it and then recreate it. - if [[ -e "/var/lib/rabbitmq/.erlang.cookie" ]]; then - rm -f /var/lib/rabbitmq/.erlang.cookie - fi - echo "${RABBITMQ_CLUSTER_COOKIE}" > /var/lib/rabbitmq/.erlang.cookie - chmod 400 /var/lib/rabbitmq/.erlang.cookie - exit 0 -fi - -if [[ ! -d "/var/log/kolla/rabbitmq" ]]; then - mkdir -p /var/log/kolla/rabbitmq -fi -if [[ $(stat -c %a /var/log/kolla/rabbitmq) != "755" ]]; then - chmod 755 /var/log/kolla/rabbitmq -fi diff --git a/docker/rabbitmq/rabbitmq_get_gospel_node.py b/docker/rabbitmq/rabbitmq_get_gospel_node.py deleted file mode 100644 index 9f40c92ace..0000000000 --- a/docker/rabbitmq/rabbitmq_get_gospel_node.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/python - -# 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. - -import json -import subprocess # nosec -import traceback - - -def extract_gospel_node(term): - return term.split("@")[1].translate(None, "\'\"{},") - - -def main(): - try: - # TODO(pbourke): see if can get gospel node without requiring shell - raw_status = subprocess.check_output( - "/usr/sbin/rabbitmqctl eval 'rabbit_clusterer:status().'", - shell=True, stderr=subprocess.STDOUT # nosec: this command appears - # to require a shell to work - ) - if "Rabbit is running in cluster configuration" not in raw_status: - raise AttributeError - gospel_line = [ - line for line in raw_status.split('\n') if 'gospel' in line - ][0] - gospel_node = extract_gospel_node(gospel_line) - if not gospel_node: - raise AttributeError - except AttributeError: - result = { - 'failed': True, - 'error': raw_status, - 'changed': True - } - except Exception: - result = { - 'failed': True, - 'error': traceback.format_exc(), - 'changed': True - } - else: - result = { - 'failed': False, - 'hostname': gospel_node, - 'changed': False - } - - print(json.dumps(result)) - - -if __name__ == '__main__': - main() diff --git a/docker/rabbitmq/rabbitmq_sudoers b/docker/rabbitmq/rabbitmq_sudoers deleted file mode 100644 index 7d3d091d8a..0000000000 --- a/docker/rabbitmq/rabbitmq_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R rabbitmq\: /var/lib/rabbitmq, /bin/chown -R rabbitmq\: /var/lib/rabbitmq diff --git a/docker/rally/Dockerfile.j2 b/docker/rally/Dockerfile.j2 deleted file mode 100644 index b51431d4df..0000000000 --- a/docker/rally/Dockerfile.j2 +++ /dev/null @@ -1,38 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block rally_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set rally_packages = ['openstack-rally'] %} -RUN useradd --user-group rally - -{% elif base_distro in ['ubuntu'] %} - {% set rally_packages = ['rally'] %} -{% endif %} -{{ macros.install_packages(rally_packages | customizable("packages")) }} -{% elif install_type == 'source' %} - -ADD rally-archive /rally-source -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 \ - && mkdir -p /etc/rally /var/log/rally /home/rally \ - && chown -R rally: /etc/rally /var/log/rally /home/rally - -{% 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 - -{% block rally_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER rally diff --git a/docker/rally/extend_start.sh b/docker/rally/extend_start.sh deleted file mode 100644 index e490d8b884..0000000000 --- a/docker/rally/extend_start.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -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 - -# 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 create || rally-manage db upgrade - exit 0 -fi diff --git a/docker/sahara/sahara-api/Dockerfile.j2 b/docker/sahara/sahara-api/Dockerfile.j2 deleted file mode 100644 index 91937f9d8f..0000000000 --- a/docker/sahara/sahara-api/Dockerfile.j2 +++ /dev/null @@ -1,24 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}sahara-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block sahara_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set sahara_api_packages = ['openstack-sahara-api'] %} - {% elif base_distro in ['ubuntu'] %} - {% set sahara_api_packages = ['sahara-api'] %} - {% endif %} -{{ macros.install_packages(sahara_api_packages | customizable("packages")) }} -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_sahara_extend_start -RUN chmod 755 /usr/local/bin/kolla_sahara_extend_start - -{% block sahara_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER sahara diff --git a/docker/sahara/sahara-api/extend_start.sh b/docker/sahara/sahara-api/extend_start.sh deleted file mode 100644 index 8054dd698c..0000000000 --- a/docker/sahara/sahara-api/extend_start.sh +++ /dev/null @@ -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 - sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head - exit 0 -fi diff --git a/docker/sahara/sahara-base/Dockerfile.j2 b/docker/sahara/sahara-base/Dockerfile.j2 deleted file mode 100644 index a6324a22b4..0000000000 --- a/docker/sahara/sahara-base/Dockerfile.j2 +++ /dev/null @@ -1,41 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block sahara_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set sahara_base_packages = ['openstack-sahara-common'] %} -{% elif base_distro in ['ubuntu'] %} - {% set sahara_base_packages = ['sahara-common'] %} -{% endif %} -{{ macros.install_packages(sahara_base_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD sahara-base-archive /sahara-base-source -RUN ln -s sahara-base-source/* sahara \ - && useradd --user-group sahara \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /sahara \ - && mkdir -p /etc/sahara /var/log/sahara /home/sahara \ - && cp -r /sahara/etc/sahara/* /etc/sahara/ \ - && chown -R sahara: /etc/sahara /var/log/sahara /home/sahara \ - && 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/sahara/rootwrap.conf - -{% endif %} - -RUN usermod -a -G kolla sahara - -COPY sahara_sudoers /etc/sudoers.d/kolla_sahara_sudoers -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla sahara \ - && chmod 750 /etc/sudoers.d \ - && chmod 640 /etc/sudoers.d/kolla_sahara_sudoers \ - && touch /usr/local/bin/kolla_sahara_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_sahara_extend_start - -{% block sahara_base_footer %}{% endblock %} diff --git a/docker/sahara/sahara-base/extend_start.sh b/docker/sahara/sahara-base/extend_start.sh deleted file mode 100644 index 8245204d5a..0000000000 --- a/docker/sahara/sahara-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/sahara" ]]; then - mkdir -p /var/log/kolla/sahara -fi -if [[ $(stat -c %a /var/log/kolla/sahara) != "755" ]]; then - chmod 755 /var/log/kolla/sahara -fi - -. /usr/local/bin/kolla_sahara_extend_start diff --git a/docker/sahara/sahara-base/sahara_sudoers b/docker/sahara/sahara-base/sahara_sudoers deleted file mode 100644 index bd8bfeebd4..0000000000 --- a/docker/sahara/sahara-base/sahara_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /var/lib/kolla/venv/bin/sahara-rootwrap /etc/sahara/rootwrap.conf * diff --git a/docker/sahara/sahara-engine/Dockerfile.j2 b/docker/sahara/sahara-engine/Dockerfile.j2 deleted file mode 100644 index d91b0b73a9..0000000000 --- a/docker/sahara/sahara-engine/Dockerfile.j2 +++ /dev/null @@ -1,22 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}sahara-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block sahara_engine_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set sahara_engine_packages = ['openstack-sahara-engine'] %} - {% elif base_distro in ['ubuntu'] %} - {% set sahara_engine_packages = ['sahara-engine'] %} - {% endif %} -{{ macros.install_packages(sahara_engine_packages | customizable("packages")) }} - -{% endif %} -{% block sahara_engine_footer %}{% endblock %} -{% block footer %}{% endblock %} - -{{ include_footer }} - -USER sahara diff --git a/docker/searchlight/searchlight-api/Dockerfile.j2 b/docker/searchlight/searchlight-api/Dockerfile.j2 deleted file mode 100644 index 1f4797e039..0000000000 --- a/docker/searchlight/searchlight-api/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}searchlight-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block searchlight_api_header %}{% endblock %} - -{% 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_searchlight_extend_start -RUN chmod 755 /usr/local/bin/kolla_searchlight_extend_start - -{% block searchlight_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER searchlight diff --git a/docker/searchlight/searchlight-api/extend_start.sh b/docker/searchlight/searchlight-api/extend_start.sh deleted file mode 100644 index 3b6339dc67..0000000000 --- a/docker/searchlight/searchlight-api/extend_start.sh +++ /dev/null @@ -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 - searchlight-manage index sync --force - exit 0 -fi diff --git a/docker/searchlight/searchlight-base/Dockerfile.j2 b/docker/searchlight/searchlight-base/Dockerfile.j2 deleted file mode 100644 index a5fa4995fc..0000000000 --- a/docker/searchlight/searchlight-base/Dockerfile.j2 +++ /dev/null @@ -1,30 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block searchlight_base_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% elif install_type == 'source' %} - -ADD searchlight-base-archive /searchlight-base-source -RUN ln -s searchlight-base-source/* searchlight \ - && useradd --user-group searchlight \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /searchlight \ - && mkdir -p /etc/searchlight \ - && cp -r /searchlight/etc/* /etc/searchlight \ - && chown -R searchlight: /etc/searchlight - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla searchlight \ - && touch /usr/local/bin/kolla_searchlight_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_searchlight_extend_start - -{% block searchlight_base_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/searchlight/searchlight-base/extend_start.sh b/docker/searchlight/searchlight-base/extend_start.sh deleted file mode 100644 index d1a8ea4fb5..0000000000 --- a/docker/searchlight/searchlight-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/searchlight" ]]; then - mkdir -p /var/log/kolla/searchlight -fi -if [[ $(stat -c %a /var/log/kolla/searchlight) != "755" ]]; then - chmod 755 /var/log/kolla/searchlight -fi - -. /usr/local/bin/kolla_searchlight_extend_start diff --git a/docker/searchlight/searchlight-listener/Dockerfile.j2 b/docker/searchlight/searchlight-listener/Dockerfile.j2 deleted file mode 100644 index ddba8713b9..0000000000 --- a/docker/searchlight/searchlight-listener/Dockerfile.j2 +++ /dev/null @@ -1,17 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}searchlight-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block searchlight_listener_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% endif %} - -{% block searchlight_listener_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER searchlight diff --git a/docker/senlin/senlin-api/Dockerfile.j2 b/docker/senlin/senlin-api/Dockerfile.j2 deleted file mode 100644 index e556b40861..0000000000 --- a/docker/senlin/senlin-api/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}senlin-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block senlin_api_header %}{% endblock %} - -{% 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_senlin_extend_start -RUN chmod 755 /usr/local/bin/kolla_senlin_extend_start - -{% block senlin_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER senlin diff --git a/docker/senlin/senlin-api/extend_start.sh b/docker/senlin/senlin-api/extend_start.sh deleted file mode 100644 index 2de5b4c650..0000000000 --- a/docker/senlin/senlin-api/extend_start.sh +++ /dev/null @@ -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 - senlin-manage --config-file /etc/senlin/senlin.conf db_sync - exit 0 -fi diff --git a/docker/senlin/senlin-base/Dockerfile.j2 b/docker/senlin/senlin-base/Dockerfile.j2 deleted file mode 100644 index 369b0bf4ec..0000000000 --- a/docker/senlin/senlin-base/Dockerfile.j2 +++ /dev/null @@ -1,30 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block senlin_base_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% elif install_type == 'source' %} - -ADD senlin-base-archive /senlin-base-source -RUN ln -s senlin-base-source/* senlin \ - && useradd --user-group senlin \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /senlin \ - && mkdir -p /etc/senlin \ - && cp -r /senlin/etc/senlin/* /etc/senlin \ - && chown -R senlin: /etc/senlin - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla senlin \ - && touch /usr/local/bin/kolla_senlin_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_senlin_extend_start - -{% block senlin_base_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/senlin/senlin-base/extend_start.sh b/docker/senlin/senlin-base/extend_start.sh deleted file mode 100644 index 0a9c7bca13..0000000000 --- a/docker/senlin/senlin-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/senlin" ]]; then - mkdir -p /var/log/kolla/senlin -fi -if [[ $(stat -c %a /var/log/kolla/senlin) != "755" ]]; then - chmod 755 /var/log/kolla/senlin -fi - -. /usr/local/bin/kolla_senlin_extend_start diff --git a/docker/senlin/senlin-engine/Dockerfile.j2 b/docker/senlin/senlin-engine/Dockerfile.j2 deleted file mode 100644 index 625796d072..0000000000 --- a/docker/senlin/senlin-engine/Dockerfile.j2 +++ /dev/null @@ -1,17 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}senlin-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block senlin_engine_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% endif %} - -{% block senlin_engine_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER senlin diff --git a/docker/solum/solum-api/Dockerfile.j2 b/docker/solum/solum-api/Dockerfile.j2 deleted file mode 100644 index 2a5de0e666..0000000000 --- a/docker/solum/solum-api/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}solum-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block solum_api_header %}{% endblock %} - -{% 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_solum_extend_start -RUN chmod 755 /usr/local/bin/kolla_solum_extend_start - -{% block solum_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER solum diff --git a/docker/solum/solum-api/extend_start.sh b/docker/solum/solum-api/extend_start.sh deleted file mode 100644 index fd9625c837..0000000000 --- a/docker/solum/solum-api/extend_start.sh +++ /dev/null @@ -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 - solum-db-manage --config-file /etc/solum/solum.conf upgrade head - exit 0 -fi diff --git a/docker/solum/solum-base/Dockerfile.j2 b/docker/solum/solum-base/Dockerfile.j2 deleted file mode 100644 index 2fae22e9d3..0000000000 --- a/docker/solum/solum-base/Dockerfile.j2 +++ /dev/null @@ -1,29 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block solum_base_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% elif install_type == 'source' %} - -ADD solum-base-archive /solum-base-source -RUN ln -s solum-base-source/* solum \ - && useradd --user-group solum \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /solum \ - && mkdir -p /etc/solum /home/solum \ - && cp -r /solum/etc/solum/* /etc/solum/ \ - && chown -R solum: /etc/solum /home/solum - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla solum \ - && touch /usr/local/bin/kolla_solum_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_solum_extend_start - -{% block solum_base_footer %}{% endblock %} diff --git a/docker/solum/solum-base/extend_start.sh b/docker/solum/solum-base/extend_start.sh deleted file mode 100644 index b80d4bfe01..0000000000 --- a/docker/solum/solum-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/solum" ]]; then - mkdir -p /var/log/kolla/solum -fi -if [[ $(stat -c %a /var/log/kolla/solum) != "755" ]]; then - chmod 755 /var/log/kolla/solum -fi - -. /usr/local/bin/kolla_solum_extend_start diff --git a/docker/solum/solum-conductor/Dockerfile.j2 b/docker/solum/solum-conductor/Dockerfile.j2 deleted file mode 100644 index a2c69ea0f1..0000000000 --- a/docker/solum/solum-conductor/Dockerfile.j2 +++ /dev/null @@ -1,17 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}solum-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block solum_conductor_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% endif %} - -{% block solum_conductor_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER solum diff --git a/docker/solum/solum-deployer/Dockerfile.j2 b/docker/solum/solum-deployer/Dockerfile.j2 deleted file mode 100644 index 44cb8ada47..0000000000 --- a/docker/solum/solum-deployer/Dockerfile.j2 +++ /dev/null @@ -1,17 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}solum-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block solum_deployer_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% endif %} - -{% block solum_deployer_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER solum diff --git a/docker/solum/solum-worker/Dockerfile.j2 b/docker/solum/solum-worker/Dockerfile.j2 deleted file mode 100644 index 509c030584..0000000000 --- a/docker/solum/solum-worker/Dockerfile.j2 +++ /dev/null @@ -1,17 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}solum-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block solum_worker_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% endif %} - -{% block solum_worker_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER solum diff --git a/docker/swift/swift-account/Dockerfile.j2 b/docker/swift/swift-account/Dockerfile.j2 deleted file mode 100644 index f69a7317bf..0000000000 --- a/docker/swift/swift-account/Dockerfile.j2 +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block swift_account_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set swift_acount_packages = ['openstack-swift-account'] %} - {% elif base_distro in ['ubuntu'] %} - {% set swift_acount_packages = ['swift-account'] %} - {% endif %} - -{{ macros.install_packages(swift_acount_packages | customizable("packages")) }} - -{% endif %} - -{% block swift_account_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER swift diff --git a/docker/swift/swift-base/Dockerfile.j2 b/docker/swift/swift-base/Dockerfile.j2 deleted file mode 100644 index 69a8a4068b..0000000000 --- a/docker/swift/swift-base/Dockerfile.j2 +++ /dev/null @@ -1,53 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block swift_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set swift_base_packages = ['openstack-swift'] %} - {% elif base_distro in ['ubuntu'] %} - {% set swift_base_packages = ['swift'] %} - {% endif %} - -{{ macros.install_packages(swift_base_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set swift_base_packages = ['liberasurecode-devel'] %} - {% elif base_distro in ['ubuntu', 'debian'] %} - {% set swift_base_packages = ['liberasurecode-dev'] %} - {% endif %} - -{{ macros.install_packages(swift_base_packages | customizable("packages")) }} -ADD swift-base-archive /swift-base-source -RUN ln -s swift-base-source/* swift \ - && useradd --user-group swift \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /swift \ - && mkdir -p /etc/swift /var/cache/swift /var/log/swift /home/swift \ - && cp -r /swift/etc/* /etc/swift/ \ - && chown -R swift: /etc/swift /var/cache/swift /var/log/swift /home/swift - -{% endif %} - -RUN pip install oslo.rootwrap - -COPY swift-rootwrap /var/lib/kolla/venv/bin/swift-rootwrap -COPY rootwrap.conf /etc/swift/rootwrap.conf -RUN chmod 755 /var/lib/kolla/venv/bin/swift-rootwrap \ - && chmod 644 /etc/swift/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/swift/rootwrap.conf - -COPY swift_sudoers /etc/sudoers.d/kolla_swift_sudoers -RUN chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_swift_sudoers - -COPY build-swift-ring.py /usr/local/bin/kolla_build_swift_ring -RUN mkdir -p /opt/swift - -RUN usermod -a -G kolla swift - -{% block swift_base_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/swift/swift-base/build-swift-ring.py b/docker/swift/swift-base/build-swift-ring.py deleted file mode 100644 index ca42205f8e..0000000000 --- a/docker/swift/swift-base/build-swift-ring.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2015 Paul Bourke -# -# 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 script is a simple wrapper used to create and rebalance Swift ring files. -""" - -import argparse -import subprocess # nosec -import sys - - -def setup_args(): - parser = argparse.ArgumentParser() - parser.add_argument("-f", "--ring-file", - required=True, - help="Path to ring file") - parser.add_argument("-p", "--part-power", - required=True, - help="Part power") - parser.add_argument("-r", "--num-replicas", - required=True, - help="Number of replicas") - parser.add_argument("-m", "--min-part-hours", - required=True, - help="Min part hours") - parser.add_argument("-H", "--hosts", - required=True, - help="Hosts in the ring, comma delimited") - parser.add_argument("-w", "--weights", - required=True, - help="Weight of each host, comma delimited") - parser.add_argument("-d", "--devices", - required=True, - help="Device on each host, comma delimited") - parser.add_argument("-z", "--zones", - required=True, - help="Zone of each host, comma delimited") - return parser.parse_args() - - -def run_cmd(cmd): - print(' '.join(cmd)) - # NOTE(sdake): [0] we expect Operators to run this command and for their - # environment to be properly secured. Since this is not a network - # facing tool, there is no risk of untrusted input. - subprocess.call(cmd) # nosec [0] - - -def run(args): - hosts = args.hosts.split(',') - weights = args.weights.split(',') - zones = args.zones.split(',') - devices = args.devices.split(',') - if not (len(hosts) == len(weights) == len(zones) == len(devices)): - print('Error: an equal amount of hosts, devices, weights, ' - 'and zones are required') - sys.exit(1) - - run_cmd(['swift-ring-builder', - args.ring_file, - 'create', - args.part_power, - args.num_replicas, - args.min_part_hours]) - - for i in range(len(hosts)): - run_cmd(['swift-ring-builder', - args.ring_file, - 'add', - 'z{}-{}/{}'.format(zones[i], hosts[i], devices[i]), - weights[i]]) - - run_cmd(['swift-ring-builder', args.ring_file, 'rebalance']) - - -def main(): - args = setup_args() - run(args) - - -if __name__ == "__main__": - main() diff --git a/docker/swift/swift-base/rootwrap.conf b/docker/swift/swift-base/rootwrap.conf deleted file mode 100644 index 270dcc974a..0000000000 --- a/docker/swift/swift-base/rootwrap.conf +++ /dev/null @@ -1,34 +0,0 @@ -# Configuration for swift-rootwrap -# This file should be owned by (and only-writeable by) the root user - -[DEFAULT] -# List of directories to load filter definitions from (separated by ','). -# These directories MUST all be only writeable by root ! -filters_path=/etc/swift/rootwrap.d,/usr/share/swift/rootwrap - -# List of directories to search executables in, in case filters do not -# explicitely specify a full path (separated by ',') -# If not specified, defaults to system PATH environment variable. -# These directories MUST all be only writeable by root ! -exec_dirs=/sbin,/usr/sbin,/bin,/usr/bin - -# Enable logging to syslog -# Default value is False -use_syslog=False - -# Which syslog facility to use. -# Valid values include auth, authpriv, syslog, local0, local1... -# Default value is 'syslog' -syslog_log_facility=syslog - -# Which messages to log. -# INFO means log all usage -# ERROR means only log unsuccessful attempts -syslog_log_level=ERROR - -[xenapi] -# XenAPI configuration is only required by the L2 agent if it is to -# target a XenServer/XCP compute host's dom0. -xenapi_connection_url= -xenapi_connection_username=root -xenapi_connection_password= diff --git a/docker/swift/swift-base/swift-rootwrap b/docker/swift/swift-base/swift-rootwrap deleted file mode 100644 index 3839c9a8dc..0000000000 --- a/docker/swift/swift-base/swift-rootwrap +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/python2 -# PBR Generated from u'console_scripts' - -import sys - -from oslo_rootwrap.cmd import main - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/docker/swift/swift-base/swift_sudoers b/docker/swift/swift-base/swift_sudoers deleted file mode 100644 index b67c47df31..0000000000 --- a/docker/swift/swift-base/swift_sudoers +++ /dev/null @@ -1,3 +0,0 @@ -swift ALL=(root) NOPASSWD: /bin/chown -R swift\:swift /srv/node -swift ALL=(root) NOPASSWD: /usr/bin/chown -R swift\:swift /srv/node -swift ALL=(root) NOPASSWD: /var/lib/kolla/venv/bin/swift-rootwrap /etc/swift/rootwrap.conf * diff --git a/docker/swift/swift-container/Dockerfile.j2 b/docker/swift/swift-container/Dockerfile.j2 deleted file mode 100644 index 8bc64b9ecb..0000000000 --- a/docker/swift/swift-container/Dockerfile.j2 +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block swift_container_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set swift_container_packages = ['openstack-swift-container'] %} - {% elif base_distro in ['ubuntu'] %} - {% set swift_container_packages = ['swift-container'] %} - {% endif %} - -{{ macros.install_packages(swift_container_packages | customizable("packages")) }} - -{% endif %} - -{% block swift_container_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER swift diff --git a/docker/swift/swift-object-expirer/Dockerfile.j2 b/docker/swift/swift-object-expirer/Dockerfile.j2 deleted file mode 100644 index 4ee5c8ec56..0000000000 --- a/docker/swift/swift-object-expirer/Dockerfile.j2 +++ /dev/null @@ -1,25 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block swift_object_expirer_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - # RDO has it packaged in the wrong package for now. The issue is being - # tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1382921 - {% set swift_object_expirer_packages = ['openstack-swift-proxy'] %} - {% elif base_distro in ['ubuntu'] %} - {% set swift_object_expirer_packages = ['swift-object'] %} - {% endif %} - -{{ macros.install_packages(swift_object_expirer_packages | customizable("packages")) }} - -{% endif %} - -{% block swift_object_expirer_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER swift diff --git a/docker/swift/swift-object/Dockerfile.j2 b/docker/swift/swift-object/Dockerfile.j2 deleted file mode 100644 index 60bcc675f2..0000000000 --- a/docker/swift/swift-object/Dockerfile.j2 +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block swift_object_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set swift_object_packages = ['openstack-swift-object'] %} - {% elif base_distro in ['ubuntu'] %} - {% set swift_object_packages = ['swift-object'] %} - {% endif %} - -{{ macros.install_packages(swift_object_packages | customizable("packages")) }} - -{% endif %} - -{% block swift_object_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER swift diff --git a/docker/swift/swift-proxy-server/Dockerfile.j2 b/docker/swift/swift-proxy-server/Dockerfile.j2 deleted file mode 100644 index d777a10cd0..0000000000 --- a/docker/swift/swift-proxy-server/Dockerfile.j2 +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block swift_proxy_server_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set swift_proxy_server_packages = ['openstack-swift-proxy'] %} - {% elif base_distro in ['ubuntu'] %} - {% set swift_proxy_server_packages = ['swift-proxy'] %} - {% endif %} - -{{ macros.install_packages(swift_proxy_server_packages | customizable("packages")) }} - -{% endif %} - -{% block swift_proxy_server_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER swift diff --git a/docker/swift/swift-rsyncd/Dockerfile.j2 b/docker/swift/swift-rsyncd/Dockerfile.j2 deleted file mode 100644 index a34a646e80..0000000000 --- a/docker/swift/swift-rsyncd/Dockerfile.j2 +++ /dev/null @@ -1,22 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block swift_rsyncd_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set swift_rsyncd_packages = ['rsync'] %} -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set swift_rsyncd_packages = ['rsync'] %} -{% endif %} - -{{ macros.install_packages(swift_rsyncd_packages | customizable("packages")) }} -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start - -{% block swift_rsyncd_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER swift diff --git a/docker/swift/swift-rsyncd/extend_start.sh b/docker/swift/swift-rsyncd/extend_start.sh deleted file mode 100644 index d432b82fb7..0000000000 --- a/docker/swift/swift-rsyncd/extend_start.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -sudo chown -R swift:swift /srv/node diff --git a/docker/telegraf/Dockerfile.j2 b/docker/telegraf/Dockerfile.j2 deleted file mode 100644 index dcd08e8b72..0000000000 --- a/docker/telegraf/Dockerfile.j2 +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block telegraf_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% set telegraf_packages = ['telegraf'] %} -{{ macros.install_packages(telegraf_packages | customizable("packages")) }} - -COPY telegraf_sudoers /etc/sudoers.d/kolla_telegraf_sudoers -COPY extend_start.sh /usr/local/bin/kolla_telegraf_extend_start - -RUN chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_telegraf_sudoers \ - && chmod 755 /usr/local/bin/kolla_telegraf_extend_start \ - && usermod -a -G kolla telegraf - -{% block telegraf_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER telegraf diff --git a/docker/telegraf/extend_start.sh b/docker/telegraf/extend_start.sh deleted file mode 100644 index 2830da1cb0..0000000000 --- a/docker/telegraf/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -TELEGRAF_LOG_DIR="/var/log/kolla/telegraf" - -if [[ ! -d "${TELEGRAF_LOG_DIR}" ]]; then - mkdir -p ${TELEGRAF_LOG_DIR} -fi -if [[ $(stat -c %a ${TELEGRAF_LOG_DIR}) != "755" ]]; then - chmod 755 ${TELEGRAF_LOG_DIR} -fi diff --git a/docker/telegraf/telegraf_sudoers b/docker/telegraf/telegraf_sudoers deleted file mode 100644 index d6e1e092f7..0000000000 --- a/docker/telegraf/telegraf_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R telegraf\: /var/lib/telegraf, /bin/chown -R telegraf\: /var/lib/telegraf diff --git a/docker/tempest/Dockerfile.j2 b/docker/tempest/Dockerfile.j2 deleted file mode 100644 index 1e60e7295f..0000000000 --- a/docker/tempest/Dockerfile.j2 +++ /dev/null @@ -1,36 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block tempest_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set tempest_packages = ['openstack-tempest'] %} - {% elif base_distro in ['ubuntu'] %} - {% set tempest_packages = ['tempest'] %} - {% endif %} - -{{ macros.install_packages(tempest_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD tempest-archive /tempest-source -# NOTE(Jeffrey4l): remove the tempest version constraint in the -# upper-constrains.txt file. Otherwise, it will be failed. -RUN ln -s tempest-source/* tempest \ - && sed -i 's/^tempest===.*$//' requirements/upper-constraints.txt \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /tempest \ - && mkdir -p /etc/tempest /var/log/tempest /etc/tempest/tempest_lock - -WORKDIR /tempest - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start - -{% block tempest_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/tempest/extend_start.sh b/docker/tempest/extend_start.sh deleted file mode 100644 index 48397041f1..0000000000 --- a/docker/tempest/extend_start.sh +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/bash - -if [[ ! -d "/var/log/kolla/tempest" ]]; then - mkdir -p /var/log/kolla/tempest -fi -if [[ $(stat -c %a /var/log/kolla/tempest) != "755" ]]; then - chmod 755 /var/log/kolla/tempest -fi diff --git a/docker/tgtd/Dockerfile.j2 b/docker/tgtd/Dockerfile.j2 deleted file mode 100644 index d1e37d53f8..0000000000 --- a/docker/tgtd/Dockerfile.j2 +++ /dev/null @@ -1,24 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block tgtd_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set tgtd_packages = ['scsi-target-utils'] %} - -{{ macros.install_packages(tgtd_packages | customizable("packages")) }} -RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf - -{% elif base_distro in ['ubuntu', 'debian'] %} - {% set tgtd_packages = ['tgt'] %} - -{{ macros.install_packages(tgtd_packages | customizable("packages")) }} -RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf - -{% endif %} - -{% block tgtd_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/trove/trove-api/Dockerfile.j2 b/docker/trove/trove-api/Dockerfile.j2 deleted file mode 100644 index 210dffa37f..0000000000 --- a/docker/trove/trove-api/Dockerfile.j2 +++ /dev/null @@ -1,26 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block trove_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set trove_api_packages = ['openstack-trove-api'] %} - {% elif base_distro in ['ubuntu'] %} - {% set trove_api_packages = ['trove-api'] %} - {% endif %} - -{{ macros.install_packages(trove_api_packages | customizable("packages")) }} - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start - -{% block trove_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER trove diff --git a/docker/trove/trove-api/extend_start.sh b/docker/trove/trove-api/extend_start.sh deleted file mode 100644 index 76839e2d4c..0000000000 --- a/docker/trove/trove-api/extend_start.sh +++ /dev/null @@ -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 - trove-manage db_sync - exit 0 -fi diff --git a/docker/trove/trove-base/Dockerfile.j2 b/docker/trove/trove-base/Dockerfile.j2 deleted file mode 100644 index a946162dd7..0000000000 --- a/docker/trove/trove-base/Dockerfile.j2 +++ /dev/null @@ -1,33 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block trove_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set trove_base_packages = ['openstack-trove-common'] %} - {% elif base_distro in ['ubuntu'] %} - {% set trove_base_packages = ['trove-common'] %} - {% endif %} - -{{ macros.install_packages(trove_base_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD trove-base-archive /trove-base-source -RUN ln -s trove-base-source/* trove \ - && useradd --user-group trove \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /trove \ - && mkdir -p /etc/trove /var/log/trove /home/trove \ - && cp -r /trove/etc/* /etc/trove/ \ - && chown -R trove: /etc/trove /var/log/trove /home/trove - -{% endif %} - -RUN usermod -a -G kolla trove - -{% block trove_base_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/trove/trove-conductor/Dockerfile.j2 b/docker/trove/trove-conductor/Dockerfile.j2 deleted file mode 100644 index 0941fae5f0..0000000000 --- a/docker/trove/trove-conductor/Dockerfile.j2 +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block trove_conductor_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set trove_conductor_packages = ['openstack-trove-conductor'] %} - {% elif base_distro in ['ubuntu'] %} - {% set trove_conductor_packages = ['trove-conductor'] %} - {% endif %} - -{{ macros.install_packages(trove_conductor_packages | customizable("packages")) }} - -{% endif %} - -{% block trove_conductor_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER trove diff --git a/docker/trove/trove-guestagent/Dockerfile.j2 b/docker/trove/trove-guestagent/Dockerfile.j2 deleted file mode 100644 index bcbe9aa5ac..0000000000 --- a/docker/trove/trove-guestagent/Dockerfile.j2 +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block trove_guestagent_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set trove_guestagent_packages = ['openstack-trove-guestagent'] %} - {% elif base_distro in ['ubuntu'] %} - {% set trove_guestagent_packages = ['trove-guestagent'] %} - {% endif %} - -{{ macros.install_packages(trove_guestagent_packages | customizable("packages")) }} - -{% endif %} - -{% block trove_guestagent_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER trove diff --git a/docker/trove/trove-taskmanager/Dockerfile.j2 b/docker/trove/trove-taskmanager/Dockerfile.j2 deleted file mode 100644 index f594266463..0000000000 --- a/docker/trove/trove-taskmanager/Dockerfile.j2 +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block trove_taskmanager_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set trove_taskmanager_packages = ['openstack-trove-taskmanager'] %} - {% elif base_distro in ['ubuntu'] %} - {% set trove_taskmanager_packages = ['trove-taskmanager'] %} - {% endif %} - -{{ macros.install_packages(trove_taskmanager_packages | customizable("packages")) }} - -{% endif %} - -{% block trove_taskmanager_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER trove diff --git a/docker/vmtp/Dockerfile.j2 b/docker/vmtp/Dockerfile.j2 deleted file mode 100644 index b750791316..0000000000 --- a/docker/vmtp/Dockerfile.j2 +++ /dev/null @@ -1,27 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block vmtp_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% elif install_type == 'source' %} - -RUN pip install vmtp \ - && useradd --user-group vmtp - -{% endif %} - -COPY vmtp_sudoers /etc/sudoers.d/kolla_vmtp_sudoers -RUN chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_vmtp_sudoers \ - && usermod -a -G kolla vmtp - -{% block vmtp_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER vmtp diff --git a/docker/vmtp/vmtp_sudoers b/docker/vmtp/vmtp_sudoers deleted file mode 100644 index fb3a27affc..0000000000 --- a/docker/vmtp/vmtp_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R vmtp\: /var/lib/vmtp, /bin/chown -R vmtp\: /var/lib/vmtp diff --git a/docker/watcher/watcher-api/Dockerfile.j2 b/docker/watcher/watcher-api/Dockerfile.j2 deleted file mode 100644 index 03fc31c285..0000000000 --- a/docker/watcher/watcher-api/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}watcher-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block watcher_api_header %}{% endblock %} - -{% 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_watcher_extend_start -RUN chmod 755 /usr/local/bin/kolla_watcher_extend_start - -{% block watcher_api_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER watcher diff --git a/docker/watcher/watcher-api/extend_start.sh b/docker/watcher/watcher-api/extend_start.sh deleted file mode 100644 index d1ea401bb3..0000000000 --- a/docker/watcher/watcher-api/extend_start.sh +++ /dev/null @@ -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 - watcher-db-manage --config-file /etc/watcher/watcher.conf create_schema - exit 0 -fi diff --git a/docker/watcher/watcher-applier/Dockerfile.j2 b/docker/watcher/watcher-applier/Dockerfile.j2 deleted file mode 100644 index 9a5ffa5737..0000000000 --- a/docker/watcher/watcher-applier/Dockerfile.j2 +++ /dev/null @@ -1,17 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}watcher-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block watcher_applier_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% endif %} - -{% block watcher_applier_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER watcher diff --git a/docker/watcher/watcher-base/Dockerfile.j2 b/docker/watcher/watcher-base/Dockerfile.j2 deleted file mode 100644 index 1e695dc0bb..0000000000 --- a/docker/watcher/watcher-base/Dockerfile.j2 +++ /dev/null @@ -1,33 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block watcher_base_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% elif install_type == 'source' %} - -ADD watcher-base-archive /watcher-base-source -RUN ln -s watcher-base-source/* watcher \ - && useradd --user-group watcher \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /watcher \ - && mkdir -p /etc/watcher /home/watcher \ - && cp -r /watcher/etc/watcher/* /etc/watcher/ \ - && chown -R watcher: /etc/watcher /home/watcher - -{% endif %} - -RUN usermod -a -G kolla watcher - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN usermod -a -G kolla watcher \ - && touch /usr/local/bin/kolla_watcher_extend_start \ - && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_watcher_extend_start - -{% block watcher_base_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} diff --git a/docker/watcher/watcher-base/extend_start.sh b/docker/watcher/watcher-base/extend_start.sh deleted file mode 100644 index 9e27a9cf0e..0000000000 --- a/docker/watcher/watcher-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/watcher" ]]; then - mkdir -p /var/log/kolla/watcher -fi -if [[ $(stat -c %a /var/log/kolla/watcher) != "755" ]]; then - chmod 755 /var/log/kolla/watcher -fi - -. /usr/local/bin/kolla_watcher_extend_start diff --git a/docker/watcher/watcher-engine/Dockerfile.j2 b/docker/watcher/watcher-engine/Dockerfile.j2 deleted file mode 100644 index 3b924d0c70..0000000000 --- a/docker/watcher/watcher-engine/Dockerfile.j2 +++ /dev/null @@ -1,17 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}watcher-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block watcher_engine_header %}{% endblock %} - -{% if install_type == 'binary' %} - -RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ - && /bin/false - -{% endif %} - -{% block watcher_engine_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER watcher diff --git a/docker/zaqar/Dockerfile.j2 b/docker/zaqar/Dockerfile.j2 deleted file mode 100644 index ebc1a70e89..0000000000 --- a/docker/zaqar/Dockerfile.j2 +++ /dev/null @@ -1,40 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block zaqar_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if install_type == 'binary' %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - {% set zaqar_packages = ['openstack-zaqar'] %} -{% elif base_distro in ['ubuntu'] %} - {% set zaqar_packages = [ - 'zaqar-common', - 'zaqar-server' - ] %} -{% endif %} -{{ macros.install_packages(zaqar_packages | customizable("packages")) }} - -{% elif install_type == 'source' %} - -ADD zaqar-archive /zaqar-source -RUN ln -s zaqar-source/* zaqar \ - && useradd --user-group zaqar \ - && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /zaqar \ - && mkdir -p /etc/zaqar /var/log/zaqar /home/zaqar \ - && cp -r /zaqar/etc/* /etc/zaqar/ \ - && chown -R zaqar: /etc/zaqar /var/log/zaqar /home/zaqar - -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start \ - && usermod -a -G kolla zaqar - -{% block zaqar_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER zaqar diff --git a/docker/zaqar/extend_start.sh b/docker/zaqar/extend_start.sh deleted file mode 100644 index 5498227b68..0000000000 --- a/docker/zaqar/extend_start.sh +++ /dev/null @@ -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 - zaqar zaqar-manage db_sync - exit 0 -fi