2020-05-04 15:53:29 -04:00
|
|
|
Name: confluent_osdeploy-x86_64
|
2020-05-04 15:45:35 -04:00
|
|
|
Version: #VERSION#
|
2020-05-04 15:25:04 -04:00
|
|
|
Release: 1
|
2020-05-04 13:49:48 -04:00
|
|
|
Summary: OS Deployment support for confluent
|
|
|
|
|
|
|
|
License: Apache2
|
2021-06-14 16:02:52 -04:00
|
|
|
URL: https://hpc.lenovo.com/
|
2020-05-04 15:53:29 -04:00
|
|
|
Source0: confluent_osdeploy.tar.xz
|
2021-10-07 09:18:24 -04:00
|
|
|
Source1: confluent_el9bin.tar.xz
|
2020-05-04 15:25:04 -04:00
|
|
|
BuildArch: noarch
|
2020-07-22 15:11:58 -04:00
|
|
|
Requires: confluent_ipxe mtools tar
|
2020-05-04 13:49:48 -04:00
|
|
|
BuildRoot: /tmp
|
|
|
|
|
|
|
|
%description
|
|
|
|
This contains support utilities for enabling deployment of x86_64 architecture systems
|
|
|
|
|
|
|
|
|
|
|
|
%define debug_package %{nil}
|
|
|
|
|
|
|
|
%prep
|
2021-10-07 09:18:24 -04:00
|
|
|
%setup -n confluent_osdeploy -a 1
|
2020-05-04 13:49:48 -04:00
|
|
|
|
|
|
|
%build
|
|
|
|
mkdir -p opt/confluent/bin
|
2021-06-03 17:17:42 -04:00
|
|
|
mkdir -p stateless-bin
|
2020-05-04 13:49:48 -04:00
|
|
|
cd utils
|
|
|
|
make all
|
2021-07-15 14:42:26 -04:00
|
|
|
cp confluent_imginfo copernicus clortho autocons ../opt/confluent/bin
|
2021-06-03 17:50:01 -04:00
|
|
|
cp start_root urlmount ../stateless-bin/
|
2020-05-04 13:49:48 -04:00
|
|
|
cd ..
|
2021-10-06 16:59:47 -04:00
|
|
|
ln -s el8 el9
|
2021-10-07 08:22:38 -04:00
|
|
|
ln -s el8-diskless el9-diskless
|
2021-10-06 15:51:12 -04:00
|
|
|
for os in rhvh4 el7 genesis el8 suse15 ubuntu20.04 coreos el9; do
|
2020-05-04 15:25:04 -04:00
|
|
|
mkdir ${os}out
|
|
|
|
cd ${os}out
|
2021-10-06 16:59:47 -04:00
|
|
|
if [ -d ../${os}bin ]; then
|
|
|
|
cp -a ../${os}bin/opt .
|
2021-10-06 15:51:12 -04:00
|
|
|
else
|
|
|
|
cp -a ../opt .
|
|
|
|
fi
|
2020-05-04 15:55:22 -04:00
|
|
|
cp -a ../${os}/initramfs/* .
|
2021-11-08 16:23:56 -05:00
|
|
|
cp -a ../common/initramfs/* .
|
2020-05-07 09:35:32 -04:00
|
|
|
find . | cpio -H newc -o > ../addons.cpio
|
|
|
|
mv ../addons.cpio .
|
2020-05-04 15:25:04 -04:00
|
|
|
cd ..
|
|
|
|
done
|
2021-11-17 16:05:00 -05:00
|
|
|
for os in el8 suse15 el9 ubuntu20.04; do
|
2021-06-03 17:17:42 -04:00
|
|
|
mkdir ${os}disklessout
|
|
|
|
cd ${os}disklessout
|
2021-10-06 16:59:47 -04:00
|
|
|
if [ -d ../${os}bin ]; then
|
|
|
|
cp -a ../${os}bin/opt .
|
2021-10-06 15:51:12 -04:00
|
|
|
else
|
|
|
|
cp -a ../opt .
|
|
|
|
fi
|
2021-06-14 14:37:40 -04:00
|
|
|
cp -a ../${os}-diskless/initramfs/* .
|
2021-11-08 16:23:56 -05:00
|
|
|
cp -a ../common/initramfs/* .
|
2021-10-06 16:59:47 -04:00
|
|
|
if [ -d ../${os}bin ]; then
|
|
|
|
cp -a ../${os}bin/stateless-bin/* opt/confluent/bin
|
2021-10-06 15:51:12 -04:00
|
|
|
else
|
|
|
|
cp -a ../stateless-bin/* opt/confluent/bin
|
|
|
|
fi
|
2021-06-03 17:17:42 -04:00
|
|
|
find . | cpio -H newc -o > ../addons.cpio
|
|
|
|
mv ../addons.cpio .
|
|
|
|
cd ..
|
|
|
|
done
|
2020-06-09 08:50:54 -04:00
|
|
|
mkdir esxi7out
|
2020-06-08 17:24:48 -04:00
|
|
|
cd esxi7out
|
2020-06-09 09:51:48 -04:00
|
|
|
cp -a ../opt .
|
|
|
|
cp -a ../esxi7/initramfs/* .
|
2021-11-08 16:23:56 -05:00
|
|
|
cp -a ../common/initramfs/* .
|
2020-06-09 16:12:22 -04:00
|
|
|
chmod +x bin/* opt/confluent/bin/*
|
2020-06-10 10:17:54 -04:00
|
|
|
tar zcvf ../addons.tgz *
|
|
|
|
mv ../addons.tgz .
|
2020-06-08 17:24:48 -04:00
|
|
|
cd ..
|
2020-06-11 17:18:28 -04:00
|
|
|
cp -a esxi7out esxi6out
|
|
|
|
cp -a esxi7 esxi6
|
2020-05-04 13:49:48 -04:00
|
|
|
|
|
|
|
%install
|
2021-11-04 08:00:37 -04:00
|
|
|
for os in rhvh4 el7 el8 el9 genesis suse15 ubuntu20.04 esxi6 esxi7 coreos; do
|
2020-05-04 15:25:04 -04:00
|
|
|
mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/$os/initramfs
|
|
|
|
mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/$os/profiles
|
2020-06-08 17:24:48 -04:00
|
|
|
cp ${os}out/addons.* %{buildroot}/opt/confluent/lib/osdeploy/$os/initramfs
|
2021-06-14 14:38:38 -04:00
|
|
|
cp -a $os/profiles/* %{buildroot}/opt/confluent/lib/osdeploy/$os/profiles
|
2021-11-08 16:23:56 -05:00
|
|
|
for targ in %{buildroot}/opt/confluent/lib/osdeploy/$os/profiles/*; do
|
|
|
|
cp -a common/profile/* $targ
|
|
|
|
done
|
2021-06-03 17:17:42 -04:00
|
|
|
if [ -d ${os}disklessout ]; then
|
2021-06-04 17:45:52 -04:00
|
|
|
mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/${os}-diskless/initramfs
|
2021-06-15 08:00:09 -04:00
|
|
|
mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/${os}-diskless/profiles
|
2021-06-03 17:17:42 -04:00
|
|
|
cp ${os}disklessout/addons.* %{buildroot}/opt/confluent/lib/osdeploy/${os}-diskless/initramfs
|
2021-06-14 14:38:38 -04:00
|
|
|
cp -a ${os}-diskless/profiles/* %{buildroot}/opt/confluent/lib/osdeploy/$os-diskless/profiles
|
2021-11-08 16:23:56 -05:00
|
|
|
for targ in %{buildroot}/opt/confluent/lib/osdeploy/$os-diskless/profiles/*; do
|
|
|
|
cp -a common/profile/* $targ
|
|
|
|
done
|
2021-06-03 17:17:42 -04:00
|
|
|
fi
|
2020-05-04 15:25:04 -04:00
|
|
|
done
|
2021-07-21 13:57:06 -04:00
|
|
|
find %{buildroot}/opt/confluent/lib/osdeploy/ -name .gitignore -exec rm -f {} +
|
2020-05-04 15:25:04 -04:00
|
|
|
|
|
|
|
%files
|
|
|
|
/opt/confluent/lib/osdeploy
|