Kolla provides production-ready containers and deployment tools for operating OpenStack clouds
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile.j2 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
  2. LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
  3. {% block monasca_base_header %}{% endblock %}
  4. {% import "macros.j2" as macros with context %}
  5. {{ macros.configure_user(name='monasca') }}
  6. {% if install_type == 'binary' %}
  7. RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
  8. && /bin/false
  9. {% elif install_type == 'source' %}
  10. {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
  11. {% set monasca_base_packages = [
  12. 'httpd',
  13. 'mod_ssl',
  14. 'mod_wsgi'
  15. ] %}
  16. {{ macros.install_packages(monasca_base_packages | customizable("packages")) }}
  17. RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
  18. && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
  19. {% elif base_distro in ['debian', 'ubuntu'] %}
  20. {% set monasca_base_packages = [
  21. 'apache2',
  22. 'libapache2-mod-wsgi',
  23. ] %}
  24. {{ macros.install_packages(monasca_base_packages | customizable("packages")) }}
  25. RUN truncate -s 0 /etc/apache2/ports.conf
  26. {% endif %}
  27. {% block monasca_source_install %}
  28. {% set monasca_base_pip_packages = [
  29. ] %}
  30. RUN {{ macros.install_pip(monasca_base_pip_packages | customizable("pip_packages")) }} \
  31. && mkdir -p /etc/monasca \
  32. && chown -R monasca: /etc/monasca
  33. {% endblock %}
  34. {% endif %}
  35. COPY extend_start.sh /usr/local/bin/kolla_extend_start
  36. RUN touch /usr/local/bin/kolla_monasca_extend_start \
  37. && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_monasca_extend_start
  38. {% block monasca_base_footer %}{% endblock %}