Move to external boot files
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env xonsh
|
||||
$RAISE_SUBPROC_ERROR = True
|
||||
from pathlib import Path
|
||||
import sys
|
||||
self = Path(__file__).absolute()
|
||||
base = self.parent.parent.parent.parent
|
||||
source @(base / "test.xsh")
|
||||
|
||||
|
||||
opts = get_parser(sys.argv[1:])
|
||||
|
||||
cd @(str(base))
|
||||
for provider in opts["providers"]:
|
||||
packer build -var=@(opts["headless"]) -var-file=@(self.parent / "x86_64.pkrvars.hcl") @(opts["upload"]) -only=@(provider) @(base / "sources")
|
||||
@@ -0,0 +1,54 @@
|
||||
install
|
||||
text
|
||||
reboot
|
||||
network --bootproto=dhcp --activate
|
||||
url --url=http://mirror.centos.org/centos/7/os/x86_64/
|
||||
repo --name=updates --baseurl=http://mirror.centos.org/centos/7/updates/x86_64/
|
||||
lang en_US.UTF-8
|
||||
keyboard us
|
||||
timezone --utc Etc/UTC
|
||||
rootpw --plaintext vagrant
|
||||
user --name=vagrant --groups=vagrant --password=vagrant --plaintext
|
||||
zerombr
|
||||
clearpart --all --initlabel
|
||||
autopart --type=plain
|
||||
bootloader --timeout=1
|
||||
|
||||
%packages
|
||||
@core
|
||||
which
|
||||
libselinux-python
|
||||
# mandatory packages in the @core group
|
||||
-btrfs-progs
|
||||
-iprutils
|
||||
-kexec-tools
|
||||
-plymouth
|
||||
# default packages in the @core group
|
||||
-*-firmware
|
||||
-dracut-config-rescue
|
||||
-kernel-tools
|
||||
-libsysfs
|
||||
-microcode_ctl
|
||||
-NetworkManager*
|
||||
-postfix
|
||||
-rdma
|
||||
%end
|
||||
|
||||
%post --erroronfail
|
||||
yum -y update
|
||||
|
||||
cat <<EOF > /etc/sudoers.d/vagrant
|
||||
Defaults:vagrant !requiretty
|
||||
vagrant ALL=(ALL) NOPASSWD: ALL
|
||||
EOF
|
||||
chmod 440 /etc/sudoers.d/vagrant
|
||||
|
||||
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
|
||||
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF
|
||||
DEVICE="eth0"
|
||||
BOOTPROTO="dhcp"
|
||||
ONBOOT="yes"
|
||||
TYPE="Ethernet"
|
||||
EOF
|
||||
%end
|
||||
|
||||
@@ -9,60 +9,4 @@ boot_command = [
|
||||
"<bs><bs><bs><bs><bs> inst.ks=cdrom:/ks.cfg console=tty0",
|
||||
"<enter>"
|
||||
]
|
||||
cd_files = {
|
||||
"ks.cfg" = <<KICKSTART
|
||||
install
|
||||
text
|
||||
reboot
|
||||
network --bootproto=dhcp --activate
|
||||
url --url=http://mirror.centos.org/centos/7/os/x86_64/
|
||||
repo --name=updates --baseurl=http://mirror.centos.org/centos/7/updates/x86_64/
|
||||
lang en_US.UTF-8
|
||||
keyboard us
|
||||
timezone --utc Etc/UTC
|
||||
rootpw --plaintext vagrant
|
||||
user --name=vagrant --groups=vagrant --password=vagrant --plaintext
|
||||
zerombr
|
||||
clearpart --all --initlabel
|
||||
autopart --type=plain
|
||||
bootloader --timeout=1
|
||||
|
||||
%packages
|
||||
@core
|
||||
which
|
||||
libselinux-python
|
||||
# mandatory packages in the @core group
|
||||
-btrfs-progs
|
||||
-iprutils
|
||||
-kexec-tools
|
||||
-plymouth
|
||||
# default packages in the @core group
|
||||
-*-firmware
|
||||
-dracut-config-rescue
|
||||
-kernel-tools
|
||||
-libsysfs
|
||||
-microcode_ctl
|
||||
-NetworkManager*
|
||||
-postfix
|
||||
-rdma
|
||||
%end
|
||||
|
||||
%post --erroronfail
|
||||
yum -y update
|
||||
|
||||
cat <<EOF > /etc/sudoers.d/vagrant
|
||||
Defaults:vagrant !requiretty
|
||||
vagrant ALL=(ALL) NOPASSWD: ALL
|
||||
EOF
|
||||
chmod 440 /etc/sudoers.d/vagrant
|
||||
|
||||
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
|
||||
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF
|
||||
DEVICE="eth0"
|
||||
BOOTPROTO="dhcp"
|
||||
ONBOOT="yes"
|
||||
TYPE="Ethernet"
|
||||
EOF
|
||||
%end
|
||||
KICKSTART
|
||||
}
|
||||
cd_files = [ "distros/centos/7/disc/*" ]
|
||||
|
||||
Reference in New Issue
Block a user