aboutsummaryrefslogtreecommitdiff
path: root/docker_templates/nova/nova-base
diff options
context:
space:
mode:
authorSam Yaple <sam@yaple.net>2015-08-16 03:30:08 +0000
committerSam Yaple <sam@yaple.net>2015-08-20 09:28:09 +0000
commitb89575b419979cc6ed76bf0f56dd45f34b0aac55 (patch)
tree756699cd5b977d0babaac778a84292ef96cfe95b /docker_templates/nova/nova-base
parenta760549e78d2a36b2684dc75f521b5d05bb501b2 (diff)
downloadkolla-b89575b419979cc6ed76bf0f56dd45f34b0aac55.tar.gz
kolla-b89575b419979cc6ed76bf0f56dd45f34b0aac55.zip
Add Dockerfile template for nova
Change-Id: I11fd26950f76be2200730e333e365ef74dfd5747 Partially-Implements: blueprint dockerfile-template
Diffstat (limited to 'docker_templates/nova/nova-base')
-rw-r--r--docker_templates/nova/nova-base/Dockerfile.j252
1 files changed, 52 insertions, 0 deletions
diff --git a/docker_templates/nova/nova-base/Dockerfile.j2 b/docker_templates/nova/nova-base/Dockerfile.j2
new file mode 100644
index 000000000..46ce0e2e0
--- /dev/null
+++ b/docker_templates/nova/nova-base/Dockerfile.j2
@@ -0,0 +1,52 @@
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+{% if install_type == 'binary' %}
+ {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
+
+RUN yum -y install \
+ openstack-nova-common \
+ python-keystoneclient \
+ python-cinderclient \
+ python-nova \
+ bridge-utils \
+ && yum clean all
+
+ {% 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 ['fedora', 'centos', 'oraclelinux'] %}
+
+RUN yum -y install \
+ bridge-utils \
+ && yum clean all
+
+ {% elif base_distro in ['ubuntu', 'debian'] %}
+
+RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
+ && /bin/false
+
+ {% endif %}
+
+RUN pip install \
+ python-cinderclient \
+ python-keystoneclient
+
+ADD ./nova.tar /
+RUN ln -s /nova-* /nova
+
+RUN cd /nova \
+ && useradd --user-group nova \
+ && pip install -r requirements.txt \
+ && pip install /nova \
+ && tox -egenconfig \
+ && mkdir /etc/nova /var/log/nova \
+ && cp -r /nova/etc/nova/* /etc/nova/ \
+ && chown -R nova: /etc/nova /var/log/nova \
+ && rm -rf /root/.cache
+
+{% endif %}