aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Yaple <sam@yaple.net>2015-08-22 11:46:47 +0000
committerSam Yaple <sam@yaple.net>2015-08-23 04:00:20 +0000
commita070839b1f61e1cdd7bbcb0b943cd1683f19f093 (patch)
tree23dbe1d48dd97b32cbfb850716e24e685fcc83bc
parentdc0abd101903b6ff1906ae15a39d40786dd98c9b (diff)
downloadkolla-a070839b1f61e1cdd7bbcb0b943cd1683f19f093.tar.gz
kolla-a070839b1f61e1cdd7bbcb0b943cd1683f19f093.zip
Ubuntu - Nova
Makes the tweaks to get Nova working on Ubuntu properly Change-Id: I812f8878650b6412781e991ba34cc6187d7ff994 Partially-Implements: blueprint install-from-ubuntu
-rw-r--r--build.ini5
-rw-r--r--docker_templates/base/sources.list8
-rw-r--r--docker_templates/nova/nova-base/Dockerfile.j222
-rw-r--r--docker_templates/nova/nova-compute/Dockerfile.j29
-rw-r--r--docker_templates/nova/nova-libvirt/Dockerfile.j212
-rw-r--r--docker_templates/nova/nova-novncproxy/Dockerfile.j25
6 files changed, 44 insertions, 17 deletions
diff --git a/build.ini b/build.ini
index 0330fc00e..4a64567cb 100644
--- a/build.ini
+++ b/build.ini
@@ -58,6 +58,11 @@ type = url
location = http://tarballs.openstack.org/nova/nova-master.tar.gz
dest_filename = nova.tar
+[nova-novncproxy]
+type = url
+location = http://github.com/kanaka/noVNC/tarball/v0.5.1
+dest_filename = novnc.tar
+
[swift-base]
type = url
location = http://tarballs.openstack.org/swift/swift-master.tar.gz
diff --git a/docker_templates/base/sources.list b/docker_templates/base/sources.list
index 331a3b1f0..ccb6f8d25 100644
--- a/docker_templates/base/sources.list
+++ b/docker_templates/base/sources.list
@@ -6,9 +6,11 @@ deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe m
# Backports have a lower priority and must be explictly installed to be used
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
-# We need to add the Liberty repo for the updated packages they provide. The
-# main ones are qemu, libvirt, and openvswitch
-deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/liberty main
+# TODO(SamYaple): Switch this to the Liberty repo as soon as the update packages
+# and actually start signing them.
+# We need to add the Kilo repo for the updated packages they provide. The main
+# ones are qemu, libvirt, and openvswitch.
+deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/kilo main
# MariaDB 10.0 repo
deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main
diff --git a/docker_templates/nova/nova-base/Dockerfile.j2 b/docker_templates/nova/nova-base/Dockerfile.j2
index 46ce0e2e0..8e117e69e 100644
--- a/docker_templates/nova/nova-base/Dockerfile.j2
+++ b/docker_templates/nova/nova-base/Dockerfile.j2
@@ -27,26 +27,28 @@ RUN yum -y install \
{% elif base_distro in ['ubuntu', 'debian'] %}
-RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
- && /bin/false
+RUN apt-get install -y --no-install-recommends \
+ iptables \
+ ebtables \
+ dnsmasq \
+ bridge-utils \
+ python-libvirt \
+ openssh-client \
+ openvswitch-switch \
+ && apt-get clean
{% 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 \
+ && pip install --install-option="--install-scripts=/usr/bin" /nova \
+ && mkdir /etc/nova /var/log/nova /home/nova \
&& cp -r /nova/etc/nova/* /etc/nova/ \
- && chown -R nova: /etc/nova /var/log/nova \
+ && chown -R nova: /etc/nova /var/log/nova /home/nova \
&& rm -rf /root/.cache
{% endif %}
diff --git a/docker_templates/nova/nova-compute/Dockerfile.j2 b/docker_templates/nova/nova-compute/Dockerfile.j2
index 84dd5d3d8..214cde4fe 100644
--- a/docker_templates/nova/nova-compute/Dockerfile.j2
+++ b/docker_templates/nova/nova-compute/Dockerfile.j2
@@ -11,17 +11,22 @@ RUN yum -y install openstack-nova-compute \
{% endif %}
{% elif install_type == 'source' %}
+ {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
RUN yum -y install \
sysfsutils \
libvirt-python \
&& yum clean all
+ {% elif base_distro in ['ubuntu', 'debian'] %}
+
+RUN apt-get install -y --no-install-recommends qemu-utils \
+ && apt-get clean
+
+ {% endif %}
{% endif %}
COPY start.sh /
COPY config-external.sh /opt/kolla/
-VOLUME [ "/sys/fs/cgroup" ]
-
CMD ["/start.sh"]
diff --git a/docker_templates/nova/nova-libvirt/Dockerfile.j2 b/docker_templates/nova/nova-libvirt/Dockerfile.j2
index 691ec8133..29e0843c3 100644
--- a/docker_templates/nova/nova-libvirt/Dockerfile.j2
+++ b/docker_templates/nova/nova-libvirt/Dockerfile.j2
@@ -12,11 +12,19 @@ RUN yum -y install \
libvirt-daemon-driver-lxc \
&& yum clean all
+{% elif base_distro in ['ubuntu', 'debian'] %}
+
+RUN apt-get install -y --no-install-recommends \
+ libvirt-bin \
+ dmidecode \
+ pm-utils \
+ qemu \
+ ebtables \
+ && apt-get clean
+
{% endif %}
COPY start.sh /
COPY config-external.sh /opt/kolla/
-VOLUME [ "/sys/fs/cgroup" ]
-
CMD ["/start.sh"]
diff --git a/docker_templates/nova/nova-novncproxy/Dockerfile.j2 b/docker_templates/nova/nova-novncproxy/Dockerfile.j2
index 58a4664bd..4ddc7e6c3 100644
--- a/docker_templates/nova/nova-novncproxy/Dockerfile.j2
+++ b/docker_templates/nova/nova-novncproxy/Dockerfile.j2
@@ -18,6 +18,11 @@ RUN yum -y install \
novnc \
&& yum clean all
+ {% elif base_distro in ['ubuntu', 'debian'] %}
+
+ADD novnc.tar /
+RUN ln -s /kanaka-noVNC-* /usr/share/novnc
+
{% endif %}
{% endif %}