
This patch adds image building process for OSH. Each root folder contains a 'kind' of images to build. Each folder will have its own parent job, inheriting from a 'openstack-helm-images-base' job. The folder 'parent job' is used for building distribution variants (centos_7, ubuntu_xenial, opensuse_15). Folders containing Dockerfiles (a different Dockerfiles per distribution) will use the docker building play (docker-build.yml). Dockerfiles come from openstack-helm-infra repository, with the following changes: * The deprecated "MAINTAINER" directive has been replaced with LABEL maintainer=<maintaineremail> * If Dockerfiles' default arguments were mismatching the documentation or Makefiles, they were adapted (see libvirt). * Relative paths to the openstack-helm-infra repo have been removed. Each folder is given a convenience build script (build.sh) which can be used to build a specific image manually. This script's content gets included in the documentation to avoid duplications of content. This patch focuses on each image separately. Another patch will be added to deal with a repo-wide image building process, whether for CI purposes, or for developer's purposes, with the help of a Makefile. Note: Kubeadm-aio image was not imported in this process due to circular dependencies: Image building currently requires the helm charts of openstack-helm-infra. Change-Id: I2d01e3f2c34d6dd7db4a1c3897dc4b994bf02623
42 lines
1.4 KiB
Docker
42 lines
1.4 KiB
Docker
FROM docker.io/ubuntu:xenial
|
|
LABEL maintainer="pete.birley@att.com"
|
|
|
|
ARG LIBVIRT_VERSION="1.3.1-1ubuntu10.24"
|
|
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 \
|
|
cgroup-tools \
|
|
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/*
|