Libvirt: Ubuntu Bionic image
This PS adds a libvirt image based on the bionic release of Ubuntu. Change-Id: Id87dc3f6a280cf91b3a31a1f847ea1439cbfa797 Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
5fe1e47157
commit
03e66fa9a8
|
@ -0,0 +1,23 @@
|
|||
ARG FROM=docker.io/ubuntu:bionic
|
||||
FROM ${FROM}
|
||||
LABEL maintainer="pete.birley@att.com"
|
||||
|
||||
ARG UBUNTU_RELEASE=bionic
|
||||
ARG CEPH_RELEASE=mimic
|
||||
ARG PROJECT=nova
|
||||
ARG UID=42424
|
||||
ARG GID=42424
|
||||
|
||||
ARG CEPH_REPO=http://download.ceph.com/debian-${CEPH_RELEASE}/
|
||||
ARG CEPH_KEY=http://download.ceph.com/keys/release.asc
|
||||
|
||||
ADD ${CEPH_KEY} /etc/apt/ceph-${CEPH_RELEASE}.key
|
||||
COPY ./ubuntu-install-libvirt.sh /tmp/ubuntu-install-libvirt.sh
|
||||
RUN set -ex ;\
|
||||
export DEBIAN_FRONTEND=noninteractive ;\
|
||||
apt-get update ;\
|
||||
apt-get upgrade -y ;\
|
||||
apt-get install --no-install-recommends -y \
|
||||
gnupg ;\
|
||||
/tmp/ubuntu-install-libvirt.sh ;\
|
||||
rm -rf /tmp/*
|
|
@ -1,6 +1,8 @@
|
|||
FROM docker.io/ubuntu:xenial
|
||||
ARG FROM=docker.io/ubuntu:xenial
|
||||
FROM ${FROM}
|
||||
LABEL maintainer="pete.birley@att.com"
|
||||
|
||||
ARG UBUNTU_RELEASE=xenial
|
||||
ARG CEPH_RELEASE=mimic
|
||||
ARG PROJECT=nova
|
||||
ARG UID=42424
|
||||
|
@ -10,34 +12,7 @@ ARG CEPH_REPO=http://download.ceph.com/debian-${CEPH_RELEASE}/
|
|||
ARG CEPH_KEY=http://download.ceph.com/keys/release.asc
|
||||
|
||||
ADD ${CEPH_KEY} /etc/apt/ceph-${CEPH_RELEASE}.key
|
||||
COPY ./ubuntu-install-libvirt.sh /tmp/ubuntu-install-libvirt.sh
|
||||
RUN set -ex ;\
|
||||
export DEBIAN_FRONTEND=noninteractive ;\
|
||||
apt-key add /etc/apt/ceph-${CEPH_RELEASE}.key ;\
|
||||
rm -f /etc/apt/ceph-${CEPH_RELEASE}.key ;\
|
||||
echo "deb ${CEPH_REPO} 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 \
|
||||
cgroup-tools \
|
||||
dmidecode \
|
||||
ebtables \
|
||||
iproute2 \
|
||||
libvirt-bin \
|
||||
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/*
|
||||
/tmp/ubuntu-install-libvirt.sh ;\
|
||||
rm -rf /tmp/*
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
#/bin/bash
|
||||
set -ex
|
||||
export DEBIAN_FRONTEND=noninteractive ;\
|
||||
apt-key add /etc/apt/ceph-${CEPH_RELEASE}.key ;\
|
||||
rm -f /etc/apt/ceph-${CEPH_RELEASE}.key ;\
|
||||
echo "deb ${CEPH_REPO} ${UBUNTU_RELEASE} 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 \
|
||||
cgroup-tools \
|
||||
dmidecode \
|
||||
ebtables \
|
||||
iproute2 \
|
||||
libvirt-bin \
|
||||
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/*
|
|
@ -46,6 +46,12 @@
|
|||
tags:
|
||||
- latest-ubuntu_xenial
|
||||
- "ubuntu_xenial-{{ currentdate }}"
|
||||
- context: libvirt
|
||||
repository: openstackhelm/libvirt
|
||||
dockerfile: Dockerfile.ubuntu_bionic
|
||||
tags:
|
||||
- latest-ubuntu_bionic
|
||||
- "ubuntu_bionic-{{ currentdate }}"
|
||||
files: &libvirt_files
|
||||
- libvirt/.*
|
||||
- zuul.d/libvirt.yaml
|
||||
|
|
Loading…
Reference in New Issue