Merge "Libvirt: Move to lightweight Libvirt 1.3.1 image"

This commit is contained in:
Zuul 2018-02-19 00:53:16 +00:00 committed by Gerrit Code Review
commit e12d626f9c
4 changed files with 96 additions and 7 deletions

View File

@ -27,7 +27,7 @@ labels:
images:
tags:
libvirt: docker.io/kolla/ubuntu-source-nova-libvirt:3.0.3
libvirt: docker.io/openstackhelm/libvirt:ubuntu-xenial-1.3.1
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.2.1
pull_policy: "IfNotPresent"
@ -44,7 +44,7 @@ conf:
listen_tls: "0"
auth_tcp: "none"
ca_file: ""
listen_addr: 0.0.0.0
listen_addr: 127.0.0.1
log_level: "3"
qemu:
stdio_handler: "file"

View File

@ -0,0 +1,40 @@
FROM docker.io/ubuntu:xenial
MAINTAINER pete.birley@att.com
ARG LIBVIRT_VERSION=1.3.1-1ubuntu10.18
ARG CEPH_RELEASE=luminous
ARG PROJECT=nova
ARG UID=42424
ARG GID=42424
ADD https://download.ceph.com/keys/release.asc /etc/apt/ceph-release.asc
RUN set -ex ;\
export DEBIAN_FRONTEND=noninteractive ;\
apt-key add /etc/apt/ceph-release.asc ;\
rm -f /etc/apt/ceph-release.asc ;\
echo deb http://download.ceph.com/debian-${CEPH_RELEASE}/ xenial main | tee /etc/apt/sources.list.d/ceph.list ;\
apt-get update ;\
apt-get upgrade -y ;\
apt-get install --no-install-recommends -y \
ceph-common \
dmidecode \
ebtables \
iproute2 \
libvirt-bin=${LIBVIRT_VERSION} \
pm-utils \
qemu \
qemu-block-extra \
qemu-efi \
openvswitch-switch ;\
groupadd -g ${GID} ${PROJECT} ;\
useradd -u ${UID} -g ${PROJECT} -M -d /var/lib/${PROJECT} -s /usr/sbin/nologin -c "${PROJECT} user" ${PROJECT} ;\
mkdir -p /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} ;\
chown ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} ;\
usermod -a -G kvm ${PROJECT} ;\
apt-get clean -y ;\
rm -rf \
/var/cache/debconf/* \
/var/lib/apt/lists/* \
/var/log/* \
/tmp/* \
/var/tmp/*

View File

@ -0,0 +1,48 @@
Libvirt Container
=================
This container builds a small image with Libvirt for use with OpenStack-Helm.
Instructions
------------
OS Specific Host setup:
~~~~~~~~~~~~~~~~~~~~~~~
Ubuntu:
^^^^^^^
From a freshly provisioned Ubuntu 16.04 LTS host run:
.. code:: bash
sudo apt-get update -y
sudo apt-get install -y \
docker.io \
git
Build the Libvirt Image
~~~~~~~~~~~~~~~~~~~~~~~
A known good image is published to dockerhub on a fairly regular basis, but if
you wish to build your own image, from the root directory of the OpenStack-Helm
repo run:
.. code:: bash
LIBVIRT_VERSION=1.3.1-1ubuntu10.18
DISTRO=ubuntu
DISTRO_RELEASE=xenial
CEPH_RELEASE=luminous
sudo docker build \
--network=host \
--force-rm \
--pull \
--no-cache \
--file=./tools/images/libvirt/Dockerfile.${DISTRO}.xenial \
--build-arg LIBVIRT_VERSION="${LIBVIRT_VERSION}" \
--build-arg CEPH_RELEASE="${CEPH_RELEASE}" \
-t docker.io/openstackhelm/libvirt:${DISTRO}-${DISTRO_RELEASE}-${LIBVIRT_VERSION%-*} \
tools/images/libvirt
sudo docker push docker.io/openstackhelm/libvirt:${DISTRO}-${DISTRO_RELEASE}-${LIBVIRT_VERSION%-*}

View File

@ -51,6 +51,7 @@ images:
ks_endpoints: 'docker.io/kolla/ubuntu-source-heat-engine:3.0.3'
ks_service: 'docker.io/kolla/ubuntu-source-heat-engine:3.0.3'
ks_user: 'docker.io/kolla/ubuntu-source-heat-engine:3.0.3'
libvirt: 'docker.io/kolla/ubuntu-source-nova-libvirt:3.0.3'
magnum_api: 'docker.io/kolla/ubuntu-source-magnum-api:3.0.3'
magnum_conductor: 'docker.io/kolla/ubuntu-source-magnum-conductor:3.0.3'
magnum_db_sync: 'docker.io/kolla/ubuntu-source-magnum-api:3.0.3'