Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rhel 8.10 and 9.4 #17

Merged
merged 8 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ VSPHERE_FOLDER ?= build-d2iq-base-templates
RELEASE_FOLDER ?= d2iq-base-templates
NAME_POSTFIX ?= -manual-build-$(shell whoami)

PACKER_CACHE_DIR ?= ./packer_cache
PACKER_ON_ERROR ?= cleanup

manifests/d2iq-base-%$(NAME_POSTFIX).json: packer.initialized vsphere.pkr.hcl $(GOVC)
Expand Down Expand Up @@ -83,17 +84,25 @@ rhel-test-86: manifests/tests/d2iq-base-RHEL-86$(NAME_POSTFIX).json.clean
rhel-test-86-clean: rhel-test-86 manifests/d2iq-base-RHEL-86$(NAME_POSTFIX).json.clean
rhel-test-88: manifests/tests/d2iq-base-RHEL-88$(NAME_POSTFIX).json.clean
rhel-test-88-clean: rhel-test-88 manifests/d2iq-base-RHEL-88$(NAME_POSTFIX).json.clean
rhel-test: rhel-test-79-clean rhel-test-84-clean rhel-test-86-clean rhel-test-88-clean
rhel-test-810: manifests/tests/d2iq-base-RHEL-810$(NAME_POSTFIX).json.clean
rhel-test-810-clean: rhel-test-810 manifests/d2iq-base-RHEL-810$(NAME_POSTFIX).json.clean
rhel-test-94: manifests/tests/d2iq-base-RHEL-94$(NAME_POSTFIX).json.clean
rhel-test-94-clean: rhel-test-94 manifests/d2iq-base-RHEL-94$(NAME_POSTFIX).json.clean
rhel-test: rhel-test-86-clean rhel-test-88-clean rhel-test-810-clean rhel-test-94-clean
rhel-release-79: rhel-test-79 release/d2iq-base-RHEL-79$(NAME_POSTFIX)
rhel-release-84: rhel-test-84 release/d2iq-base-RHEL-84$(NAME_POSTFIX)
rhel-release-86: rhel-test-86 release/d2iq-base-RHEL-86$(NAME_POSTFIX)
rhel-release-88: rhel-test-88 release/d2iq-base-RHEL-88$(NAME_POSTFIX)
rhel-release: rhel-release-79 rhel-release-84 rhel-release-86 rhel-release-88
rhel-release-810: rhel-test-810 release/d2iq-base-RHEL-810$(NAME_POSTFIX)
rhel-release-94: rhel-test-94 release/d2iq-base-RHEL-94$(NAME_POSTFIX)
rhel-release: rhel-release-86 rhel-release-88 rhel-release-810 rhel-release-94
rhel-ovf-79: manifests/ovf/d2iq-base-RHEL-79$(NAME_POSTFIX).ovf
rhel-ovf-84: manifests/ovf/d2iq-base-RHEL-84$(NAME_POSTFIX).ovf
rhel-ovf-86: manifests/ovf/d2iq-base-RHEL-86$(NAME_POSTFIX).ovf
rhel-ovf-88: manifests/ovf/d2iq-base-RHEL-88$(NAME_POSTFIX).ovf
rhel-ovf: rhel-ovf-79 rhel-ovf-84 rhel-ovf-86 rhel-ovf-88
rhel-ovf-810: manifests/ovf/d2iq-base-RHEL-810$(NAME_POSTFIX).ovf
rhel-ovf-94: manifests/ovf/d2iq-base-RHEL-94$(NAME_POSTFIX).ovf
rhel-ovf: rhel-ovf-86 rhel-ovf-88 rhel-ovf-810 rhel-ovf-94

oraclelinux: manifests/d2iq-base-OracleLinux-94$(NAME_POSTFIX).json
oraclelinux-test-94: manifests/tests/d2iq-base-OracleLinux-94$(NAME_POSTFIX).json.clean
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ There are distribution based make targets for building images
- `make centos` - Centos 7.9
- `make oraclelinux` - OracleLinux 9.10
- `make flatcar` - Flatcar LTS
- `make rhel` - RHEL 7.9, 8.4, 8.6 and 8.8
- `make rhel` - RHEL 7.9(EOL no longer tested), 8.4, 8.6 and 8.8, 8.10, 9.4

