-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
298 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alpine316.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"variables": { | ||
"home": "{{ env `HOME` }}", | ||
"serial": "stdio", | ||
"appliance_name": "rocky" | ||
}, | ||
"builders": [{ | ||
"name": "qemu", | ||
"type": "qemu", | ||
"accelerator": "kvm", | ||
"headless": false, | ||
"boot_command": [ | ||
"<tab><bs><bs><bs><bs><bs> append rd.live.check=0 inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rocky8.ks<enter><wait>" | ||
], | ||
"boot_wait": "10s", | ||
"disk_size": 4096, | ||
"disk_cache": "unsafe", | ||
"output_directory": "{{ user `output_dir` }}", | ||
"format": "qcow2", | ||
"http_directory": "{{user `http_dir`}}", | ||
"iso_url": "{{ user `base_image` }}", | ||
"iso_checksum": "none", | ||
"ssh_username": "root", | ||
"ssh_password": "v-YC470*/9i2CX+y3fP:D+%Z-1g-|p4P", | ||
"ssh_port": 22, | ||
"ssh_wait_timeout": "10000s", | ||
"net_device": "virtio-net", | ||
"disk_interface": "virtio", | ||
"vm_name": "{{ user `appliance_name` }}", | ||
"shutdown_command": "poweroff", | ||
"qemu_binary": "{{ user `qemu_binary`}}", | ||
"qemuargs": [ | ||
[ "-m", "1G" ], | ||
[ "-serial", "{{ user `serial` }}" ], | ||
["-cpu", "host"] | ||
] | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# more information is available at | ||
# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html | ||
install | ||
#cmdline | ||
|
||
# System authorization information | ||
authconfig --enableshadow --passalgo=sha512 --enablefingerprint | ||
|
||
# Use net installation media | ||
url --url="http://download.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/" | ||
repo --name="BaseOS" --baseurl="http://download.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/" --cost=100 | ||
repo --name="AppStream" --baseurl="http://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/" --cost=100 | ||
repo --name="extras" --baseurl="http://download.rockylinux.org/pub/rocky/8/extras/x86_64/os/" --cost=100 | ||
#repo --name="updates" --baseurl="http://mirror.centos.org/centos/8/updates/x86_64/os/" --cost=100 | ||
|
||
# Run the Setup Agent on first boot | ||
firstboot --disable | ||
|
||
# Keyboard layouts | ||
keyboard --vckeymap=us --xlayouts='us' | ||
|
||
# System language | ||
lang en_US.UTF-8 | ||
|
||
# Network information | ||
network --bootproto=dhcp --device=enp0s3 --ipv6=auto --activate | ||
# network --hostname=localhost.localdomain | ||
firewall --disabled | ||
|
||
# Root password | ||
rootpw --iscrypted $6$rounds=2000000$CZnmDr1iAnoCk$l5fEPfdtBpwfvOA1.Wn4Ipbh1Y.ahTPzNPZyXvaU2T4MtS907l8QqwMKLLa/8XMDpV2ZuXFUDX8aG2YqRX7mM1 | ||
#selinux --permissive | ||
selinux | ||
|
||
# System services | ||
services --disabled="kdump" | ||
%addon com_redhat_kdump --disable | ||
%end | ||
|
||
# System timezone | ||
timezone UTC --isUtc | ||
|
||
# System bootloader configuration | ||
bootloader --location=mbr --timeout=1 | ||
zerombr | ||
|
||
clearpart --all --initlabel | ||
part / --fstype xfs --size=1024 --grow | ||
|
||
# Reboot the machine after successful installation | ||
reboot --eject | ||
#poweroff | ||
|
||
%post --erroronfail | ||
yum -C -y remove linux-firmware | ||
%end | ||
|
||
%packages --ignoremissing --excludedocs | ||
@core | ||
#deltarpm | ||
openssh-clients | ||
NetworkManager | ||
dracut-config-generic | ||
kernel | ||
-firewalld | ||
-aic94xx-firmware | ||
-alsa-firmware | ||
-alsa-lib | ||
-alsa-tools-firmware | ||
-biosdevname | ||
-iprutils | ||
#-linux-firmware | ||
-ivtv-firmware | ||
-iwl100-firmware | ||
-iwl1000-firmware | ||
-iwl105-firmware | ||
-iwl135-firmware | ||
-iwl2000-firmware | ||
-iwl2030-firmware | ||
-iwl3160-firmware | ||
-iwl3945-firmware | ||
-iwl4965-firmware | ||
-iwl5000-firmware | ||
-iwl5150-firmware | ||
-iwl6000-firmware | ||
-iwl6000g2a-firmware | ||
-iwl6000g2b-firmware | ||
-iwl6050-firmware | ||
-iwl7260-firmware | ||
-iwl7265-firmware | ||
-libertas-sd8686-firmware | ||
-libertas-sd8787-firmware | ||
-libertas-usb8388-firmware | ||
-plymouth | ||
-dracut-config-rescue | ||
-kexec-tools | ||
-microcode_ctl | ||
%end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"variables": { | ||
"home": "{{ env `HOME` }}", | ||
"serial": "stdio", | ||
"appliance_name": "rocky" | ||
}, | ||
"builders": [{ | ||
"name": "qemu", | ||
"type": "qemu", | ||
"accelerator": "kvm", | ||
"headless": false, | ||
"boot_command": [ | ||
"<tab><bs><bs><bs><bs><bs> append rd.live.check=0 inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rocky9.ks<enter><wait>" | ||
], | ||
"boot_wait": "10s", | ||
"disk_size": 4096, | ||
"disk_cache": "unsafe", | ||
"output_directory": "{{ user `output_dir` }}", | ||
"format": "qcow2", | ||
"http_directory": "{{user `http_dir`}}", | ||
"iso_url": "{{ user `base_image` }}", | ||
"iso_checksum": "none", | ||
"ssh_username": "root", | ||
"ssh_password": "v-YC470*/9i2CX+y3fP:D+%Z-1g-|p4P", | ||
"ssh_port": 22, | ||
"ssh_wait_timeout": "10000s", | ||
"net_device": "virtio-net", | ||
"disk_interface": "virtio", | ||
"vm_name": "{{ user `appliance_name` }}", | ||
"shutdown_command": "poweroff", | ||
"qemu_binary": "{{ user `qemu_binary`}}", | ||
"qemuargs": [ | ||
[ "-m", "1G" ], | ||
[ "-serial", "{{ user `serial` }}" ], | ||
["-cpu", "host"] | ||
] | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# more information is available at | ||
# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html | ||
#cmdline | ||
|
||
# System authorization information | ||
authconfig --enableshadow --passalgo=sha512 --enablefingerprint | ||
|
||
# Use net installation media | ||
url --url="https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/" | ||
repo --name="BaseOS" --baseurl="https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/" --cost=100 | ||
repo --name="AppStream" --baseurl="https://download.rockylinux.org/pub/rocky/9/AppStream/x86_64/os/" --cost=100 | ||
repo --name="extras" --baseurl="https://download.rockylinux.org/pub/rocky/9/extras/x86_64/os/" --cost=100 | ||
|
||
# Run the Setup Agent on first boot | ||
firstboot --disable | ||
|
||
# Keyboard layouts | ||
keyboard --vckeymap=us --xlayouts='us' | ||
|
||
# System language | ||
lang en_US.UTF-8 | ||
|
||
# Network information | ||
network --bootproto=dhcp --device=enp0s3 --ipv6=auto --activate | ||
# network --hostname=localhost.localdomain | ||
firewall --disabled | ||
|
||
# Root password | ||
rootpw --iscrypted $6$rounds=2000000$CZnmDr1iAnoCk$l5fEPfdtBpwfvOA1.Wn4Ipbh1Y.ahTPzNPZyXvaU2T4MtS907l8QqwMKLLa/8XMDpV2ZuXFUDX8aG2YqRX7mM1 | ||
#selinux --permissive | ||
selinux | ||
|
||
# System services | ||
services --disabled="kdump" | ||
%addon com_redhat_kdump --disable | ||
%end | ||
|
||
# System timezone | ||
timezone UTC --isUtc | ||
|
||
# System bootloader configuration | ||
bootloader --location=mbr --timeout=1 | ||
zerombr | ||
|
||
clearpart --all --initlabel | ||
part / --fstype ext4 --size=1024 --grow | ||
|
||
# Reboot the machine after successful installation | ||
reboot --eject | ||
#poweroff | ||
|
||
%post --erroronfail | ||
yum -C -y remove linux-firmware | ||
echo "PermitRootLogin yes" > /etc/ssh/sshd_config.d/01-permitrootlogin.conf | ||
%end | ||
|
||
%packages --ignoremissing --excludedocs | ||
@core | ||
#deltarpm | ||
openssh-clients | ||
NetworkManager | ||
dracut-config-generic | ||
kernel | ||
-firewalld | ||
-aic94xx-firmware | ||
-alsa-firmware | ||
-alsa-lib | ||
-alsa-tools-firmware | ||
-biosdevname | ||
-iprutils | ||
#-linux-firmware | ||
-ivtv-firmware | ||
-iwl100-firmware | ||
-iwl1000-firmware | ||
-iwl105-firmware | ||
-iwl135-firmware | ||
-iwl2000-firmware | ||
-iwl2030-firmware | ||
-iwl3160-firmware | ||
-iwl3945-firmware | ||
-iwl4965-firmware | ||
-iwl5000-firmware | ||
-iwl5150-firmware | ||
-iwl6000-firmware | ||
-iwl6000g2a-firmware | ||
-iwl6000g2b-firmware | ||
-iwl6050-firmware | ||
-iwl7260-firmware | ||
-iwl7265-firmware | ||
-libertas-sd8686-firmware | ||
-libertas-sd8787-firmware | ||
-libertas-usb8388-firmware | ||
-plymouth | ||
-dracut-config-rescue | ||
-kexec-tools | ||
-microcode_ctl | ||
%end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
# | ||
# QEMU_BINARY should be exported already | ||
|
||
DISTRO=$1 | ||
DST=$2 | ||
DIR_CURR=$(dirname "$0") | ||
BASE_IMAGE=$DIR_BASE/$DISTRO.img | ||
PACKER_WORKING_DIR=$DIR_BUILD/_packer/$DISTRO | ||
mkdir -p "$PACKER_WORKING_DIR" | ||
|
||
packer build -force \ | ||
-var "base_image=${BASE_IMAGE}" \ | ||
-var "qemu_binary=${QEMU_BINARY}" \ | ||
-var "appliance_name=${DISTRO}" \ | ||
-var "http_dir=${DIR_CURR}" \ | ||
-var "output_dir=${PACKER_WORKING_DIR}" \ | ||
"$DIR_CURR/$DISTRO.json" | ||
|
||
mv "$PACKER_WORKING_DIR/$DISTRO" "$DST" | ||
rmdir "$DIR_BUILD/_packer/$DISTRO" ||: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rocky8 |