From ce97babf2608bc50a6e6fe58f1f14394dac3dcd2 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 23 Nov 2020 09:41:52 +0800 Subject: [PATCH 1/2] add dockfile --- Ceph/CentOS7.6.1810/Dockerfile-bcache | 22 ++++++++++++++++++ Ceph/CentOS7.6.1810/Dockerfile-ceph-14.2.1 | 26 ++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 Ceph/CentOS7.6.1810/Dockerfile-bcache create mode 100644 Ceph/CentOS7.6.1810/Dockerfile-ceph-14.2.1 diff --git a/Ceph/CentOS7.6.1810/Dockerfile-bcache b/Ceph/CentOS7.6.1810/Dockerfile-bcache new file mode 100644 index 0000000..3d6f51d --- /dev/null +++ b/Ceph/CentOS7.6.1810/Dockerfile-bcache @@ -0,0 +1,22 @@ +FROM arm64v8/centos:1810 + +#RUN mv /etc/yum.repos.d /etc/yum.repos.d.bak && mkdir /etc/yum.repos.d +#COPY CentOS-AltArch-7.repo /etc/yum.repos.d/ . +#RUN yum clean all && yum makecache +#RUN yum -y install openssl +#RUN yum -y install elfutils-libelf-devel bc openssl-devel ncurses-devel libssl-dev wget gcc make rpm-build +#RUN mkdir /root/kernel +#RUN yum -y install openssl + +#WORKDIR /root/kernel +#RUN wget http://vault.centos.org/centos/7.6.1810/os/Source/SPackages/kernel-alt-4.14.0-115.el7a.0.1.src.rpm +#COPY kernel-alt-4.14.0-115.el7a.0.1.src.rpm . +#RUN rpm2cpio kernel-alt-4.14.0-115.el7a.0.1.src.rpm |cpio -div && tar -vxf linux-4.14.0-115.el7a.tar.xz + +#WORKDIR /root/kernel/linux-4.14.0-115.el7a +#WORKDIR /root +#RUN sed -i 'CONFIG_BCACHE="y"' .config +#COPY /usr/src/kernels/4.14.0-115.el7a.0.1.aarch64/.config .config . +#RUN yum -y install openssl +#RUN make rpm +#COPY .config . diff --git a/Ceph/CentOS7.6.1810/Dockerfile-ceph-14.2.1 b/Ceph/CentOS7.6.1810/Dockerfile-ceph-14.2.1 new file mode 100644 index 0000000..c96609a --- /dev/null +++ b/Ceph/CentOS7.6.1810/Dockerfile-ceph-14.2.1 @@ -0,0 +1,26 @@ +FROM arm64v8/centos:1810 + +RUN yum -y install centos-release-scl git deltarpm python3 epel-release bc openssl +RUN sed -i '8a baseurl=http://mirror.centos.org/altarch/7/sclo/$basearch/rh/' /etc/yum.repos.d/CentOS-SCLo-scl.repo +RUN yum -y install devtoolset-7 && scl enable devtoolset-7 bash +RUN echo "scl enable devtoolset-7 bash" >> /root/.bashrc && source /root/.bashrc + +WORKDIR /home +RUN yum -y install wget +RUN wget https://download.ceph.com/tarballs/ceph-14.2.1.tar.gz +RUN tar -zxvf ceph-14.2.1.tar.gz +RUN pip3 install virtualenv + +WORKDIR /home/ceph-14.2.1 +RUN sed -i '16c baseurl=https://buildlogs.centos.org/centos/7/sclo/$basearch/rh/' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo +RUN sed -i '12a sslverify=false' /etc/yum.conf +RUN sed -i '338c $SUDO yum-config-manager --add-repo https://dl.fedoraproject.org/pub/epel/$MAJOR_VERSION/aarch64/' install-deps.sh +RUN sed -i "s/$SUDO yum remove centos-release-scl || true.*/$SUDO yum remove -y centos-release-scl || true/g" install-deps.sh && sh install-deps.sh +RUN sed -i '46c ${CMAKE} -DCMAKE_BUILD_TYPE=RelWithDebInfo $ARGS "$@" .. || exit 1' do_cmake.sh +RUN yum install rpmdevtools -y && rpmdev-setuptree +RUN sed -i '2c %_topdir /home/rpmbuild' /root/.rpmmacros && rpmdev-setuptree +RUN cp /home/ceph-14.2.1/ceph.spec /home/rpmbuild/SPECS/ && sed -i '1i %define _binaries_in_noarch_packages_terminate_build 0' /home/rpmbuild/SPECS/ceph.spec + +WORKDIR /home +RUN tar -cjvf ceph-14.2.1.tar.bz2 ceph-14.2.1 && cp ceph-14.2.1.tar.bz2 /home/rpmbuild/SOURCES/ +RUN rpmbuild -bb /home/rpmbuild/SPECS/ceph.spec -- Gitee From 4f4b81d34b1b64dce46170243bf1094b7f2780ba Mon Sep 17 00:00:00 2001 From: root Date: Mon, 23 Nov 2020 09:49:52 +0800 Subject: [PATCH 2/2] ceph bcache edit --- Ceph/CentOS7.6.1810/Dockerfile-bcache | 30 ++++++++++----------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/Ceph/CentOS7.6.1810/Dockerfile-bcache b/Ceph/CentOS7.6.1810/Dockerfile-bcache index 3d6f51d..617aacc 100644 --- a/Ceph/CentOS7.6.1810/Dockerfile-bcache +++ b/Ceph/CentOS7.6.1810/Dockerfile-bcache @@ -1,22 +1,14 @@ -FROM arm64v8/centos:1810 +FROM centos:1811 -#RUN mv /etc/yum.repos.d /etc/yum.repos.d.bak && mkdir /etc/yum.repos.d -#COPY CentOS-AltArch-7.repo /etc/yum.repos.d/ . -#RUN yum clean all && yum makecache -#RUN yum -y install openssl -#RUN yum -y install elfutils-libelf-devel bc openssl-devel ncurses-devel libssl-dev wget gcc make rpm-build -#RUN mkdir /root/kernel -#RUN yum -y install openssl +RUN yum -y install elfutils-libelf-devel bc openssl-devel ncurses-devel libssl-dev wget gcc make rpm-build +RUN mkdir /root/kernel +RUN yum -y install openssl -#WORKDIR /root/kernel -#RUN wget http://vault.centos.org/centos/7.6.1810/os/Source/SPackages/kernel-alt-4.14.0-115.el7a.0.1.src.rpm -#COPY kernel-alt-4.14.0-115.el7a.0.1.src.rpm . -#RUN rpm2cpio kernel-alt-4.14.0-115.el7a.0.1.src.rpm |cpio -div && tar -vxf linux-4.14.0-115.el7a.tar.xz +WORKDIR /root/kernel +RUN yum -y install wget +RUN wget http://vault.centos.org/centos/7.6.1810/os/Source/SPackages/kernel-alt-4.14.0-115.el7a.0.1.src.rpm +RUN rpm2cpio kernel-alt-4.14.0-115.el7a.0.1.src.rpm |cpio -div && tar -vxf linux-4.14.0-115.el7a.tar.xz +WORKDIR /root/kernel/linux-4.14.0-115.el7a +RUN cp /boot/config-4.14.0-115.el7a.0.1.aarch64 .config +RUN make rpm -#WORKDIR /root/kernel/linux-4.14.0-115.el7a -#WORKDIR /root -#RUN sed -i 'CONFIG_BCACHE="y"' .config -#COPY /usr/src/kernels/4.14.0-115.el7a.0.1.aarch64/.config .config . -#RUN yum -y install openssl -#RUN make rpm -#COPY .config . -- Gitee