Merge "Makefile and Docker file for ceph containers."
This commit is contained in:
commit
6f084e21c1
|
@ -0,0 +1,62 @@
|
||||||
|
# Copyright 2017 The Openstack-Helm Authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
ifndef IMAGE_NAME
|
||||||
|
$(error The TAG variable is missing.)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef OS_RELEASE
|
||||||
|
$(error The ENV variable is missing.)
|
||||||
|
endif
|
||||||
|
|
||||||
|
SHELL := /bin/bash
|
||||||
|
|
||||||
|
DOCKER_REGISTRY ?= quay.io
|
||||||
|
IMAGE_PREFIX ?= att-comdev
|
||||||
|
IMAGE_TAG ?= latest
|
||||||
|
|
||||||
|
# Set the image
|
||||||
|
# eg: quay.io/att-comdev/ceph-config-helper:latest
|
||||||
|
IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${IMAGE_NAME}:${IMAGE_TAG}
|
||||||
|
|
||||||
|
# Build Docker image for this project
|
||||||
|
.PHONY: images
|
||||||
|
images: build_$(IMAGE_NAME)
|
||||||
|
|
||||||
|
# Make targets intended for use by the primary targets above.
|
||||||
|
.PHONY: build_$(IMAGE_NAME)
|
||||||
|
build_$(IMAGE_NAME):
|
||||||
|
ifeq ($(OS_RELEASE), ubuntu_xenial)
|
||||||
|
docker build -f $(IMAGE_NAME)/Dockerfile.$(OS_RELEASE) \
|
||||||
|
--network host \
|
||||||
|
-t $(IMAGE) \
|
||||||
|
.
|
||||||
|
else ifeq ($(OS_RELEASE), suse_15)
|
||||||
|
docker build -f $(IMAGE_NAME)/Dockerfile.$(OS_RELEASE) \
|
||||||
|
--network host \
|
||||||
|
-t $(IMAGE) \
|
||||||
|
.
|
||||||
|
else ifeq ($(OS_RELEASE), debian)
|
||||||
|
docker build -f $(IMAGE_NAME)/Dockerfile.$(OS_RELEASE) \
|
||||||
|
--network host \
|
||||||
|
-t $(IMAGE) \
|
||||||
|
.
|
||||||
|
else ifeq ($(OS_RELEASE), centos_7)
|
||||||
|
docker build -f $(IMAGE_NAME)/Dockerfile.$(OS_RELEASE) \
|
||||||
|
--network host \
|
||||||
|
-t $(IMAGE) \
|
||||||
|
.
|
||||||
|
else
|
||||||
|
docker build -t $(IMAGE) --network=host -f $(IMAGE_NAME)/Dockerfile.simple \
|
||||||
|
.
|
||||||
|
endif
|
|
@ -0,0 +1,14 @@
|
||||||
|
Makefile For Ceph images
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
This is a make and dockerfile for containers. This can be used to create docker images using different releases and os releases
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
make IMAGE_NAME=<> OS_RELEASE=<>
|
||||||
|
eg:
|
||||||
|
|
||||||
|
make IMAGE_NAME=ceph-daemon OS_RELEASE=ubuntu_xenial
|
||||||
|
|
||||||
|
make IMAGE_NAME=openvswitch OS_RELEASE=debian
|
||||||
|
|
|
@ -3,11 +3,12 @@ FROM ${FROM}
|
||||||
LABEL maintainers=stephane@alum.mit.edu
|
LABEL maintainers=stephane@alum.mit.edu
|
||||||
|
|
||||||
ARG KUBE_VERSION=v1.10.3
|
ARG KUBE_VERSION=v1.10.3
|
||||||
ARG CEPH_RELEASE=luminous
|
ARG CEPH_RELEASE=mimic
|
||||||
RUN set -ex ;\
|
RUN set -ex ;\
|
||||||
TMP_DIR=$(mktemp --directory) ;\
|
TMP_DIR=$(mktemp --directory) ;\
|
||||||
cd ${TMP_DIR} ;\
|
cd ${TMP_DIR} ;\
|
||||||
zypper refresh ;\
|
zypper ar https://download.opensuse.org/repositories/filesystems:/ceph:/${CEPH_RELEASE}/openSUSE_Leap_15.0/ ${CEPH_RELEASE} ;\
|
||||||
|
zypper --gpg-auto-import-keys refresh ;\
|
||||||
zypper up -y ;\
|
zypper up -y ;\
|
||||||
zypper install -y \
|
zypper install -y \
|
||||||
ca-certificates-cacert \
|
ca-certificates-cacert \
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
FROM docker.io/ubuntu:xenial
|
ARG FROM=docker.io/ubuntu:xenial
|
||||||
LABEL maintainer="pete.birley@att.com"
|
FROM ${FROM}
|
||||||
|
|
||||||
ARG KUBE_VERSION=v1.10.3
|
ARG KUBE_VERSION=v1.10.3
|
||||||
ARG CEPH_RELEASE=luminous
|
ARG CEPH_RELEASE=mimic
|
||||||
|
|
||||||
ADD https://download.ceph.com/keys/release.asc /etc/apt/ceph-release.asc
|
ADD https://download.ceph.com/keys/release.asc /etc/apt/ceph-release.asc
|
||||||
RUN set -ex ;\
|
RUN set -ex ;\
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
FROM docker.io/ubuntu:xenial
|
ARG FROM=docker.io/ubuntu:xenial
|
||||||
|
FROM ${FROM}
|
||||||
MAINTAINER matthew.heler@hotmail.com
|
MAINTAINER matthew.heler@hotmail.com
|
||||||
|
|
||||||
ARG KUBE_VERSION=1.12.2
|
ARG KUBE_VERSION=1.12.2
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
ARG FROM=docker.io/ubuntu:xenial
|
||||||
|
FROM ${FROM}
|
||||||
|
|
||||||
|
ARG CEPH_RELEASE=mimic
|
||||||
|
|
||||||
|
RUN set -xe \
|
||||||
|
&& sed -i '/nobody/d' /etc/passwd \
|
||||||
|
&& echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/bash" >> /etc/passwd \
|
||||||
|
&& apt-get update && apt-get install -y wget curl apt-transport-https gnupg\
|
||||||
|
&& wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add - \
|
||||||
|
&& echo deb https://download.ceph.com/debian-${CEPH_RELEASE}/ xenial main | tee /etc/apt/sources.list.d/ceph.list \
|
||||||
|
&& apt-get update && apt-get install -y bash python-oslo.rootwrap moreutils vim sudo screen ceph-common python-rbd radosgw rsyslog x11-apps jq \
|
||||||
|
&& apt-get remove --purge -y wget apt-transport-https && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
|
&& pip --no-cache-dir install --upgrade rgwadmin crush
|
||||||
|
|
||||||
|
CMD ["/bin/bash"]
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
SCRIPT=`realpath $0`
|
||||||
|
SCRIPT_DIR=`dirname ${SCRIPT}`
|
||||||
|
## Only build from main folder
|
||||||
|
cd ${SCRIPT_DIR}/..
|
||||||
|
|
||||||
|
IMAGE="ceph-utility"
|
||||||
|
VERSION=${VERSION:-latest}
|
||||||
|
DISTRO=${DISTRO:-ubuntu_xenial}
|
||||||
|
REGISTRY_URI=${REGISTRY_URI:-"openstackhelm/"}
|
||||||
|
EXTRA_TAG_INFO=${EXTRA_TAG_INFO:-""}
|
||||||
|
docker build -f ${IMAGE}/Dockerfile.${DISTRO} --network=host -t ${REGISTRY_URI}${IMAGE}:${VERSION}-${DISTRO}${EXTRA_TAG_INFO} ${extra_build_args} ${IMAGE}
|
||||||
|
|
||||||
|
cd -
|
|
@ -2,7 +2,7 @@ FROM docker.io/ubuntu:xenial
|
||||||
LABEL maintainer="pete.birley@att.com"
|
LABEL maintainer="pete.birley@att.com"
|
||||||
|
|
||||||
ARG LIBVIRT_VERSION="1.3.1-1ubuntu10.24"
|
ARG LIBVIRT_VERSION="1.3.1-1ubuntu10.24"
|
||||||
ARG CEPH_RELEASE=luminous
|
ARG CEPH_RELEASE=mimic
|
||||||
ARG PROJECT=nova
|
ARG PROJECT=nova
|
||||||
ARG UID=42424
|
ARG UID=42424
|
||||||
ARG GID=42424
|
ARG GID=42424
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
---
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
- project:
|
||||||
|
check:
|
||||||
|
jobs:
|
||||||
|
- openstack-helm-images-ceph-utility-ubuntu_xenial:
|
||||||
|
files: &ceph-ubuntuxenial-files
|
||||||
|
- ^ceph-utility/build.sh
|
||||||
|
- ^ceph-utility/Dockerfile.ubuntu_xenial$
|
||||||
|
- ^zuul.d/ceph-utility.yaml
|
||||||
|
gate:
|
||||||
|
jobs:
|
||||||
|
- openstack-helm-images-ceph-utility-ubuntu_xenial:
|
||||||
|
files: *ceph-ubuntuxenial-files
|
||||||
|
periodic:
|
||||||
|
jobs:
|
||||||
|
- openstack-helm-images-ceph-utility-ubuntu_xenial
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: openstack-helm-images-ceph-utility
|
||||||
|
parent: openstack-helm-images-base
|
||||||
|
abstract: true
|
||||||
|
vars:
|
||||||
|
image_path: ceph-utility
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: openstack-helm-images-ceph-utility-ubuntu_xenial
|
||||||
|
parent: openstack-helm-images-ceph-utility
|
||||||
|
vars:
|
||||||
|
distro: "ubuntu_xenial"
|
Loading…
Reference in New Issue