Ubuntu - Nova

Makes the tweaks to get Nova working on Ubuntu properly

Change-Id: I812f8878650b6412781e991ba34cc6187d7ff994
Partially-Implements: blueprint install-from-ubuntu
This commit is contained in:
Sam Yaple 2015-08-22 11:46:47 +00:00
parent dc0abd1019
commit a070839b1f
6 changed files with 44 additions and 17 deletions

View File

@ -58,6 +58,11 @@ type = url
location = http://tarballs.openstack.org/nova/nova-master.tar.gz location = http://tarballs.openstack.org/nova/nova-master.tar.gz
dest_filename = nova.tar dest_filename = nova.tar
[nova-novncproxy]
type = url
location = http://github.com/kanaka/noVNC/tarball/v0.5.1
dest_filename = novnc.tar
[swift-base] [swift-base]
type = url type = url
location = http://tarballs.openstack.org/swift/swift-master.tar.gz location = http://tarballs.openstack.org/swift/swift-master.tar.gz

View File

@ -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 # 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 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 # TODO(SamYaple): Switch this to the Liberty repo as soon as the update packages
# main ones are qemu, libvirt, and openvswitch # and actually start signing them.
deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/liberty main # 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 # MariaDB 10.0 repo
deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main

View File

@ -27,26 +27,28 @@ RUN yum -y install \
{% elif base_distro in ['ubuntu', 'debian'] %} {% elif base_distro in ['ubuntu', 'debian'] %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ RUN apt-get install -y --no-install-recommends \
&& /bin/false iptables \
ebtables \
dnsmasq \
bridge-utils \
python-libvirt \
openssh-client \
openvswitch-switch \
&& apt-get clean
{% endif %} {% endif %}
RUN pip install \
python-cinderclient \
python-keystoneclient
ADD ./nova.tar / ADD ./nova.tar /
RUN ln -s /nova-* /nova RUN ln -s /nova-* /nova
RUN cd /nova \ RUN cd /nova \
&& useradd --user-group nova \ && useradd --user-group nova \
&& pip install -r requirements.txt \ && pip install -r requirements.txt \
&& pip install /nova \ && pip install --install-option="--install-scripts=/usr/bin" /nova \
&& tox -egenconfig \ && mkdir /etc/nova /var/log/nova /home/nova \
&& mkdir /etc/nova /var/log/nova \
&& cp -r /nova/etc/nova/* /etc/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 && rm -rf /root/.cache
{% endif %} {% endif %}

View File

@ -11,17 +11,22 @@ RUN yum -y install openstack-nova-compute \
{% endif %} {% endif %}
{% elif install_type == 'source' %} {% elif install_type == 'source' %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
RUN yum -y install \ RUN yum -y install \
sysfsutils \ sysfsutils \
libvirt-python \ libvirt-python \
&& yum clean all && yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends qemu-utils \
&& apt-get clean
{% endif %}
{% endif %} {% endif %}
COPY start.sh / COPY start.sh /
COPY config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
VOLUME [ "/sys/fs/cgroup" ]
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -12,11 +12,19 @@ RUN yum -y install \
libvirt-daemon-driver-lxc \ libvirt-daemon-driver-lxc \
&& yum clean all && 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 %} {% endif %}
COPY start.sh / COPY start.sh /
COPY config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
VOLUME [ "/sys/fs/cgroup" ]
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -18,6 +18,11 @@ RUN yum -y install \
novnc \ novnc \
&& yum clean all && yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
ADD novnc.tar /
RUN ln -s /kanaka-noVNC-* /usr/share/novnc
{% endif %} {% endif %}
{% endif %} {% endif %}