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 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
  2. LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
  3. {% block cinder_base_header %}{% endblock %}
  4. {% import "macros.j2" as macros with context %}
  5. {{ macros.configure_user(name='cinder') }}
  6. {% if install_type == 'binary' %}
  7. {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
  8. {% set cinder_base_packages = [
  9. 'ceph-common',
  10. 'lvm2',
  11. 'cryptsetup',
  12. 'openstack-cinder',
  13. 'python-automaton',
  14. 'python-oslo-vmware'
  15. ] %}
  16. {% elif base_distro in ['debian', 'ubuntu'] %}
  17. {% set cinder_base_packages = [
  18. 'ceph-common',
  19. 'cinder-common',
  20. 'lvm2',
  21. 'cryptsetup',
  22. 'python-oslo.vmware'
  23. ] %}
  24. {% endif %}
  25. {{ macros.install_packages(cinder_base_packages | customizable("packages")) }}
  26. {% elif install_type == 'source' %}
  27. {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
  28. {% set cinder_base_packages = [
  29. 'ceph-common',
  30. 'lvm2',
  31. 'cryptsetup',
  32. 'qemu-img-ev'
  33. ] %}
  34. {% elif base_distro in ['debian', 'ubuntu'] %}
  35. {% set cinder_base_packages = [
  36. 'ceph-common',
  37. 'lvm2',
  38. 'cryptsetup',
  39. 'qemu-utils'
  40. ] %}
  41. {% endif %}
  42. {{ macros.install_packages(cinder_base_packages | customizable("packages")) }}
  43. {% set cinder_base_pip_packages = [
  44. '/cinder'
  45. ] %}
  46. ADD cinder-base-archive /cinder-base-source
  47. RUN ln -s cinder-base-source/* cinder \
  48. && {{ macros.install_pip(cinder_base_pip_packages | customizable("pip_packages")) }} \
  49. && mkdir -p /etc/cinder \
  50. && cp -r /cinder/etc/cinder/* /etc/cinder/ \
  51. && chown -R cinder: /etc/cinder \
  52. && 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
  53. {% endif %}
  54. COPY cinder_sudoers /etc/sudoers.d/kolla_cinder_sudoers
  55. COPY extend_start.sh /usr/local/bin/kolla_extend_start
  56. RUN chmod 750 /etc/sudoers.d \
  57. && chmod 440 /etc/sudoers.d/kolla_cinder_sudoers \
  58. && touch /usr/local/bin/kolla_cinder_extend_start \
  59. && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_cinder_extend_start
  60. {% block cinder_base_footer %}{% endblock %}