Skip to content

Commit

Permalink
Merge pull request #83 from peng9808/main
Browse files Browse the repository at this point in the history
fix drbd-utils install failed bug
  • Loading branch information
peng9808 committed Aug 28, 2024
2 parents ce5fbe2 + a290bac commit 0577118
Show file tree
Hide file tree
Showing 23 changed files with 432 additions and 399 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL := /bin/bash
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))

CHART_VER ?= 0.4.1
CHART_VER ?= 0.4.2
DRBD_VER ?= 9.0.32-1# another tested value is: 9.1.11
DRBD_UTILS_VER ?= 9.12.1# another tested value is: 9.21.4

Expand Down Expand Up @@ -29,7 +29,7 @@ update_chart_ver:

drbd9:
cd docker-drbd9 && \
./build.sh $(DRBD_VER) $(ARCH) $(REG) $(IMG)
./build.sh $(DRBD_VER) $(ARCH) $(REG) $(CHART_VER) $(IMG)

compiler-centos7:
for a in $(shell echo $(ARCH) | tr ',' ' '); do \
Expand Down Expand Up @@ -112,7 +112,7 @@ test:
push:
set -x; \
for i in $(IMG); do \
[ $$i = "shipper" ] && ver=$(DRBD_VER)_v$(CHART_VER) || ver=$(DRBD_VER); \
ver=$(DRBD_VER)_v$(CHART_VER); \
docker manifest rm $(REG)/drbd9-$$i:v$${ver}; \
for a in $(shell echo $(ARCH) | tr ',' ' ' ); do \
docker push $(REG)/drbd9-$$i:v$${ver}_$${a/\//-} || \
Expand Down
20 changes: 1 addition & 19 deletions docker-drbd9/Dockerfile.bionic
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
FROM ubuntu:bionic
From ghcr.io/hwameistor/drbd9-bionic:v9.0.32-1

# note: py2 setuptools are a bit smaller than the py3 ones
RUN apt-get update && apt-get install -y kmod gnupg wget make gcc patch curl && \
apt-get install -y python-setuptools && apt-get clean && \
cd /tmp && wget https://github.com/LINBIT/python-lbdist/archive/master.tar.gz && \
tar xvf master.tar.gz && \
( cd python-lbdist-master && python setup.py install ) && \
rm -rf python-lbdist-master master.tar.gz

COPY /drbd.tar.gz /

COPY /pkgs /pkgs
COPY /config-drbd.sh /
COPY /entry.sh /
RUN chmod +x /entry.sh

# link python3
RUN ln -vs /usr/bin/python2 /usr/bin/python3
RUN ln -vs /usr/bin/python2 /usr/bin/python3.6

ENTRYPOINT /entry.sh

ENV DRBD_VERSION 9.1.8
24 changes: 24 additions & 0 deletions docker-drbd9/Dockerfile.bionic.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ubuntu:bionic

# note: py2 setuptools are a bit smaller than the py3 ones
RUN apt-get update && apt-get install -y kmod gnupg wget make gcc patch curl && \
apt-get install -y python-setuptools && apt-get clean && \
cd /tmp && wget https://github.com/LINBIT/python-lbdist/archive/master.tar.gz && \
tar xvf master.tar.gz && \
( cd python-lbdist-master && python setup.py install ) && \
rm -rf python-lbdist-master master.tar.gz

COPY /drbd.tar.gz /

COPY /pkgs /pkgs
COPY /config-drbd.sh /
COPY /entry.sh /
RUN chmod +x /entry.sh

# link python3
RUN ln -vs /usr/bin/python2 /usr/bin/python3
RUN ln -vs /usr/bin/python2 /usr/bin/python3.6

ENTRYPOINT /entry.sh

ENV DRBD_VERSION 9.1.8
23 changes: 2 additions & 21 deletions docker-drbd9/Dockerfile.focal
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
FROM ubuntu:focal
From ghcr.io/hwameistor/drbd9-focal:v9.0.32-1

# note: py2 setuptools are a bit smaller than the py3 ones
RUN apt-get update && apt-get install -y kmod gnupg wget make gcc patch curl && \
apt-get install -y python-setuptools && apt-get clean && \
cd /tmp && wget https://github.com/LINBIT/python-lbdist/archive/master.tar.gz && \
tar xvf master.tar.gz && \
( cd python-lbdist-master && python2 setup.py install ) && \
rm -rf python-lbdist-master master.tar.gz

COPY /drbd.tar.gz /

COPY /pkgs /pkgs
COPY /config-drbd.sh /
COPY /entry.sh /
RUN chmod +x /entry.sh

# link python3
RUN ln -vs /usr/bin/python2 /usr/bin/python3
RUN ln -vs /usr/bin/python2 /usr/bin/python3.6

ENTRYPOINT /entry.sh

ENV DRBD_VERSION 9.1.8
RUN chmod +x /entry.sh
24 changes: 24 additions & 0 deletions docker-drbd9/Dockerfile.focal.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ubuntu:focal

# note: py2 setuptools are a bit smaller than the py3 ones
RUN apt-get update && apt-get install -y kmod gnupg wget make gcc patch curl && \
apt-get install -y python-setuptools && apt-get clean && \
cd /tmp && wget https://github.com/LINBIT/python-lbdist/archive/master.tar.gz && \
tar xvf master.tar.gz && \
( cd python-lbdist-master && python2 setup.py install ) && \
rm -rf python-lbdist-master master.tar.gz

COPY /drbd.tar.gz /

COPY /pkgs /pkgs
COPY /config-drbd.sh /
COPY /entry.sh /
RUN chmod +x /entry.sh

# link python3
RUN ln -vs /usr/bin/python2 /usr/bin/python3
RUN ln -vs /usr/bin/python2 /usr/bin/python3.6

ENTRYPOINT /entry.sh

ENV DRBD_VERSION 9.1.8
18 changes: 2 additions & 16 deletions docker-drbd9/Dockerfile.jammy
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
FROM ubuntu:jammy
From ghcr.io/hwameistor/drbd9-jammy:v9.0.32-1

RUN apt-get update && apt-get install -y kmod gnupg wget make gcc patch elfutils curl && \
apt-get install -y python3-setuptools && apt-get clean && \
cd /tmp && wget https://github.com/LINBIT/python-lbdist/archive/master.tar.gz && \
tar xvf master.tar.gz && \
( cd python-lbdist-master && python3 setup.py install ) && \
rm -rf python-lbdist-master master.tar.gz

COPY /drbd.tar.gz /

COPY /pkgs /pkgs
COPY /config-drbd.sh /
COPY /entry.sh /
RUN chmod +x /entry.sh
ENTRYPOINT /entry.sh

ENV DRBD_VERSION 9.1.8

RUN apt-get update && apt-get install -y coccinelle --fix-missing && apt-get clean
ENTRYPOINT /entry.sh
20 changes: 20 additions & 0 deletions docker-drbd9/Dockerfile.jammy.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ubuntu:jammy

RUN apt-get update && apt-get install -y kmod gnupg wget make gcc patch elfutils curl && \
apt-get install -y python3-setuptools && apt-get clean && \
cd /tmp && wget https://github.com/LINBIT/python-lbdist/archive/master.tar.gz && \
tar xvf master.tar.gz && \
( cd python-lbdist-master && python3 setup.py install ) && \
rm -rf python-lbdist-master master.tar.gz

COPY /drbd.tar.gz /

COPY /pkgs /pkgs
COPY /config-drbd.sh /
COPY /entry.sh /
RUN chmod +x /entry.sh
ENTRYPOINT /entry.sh

ENV DRBD_VERSION 9.1.8

RUN apt-get update && apt-get install -y coccinelle --fix-missing && apt-get clean
43 changes: 2 additions & 41 deletions docker-drbd9/Dockerfile.kylin10
Original file line number Diff line number Diff line change
@@ -1,44 +1,5 @@
FROM centos:8 AS kylin-base
From ghcr.io/hwameistor/drbd9-kylin10:v9.0.32-1

ENV KYLIN_ROOT '/kylin/rootfs'

COPY kylin10.repo /

RUN set -x && \
rm -vf /etc/yum.repos.d/*.repo && \
cp -vf /kylin10.repo /etc/yum.repos.d/ && \
mkdir -vp ${KYLIN_ROOT} && \
rpm --root ${KYLIN_ROOT} --initdb && \
yum install -y --downloadonly --downloaddir . kylin-release kylin-repos kylin-gpg-keys && \
rpm --root ${KYLIN_ROOT} -ivh --force --nodeps kylin-release*.rpm kylin-repos*.rpm kylin-gpg-keys*.rpm && \
rpm --root ${KYLIN_ROOT} --import ${KYLIN_ROOT}/etc/pki/rpm-gpg/RPM-GPG-KEY-kylin && \
rm -vf *.rpm

RUN set -x && \
yum -y --installroot=${KYLIN_ROOT} --setopt=tsflags='nodocs' --setopt=override_install_langs=en_US.utf8 \
install tar wget gcc make patch curl kmod cpio python3 elfutils-libelf-devel python2 hostname && \
yum -y --installroot=${KYLIN_ROOT} clean all

FROM scratch

COPY --from=kylin-base /kylin/rootfs/ /

ENV DRBD_VERSION 9.1.8

RUN cd /tmp && wget https://github.com/LINBIT/python-lbdist/archive/master.tar.gz && \
tar xvf master.tar.gz && \
( cd python-lbdist-master && python setup.py install ) && \
rm -rf python-lbdist-master master.tar.gz

# one can not comment copy
RUN wget --no-check-certificate https://pkg.linbit.com/downloads/drbd/"$([[ $DRBD_VERSION =~ ^9.0 ]] && echo 9.0 || echo 9 )"/drbd-${DRBD_VERSION}.tar.gz -O /drbd.tar.gz # !lbbuild
# =lbbuild COPY /drbd.tar.gz /

# these are now the kmod pkgs:
COPY /pkgs /pkgs
COPY /drbdUtils.tar.gz /
COPY /install-drbdutils.sh /
COPY /config-drbd.sh /
COPY /entry.sh /
RUN chmod +x /entry.sh
ENTRYPOINT /entry.sh
RUN chmod +x /entry.sh
44 changes: 44 additions & 0 deletions docker-drbd9/Dockerfile.kylin10.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM centos:8 AS kylin-base

ENV KYLIN_ROOT '/kylin/rootfs'

COPY kylin10.repo /

RUN set -x && \
rm -vf /etc/yum.repos.d/*.repo && \
cp -vf /kylin10.repo /etc/yum.repos.d/ && \
mkdir -vp ${KYLIN_ROOT} && \
rpm --root ${KYLIN_ROOT} --initdb && \
yum install -y --downloadonly --downloaddir . kylin-release kylin-repos kylin-gpg-keys && \
rpm --root ${KYLIN_ROOT} -ivh --force --nodeps kylin-release*.rpm kylin-repos*.rpm kylin-gpg-keys*.rpm && \
rpm --root ${KYLIN_ROOT} --import ${KYLIN_ROOT}/etc/pki/rpm-gpg/RPM-GPG-KEY-kylin && \
rm -vf *.rpm

RUN set -x && \
yum -y --installroot=${KYLIN_ROOT} --setopt=tsflags='nodocs' --setopt=override_install_langs=en_US.utf8 \
install tar wget gcc make patch curl kmod cpio python3 elfutils-libelf-devel python2 hostname && \
yum -y --installroot=${KYLIN_ROOT} clean all

FROM scratch

COPY --from=kylin-base /kylin/rootfs/ /

ENV DRBD_VERSION 9.1.8

RUN cd /tmp && wget https://github.com/LINBIT/python-lbdist/archive/master.tar.gz && \
tar xvf master.tar.gz && \
( cd python-lbdist-master && python setup.py install ) && \
rm -rf python-lbdist-master master.tar.gz

# one can not comment copy
RUN wget --no-check-certificate https://pkg.linbit.com/downloads/drbd/"$([[ $DRBD_VERSION =~ ^9.0 ]] && echo 9.0 || echo 9 )"/drbd-${DRBD_VERSION}.tar.gz -O /drbd.tar.gz # !lbbuild
# =lbbuild COPY /drbd.tar.gz /

# these are now the kmod pkgs:
COPY /pkgs /pkgs
COPY /drbdUtils.tar.gz /
COPY /install-drbdutils.sh /
COPY /config-drbd.sh /
COPY /entry.sh /
RUN chmod +x /entry.sh
ENTRYPOINT /entry.sh
36 changes: 1 addition & 35 deletions docker-drbd9/Dockerfile.rhel7
Original file line number Diff line number Diff line change
@@ -1,40 +1,6 @@
# FROM registry.access.redhat.com/ubi7/ubi
# Change to CentOS because Ubi7 does not support linux/arm6
FROM centos:7
MAINTAINER Roland Kammerer <roland.kammerer@linbit.com>
From ghcr.io/hwameistor/drbd9-rhel7:v9.0.32-1

ENV DRBD_VERSION 9.1.8

ARG release=1
LABEL name="DRBD Kernel module load container" \
vendor="LINBIT" \
version="$DRBD_VERSION" \
release="$release" \
summary="DRBD's kernel component" \
description="DRBD's kernel component"
RUN mkdir /licenses && cp /usr/share/licenses/shadow-utils-4.6/gpl-2.0.txt /licenses/

RUN yum -y update-minimal --security --sec-severity=Important --sec-severity=Critical && \
yum install -y wget gcc make patch curl kmod yum-utils python-setuptools && yum clean all -y && \
cd /tmp && wget https://github.com/LINBIT/python-lbdist/archive/master.tar.gz && \
tar xvf master.tar.gz && \
( cd python-lbdist-master && python setup.py install ) && \
rm -rf python-lbdist-master master.tar.gz

# one can not comment copy
RUN wget --no-check-certificate https://pkg.linbit.com/downloads/drbd/"$([[ $DRBD_VERSION =~ ^9.0 ]] && echo 9.0 || echo 9 )"/drbd-${DRBD_VERSION}.tar.gz -O /drbd.tar.gz # !lbbuild
# =lbbuild COPY /drbd.tar.gz /

COPY /pkgs /pkgs
COPY /config-drbd.sh /
COPY /entry.sh /
RUN chmod +x /entry.sh

# link python3, install hostname
RUN ln -vs /usr/bin/python /usr/bin/python3 && \
ln -vs /usr/bin/python /usr/bin/python3.6 && \
yum install -y hostname && yum clean all -y

RUN yum install -y util-linux

ENTRYPOINT /entry.sh
40 changes: 40 additions & 0 deletions docker-drbd9/Dockerfile.rhel7.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# FROM registry.access.redhat.com/ubi7/ubi
# Change to CentOS because Ubi7 does not support linux/arm6
FROM centos:7
MAINTAINER Roland Kammerer <roland.kammerer@linbit.com>

ENV DRBD_VERSION 9.1.8

ARG release=1
LABEL name="DRBD Kernel module load container" \
vendor="LINBIT" \
version="$DRBD_VERSION" \
release="$release" \
summary="DRBD's kernel component" \
description="DRBD's kernel component"
RUN mkdir /licenses && cp /usr/share/licenses/shadow-utils-4.6/gpl-2.0.txt /licenses/

RUN yum -y update-minimal --security --sec-severity=Important --sec-severity=Critical && \
yum install -y wget gcc make patch curl kmod yum-utils python-setuptools && yum clean all -y && \
cd /tmp && wget https://github.com/LINBIT/python-lbdist/archive/master.tar.gz && \
tar xvf master.tar.gz && \
( cd python-lbdist-master && python setup.py install ) && \
rm -rf python-lbdist-master master.tar.gz

# one can not comment copy
RUN wget --no-check-certificate https://pkg.linbit.com/downloads/drbd/"$([[ $DRBD_VERSION =~ ^9.0 ]] && echo 9.0 || echo 9 )"/drbd-${DRBD_VERSION}.tar.gz -O /drbd.tar.gz # !lbbuild
# =lbbuild COPY /drbd.tar.gz /

COPY /pkgs /pkgs
COPY /config-drbd.sh /
COPY /entry.sh /
RUN chmod +x /entry.sh

# link python3, install hostname
RUN ln -vs /usr/bin/python /usr/bin/python3 && \
ln -vs /usr/bin/python /usr/bin/python3.6 && \
yum install -y hostname && yum clean all -y

RUN yum install -y util-linux

ENTRYPOINT /entry.sh
Loading

0 comments on commit 0577118

Please sign in to comment.