aboutsummaryrefslogtreecommitdiff
path: root/docker/nova/nova-compute
diff options
context:
space:
mode:
authorPaul Bourke <paul.bourke@oracle.com>2016-08-05 11:50:16 +0000
committerPaul Bourke <paul.bourke@oracle.com>2016-08-25 14:06:01 +0100
commitd3c60d0035d62ece4277f59c40aabe570539face (patch)
tree8c453f8a6ba039539bdcfc294d34368a32be476e /docker/nova/nova-compute
parentd8755e173ff6744e13fa73cbc4ed6b384c51a3e3 (diff)
downloadkolla-d3c60d0035d62ece4277f59c40aabe570539face.tar.gz
kolla-d3c60d0035d62ece4277f59c40aabe570539face.zip
Customizations for Nova
Change-Id: I7556d6cd473516c7ceb4aba7c1ba1130af2544ee Partially-implements: blueprint third-party-plugin-support
Diffstat (limited to 'docker/nova/nova-compute')
-rw-r--r--docker/nova/nova-compute/Dockerfile.j2102
1 files changed, 57 insertions, 45 deletions
diff --git a/docker/nova/nova-compute/Dockerfile.j2 b/docker/nova/nova-compute/Dockerfile.j2
index 8e81f725d..3c5b5cc21 100644
--- a/docker/nova/nova-compute/Dockerfile.j2
+++ b/docker/nova/nova-compute/Dockerfile.j2
@@ -1,68 +1,78 @@
FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }}
MAINTAINER {{ maintainer }}
+{% import "macros.j2" as macros with context %}
+
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
-RUN yum -y install \
- openstack-nova-compute \
- openvswitch \
- sysfsutils \
- ceph-common \
- genisoimage \
- iscsi-initiator-utils \
- targetcli \
- python-rtslib \
- && yum clean all
+ {% set nova_compute_packages = [
+ 'openstack-nova-compute',
+ 'openvswitch',
+ 'sysfsutils',
+ 'ceph-common',
+ 'genisoimage',
+ 'iscsi-initiator-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
-RUN apt-get -y install --no-install-recommends \
- nova-compute \
- openvswitch-switch \
- sysfsutils \
- ceph-common \
- ironic-common \
- python-ironicclient \
- genisoimage \
- open-iscsi \
- targetcli \
- python-rtslib \
- && apt-get clean \
- && rm -f /etc/nova/nova-compute.conf
+ # 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',
+ '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', 'fedora', 'oraclelinux', 'rhel'] %}
-RUN yum -y install \
- libvirt-devel \
- openvswitch \
- qemu-img \
- sysfsutils \
- ceph-common \
- genisoimage \
- iscsi-initiator-utils \
- targetcli \
- python-rtslib \
- && yum clean all
+ {% set nova_compute_packages = [
+ 'libvirt-devel',
+ 'openvswitch',
+ 'qemu-img',
+ 'sysfsutils',
+ 'ceph-common',
+ 'genisoimage',
+ 'iscsi-initiator-utils',
+ 'targetcli',
+ 'python-rtslib'
+ ] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
-RUN apt-get -y install --no-install-recommends \
- libvirt-dev \
- qemu-utils \
- ceph-common \
- genisoimage \
- open-iscsi \
- targetcli \
- python-rtslib \
- && apt-get clean \
- && mkdir -p /etc/ceph
+ {% set nova_compute_packages = [
+ 'libvirt-dev',
+ 'qemu-utils',
+ 'ceph-common',
+ 'genisoimage',
+ '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 %}
@@ -73,6 +83,8 @@ RUN chmod 755 /usr/local/bin/kolla_nova_extend_start \
ENV PATH $PATH:/lib/udev
+{% block nova_compute_footer %}{% endblock %}
+{% block footer %}{% endblock %}
{{ include_footer }}
USER nova