Kolla provides production-ready containers and deployment tools for operating OpenStack clouds
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

165 řádky
4.7KB

  1. FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }}
  2. LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
  3. {% block nova_compute_header %}{% endblock %}
  4. {% import "macros.j2" as macros with context %}
  5. {% if install_type == 'binary' %}
  6. {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
  7. {% set nova_compute_packages = [
  8. 'ceph-common',
  9. 'device-mapper-multipath',
  10. 'e2fsprogs',
  11. 'genisoimage',
  12. 'iscsi-initiator-utils',
  13. 'nfs-utils',
  14. 'openstack-nova-compute',
  15. 'openvswitch',
  16. 'parted',
  17. 'python-libguestfs',
  18. 'python-oslo-vmware',
  19. 'python-rtslib',
  20. 'sysfsutils',
  21. 'targetcli',
  22. 'xfsprogs'
  23. ] %}
  24. {{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
  25. {% elif base_distro in ['debian', 'ubuntu'] %}
  26. # ironic as workaround https://bugs.launchpad.net/packstack/+bug/1430388
  27. {% set nova_compute_packages = [
  28. 'ceph-common',
  29. 'e2fsprogs',
  30. 'genisoimage',
  31. 'ironic-common',
  32. 'multipath-tools',
  33. 'nfs-common',
  34. 'nova-compute',
  35. 'openvswitch-switch',
  36. 'open-iscsi',
  37. 'parted',
  38. 'python-guestfs',
  39. 'python-ironicclient',
  40. 'python-oslo.vmware',
  41. 'sysfsutils',
  42. 'xfsprogs'
  43. ] %}
  44. # Debian/stretch uses rtslib-fb (like CentOS does)
  45. # systemd is needed to get python-guestfs installed
  46. {% if base_distro == 'debian' %}
  47. {% set nova_compute_packages = nova_compute_packages + [
  48. 'python-rtslib-fb',
  49. 'systemd/stretch-backports',
  50. 'targetcli-fb'
  51. ] %}
  52. {% elif base_distro == 'ubuntu' %}
  53. {% set nova_compute_packages = nova_compute_packages + [
  54. 'python-rtslib',
  55. 'targetcli'
  56. ] %}
  57. {% endif %}
  58. {{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
  59. RUN rm -f /etc/nova/nova-compute.conf
  60. {% endif %}
  61. {% elif install_type == 'source' %}
  62. {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
  63. {% set nova_compute_packages = [
  64. 'ceph-common',
  65. 'device-mapper-multipath',
  66. 'dosfstools',
  67. 'e2fsprogs',
  68. 'genisoimage',
  69. 'iscsi-initiator-utils',
  70. 'libvirt-python',
  71. 'libosinfo',
  72. 'nfs-utils',
  73. 'openvswitch',
  74. 'parted',
  75. 'python-libguestfs',
  76. 'python-rtslib',
  77. 'qemu-img',
  78. 'sysfsutils',
  79. 'targetcli',
  80. 'xfsprogs'
  81. ] %}
  82. {% elif base_distro in ['debian', 'ubuntu'] %}
  83. {% set nova_compute_packages = [
  84. 'ceph-common',
  85. 'dosfstools',
  86. 'e2fsprogs',
  87. 'genisoimage',
  88. 'libosinfo-bin',
  89. 'multipath-tools',
  90. 'nfs-common',
  91. 'open-iscsi',
  92. 'parted',
  93. 'python-guestfs',
  94. 'python-libvirt',
  95. 'qemu-utils',
  96. 'xfsprogs'
  97. ] %}
  98. {% if base_arch == "aarch64" %}
  99. {% set nova_compute_packages = nova_compute_packages + [
  100. 'qemu-efi'
  101. ] %}
  102. {% endif %}
  103. # Debian/stretch uses rtslib-fb (like CentOS does)
  104. # systemd is needed to get python-guestfs installed
  105. {% if base_distro == 'debian' %}
  106. {% set nova_compute_packages = nova_compute_packages + [
  107. 'python-rtslib-fb',
  108. 'systemd/stretch-backports',
  109. 'targetcli-fb'
  110. ] %}
  111. {% elif base_distro == 'ubuntu' %}
  112. {% set nova_compute_packages = nova_compute_packages + [
  113. 'python-rtslib',
  114. 'targetcli'
  115. ] %}
  116. {% endif %}
  117. RUN mkdir -p /etc/ceph
  118. {% endif %}
  119. {{ macros.install_packages(nova_compute_packages | customizable("packages")) }}
  120. {% set nova_compute_pip_packages = [
  121. 'oslo-vmware'
  122. ]
  123. %}
  124. {% set nova_compute_plugins_pip_packages = [
  125. '/plugins/*'
  126. ] %}
  127. ADD plugins-archive /
  128. RUN {{ macros.install_pip(nova_compute_pip_packages | customizable("pip_packages")) }} \
  129. && if [ "$(ls /plugins)" ]; then \
  130. {{ macros.install_pip(nova_compute_plugins_pip_packages | customizable("pip_packages")) }}; \
  131. fi
  132. {% endif %}
  133. COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start
  134. RUN chmod 755 /usr/local/bin/kolla_nova_extend_start \
  135. && rm -f /etc/machine-id
  136. {% block nova_compute_footer %}{% endblock %}
  137. {% block footer %}{% endblock %}
  138. USER nova