Skip to content

Commit

Permalink
Add Centos9 Stable devel json, kickstart and remove centos7 packer
Browse files Browse the repository at this point in the history
  • Loading branch information
chris1984 authored and evgeni committed Jul 16, 2024
1 parent a1bcbe8 commit 330a07b
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 95 deletions.
60 changes: 0 additions & 60 deletions packer/centos7-katello-nightly-stable.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"variables": {
"packer_hostname": "centos7-katello-devel-stable",
"packer_hostname": "centos9-katello-devel-stable",
"password": "vagrant",
"user": "vagrant",
"ansible_variables": "{}"
"ansible_variables": "{}",
"iso_name": "CentOS-Stream-9-latest-x86_64-boot.iso"
},
"builders": [
{
"accelerator": "kvm",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
"<tab> console=tty20 inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
],
"boot_wait": "2s",
"format": "qcow2",
"headless": true,
"http_directory": "http",
"iso_checksum": "sha256:07b94e6b1a0b0260b94c83d6bb76b26bf7a310dc78d7a9c7432809fb9bc6194a",
"iso_url": "http://packages.oit.ncsu.edu/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso",
"iso_checksum": "sha256:62318426d27ba4e255b509b033e78186ad0fb8b9007650fca73d226ceb2eda6f",
"iso_url": "https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-latest-x86_64-boot.iso",
"name": "{{ user `packer_hostname` }}.example.com",
"qemuargs": [
[
Expand All @@ -26,6 +27,10 @@
[
"-smp",
"4"
],
[
"-cpu",
"host"
]
],
"shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -h -p",
Expand Down Expand Up @@ -58,7 +63,7 @@
"ansible_env_vars": [
"ANSIBLE_CONFIG=../ansible.cfg"
],
"extra_arguments": ["--extra-vars", "{{ user `ansible_variables` }}"],
"extra_arguments": ["--extra-vars", "katello_repositories_version=nightly foreman_repositories_version=nightly {{ user `ansible_variables` }}"],
"playbook_file": "../playbooks/katello_devel.yml",
"type": "ansible"
}
Expand Down
72 changes: 43 additions & 29 deletions packer/http/ks.cfg
Original file line number Diff line number Diff line change
@@ -1,46 +1,60 @@
install
cdrom
# Version=EL9
# Partition clearing information
clearpart --all --initlabel
autopart --type=lvm
# Use network installation
url --url https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
keyboard us
unsupported_hardware
network --bootproto=dhcp --device=eth0 --onboot=on --hostname=centos7-katello-devel-stable.example.com
rootpw vagrant
# Create vagrant user
user --name=vagrant --groups=wheel --password vagrant --plaintext
# Network information
network --bootproto=dhcp --device=enp0s3 --activate --hostname=centos9-katello-devel-stable.example.com
firewall --disabled
# Set SELinux to permissive
selinux --permissive
timezone UTC
unsupported_hardware
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
autopart
auth --enableshadow --passalgo=sha512 --kickstart
# Root password
rootpw vagrant
# Do not run the Setup Agent on first boot and agree to the EULA
firstboot --disabled
eula --agreed
# Do not configure the X Window System
cmdline
skipx
# System services
services --enabled=NetworkManager,sshd
# System timezone
timezone UTC
reboot
user --name=vagrant --plaintext --password vagrant --groups=vagrant,wheel

%packages --ignoremissing --excludedocs
@Base
@Core
openssh-clients
%packages --excludedocs
sudo
openssl-devel
readline-devel
vim
wget
curl
vim
openssl
kexec-tools
openssh-clients
openssl-devel
%end

%post
yum update -y
# Disable kdump
%addon com_redhat_kdump --disable
%end

# sudo
yum install -y sudo
%post
exec < /dev/tty3 > /dev/tty3
chvt 3
echo
echo "################################"
echo "# Running Post Configuration #"
echo "################################"
(
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers

yum clean all
) 2>&1 | /usr/bin/tee /var/log/post_install.log
chvt 1

%end

0 comments on commit 330a07b

Please sign in to comment.