Templates and VMs are created by default in the folder `build-d2iq-base-templates` This can be changed by injecting the environment variable `VSPHERE_FOLDER`

Expand Down
1 change: 1 addition & 0 deletions bootfiles/rhel/rhel8.ks
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ open-vm-tools
%end

# Enable/disable the following services
firewall --enabled --port=22:tcp --port=25:tcp --ssh
services --enabled=sshd

%post --logfile=/mnt/sysimage/root/ks-post.log --erroronfail
Expand Down
7 changes: 7 additions & 0 deletions images/base-RHEL-810.pkrvar.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distribution="RHEL"
distribution_version="8"
# very specific for D2iQ internal setup. Please use PKR_VAR_iso_path_entry to match your setup. See README.md
iso_paths= [
"[ovh-nfs-vsphere-services] isos/rhel-8.10-x86_64-dvd.iso"
]
iso_checksum="6ced368628750ff3ea8a2fc52a371ba368d3377b8307caafda69070849a9e4e7"
7 changes: 7 additions & 0 deletions images/base-RHEL-94.pkrvar.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distribution="RHEL"
distribution_version="8"
# very specific for D2iQ internal setup. Please use PKR_VAR_iso_path_entry to match your setup. See README.md
iso_paths= [
"[ovh-nfs-vsphere-services] isos/rhel-9.4-x86_64-dvd.iso"
]
iso_checksum="17b013f605e6b85affd37431b533b6904541f8b889179ae3f99e1e480dd4ae38"
15 changes: 9 additions & 6 deletions scripts/el/cleanup_dnf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ rm -rf /dev/.udev/;

# will fail on rocky
if [ "$distro" != 'rocky' ]; then
for ndev in /etc/sysconfig/network-scripts/ifcfg-*; do
if [ "$(basename "$ndev")" != "ifcfg-lo" ]; then
sed -i '/^HWADDR/d' "$ndev";
sed -i '/^UUID/d' "$ndev";
fi
done
# catch el9+ networkmanager
if test -f /etc/sysconfig/network-scripts/ifcfg-*; then
for ndev in /etc/sysconfig/network-scripts/ifcfg-*; do
if [ "$(basename "$ndev")" != "ifcfg-lo" ]; then
sed -i '/^HWADDR/d' "$ndev";
sed -i '/^UUID/d' "$ndev";
fi
done
fi
fi

echo "truncate any logs that have built up during the install"
Expand Down
30 changes: 20 additions & 10 deletions scripts/el/rhn_add_subscription.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
#!/bin/bash -eu
source /etc/os-release

if [[ "${RHN_SUBSCRIPTION_KEY}" != "" && "${RHN_SUBSCRIPTION_ORG}" != "" ]]; then
subscription-manager register --org="${RHN_SUBSCRIPTION_ORG}" --activationkey="${RHN_SUBSCRIPTION_KEY}"
exit 0
fi
else


if [[ "${RHN_USERNAME}" == "" ]]; then
echo "RHN_USERNAME not set"
exit 1
fi
if [[ "${RHN_USERNAME}" == "" ]]; then
echo "RHN_USERNAME not set"
exit 1
fi

if [[ "${RHN_PASSWORD}" == "" ]]; then
echo "RHN_PASSWORD not set"
exit 1
fi

if [[ "${RHN_PASSWORD}" == "" ]]; then
echo "RHN_PASSWORD not set"
exit 1
subscription-manager register --username "$RHN_USERNAME" --password "$RHN_PASSWORD" --auto-attach
fi

subscription-manager register --username "$RHN_USERNAME" --password "$RHN_PASSWORD" --auto-attach
#
subscription-manager release --set="${VERSION_ID}"

# el 8.10 does not have extened support so we need to disable it
if [[ "${VERSION_ID}" == "8.10" ]]; then
subscription-manager repos --disable=rhel-8-for-x86_64-baseos-eus-rpms
subscription-manager repos --disable=rhel-8-for-x86_64-appstream-eus-rpms
fi
Loading