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 Fedora 28 (fedora-28-x86_64.json) #37

Merged
merged 1 commit into from Jun 16, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
111 changes: 111 additions & 0 deletions fedora-28-x86_64.json
@@ -0,0 +1,111 @@
{
"builders": [{
"type": "qemu",
"iso_url": "{{user `mirror`}}/releases/28/Server/x86_64/iso/Fedora-Server-netinst-x86_64-28-1.1.iso",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"output_directory": "output-fedora-28-x86_64-{{build_type}}",
"vm_name": "packer-fedora-28-x86_64",
"disk_size": "{{user `disk_size`}}",
"headless": "{{user `headless`}}",
"http_directory": "http",
"boot_wait": "5s",
"boot_command": [
"<tab> ",
"inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-28/anaconda-ks.cfg ",
"biosdevname=0 ",
"net.ifnames=0 ",
"<enter>"
],
"ssh_timeout": "{{user `ssh_timeout`}}",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"shutdown_command": "sudo systemctl poweroff",
"qemuargs": [
["-m", "{{user `memory`}}"],
["-smp", "{{user `cpus`}}"]
]
}, {
"type": "virtualbox-iso",
"guest_os_type": "Fedora_64",
"iso_url": "{{user `mirror`}}/releases/28/Server/x86_64/iso/Fedora-Server-netinst-x86_64-28-1.1.iso",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"output_directory": "output-fedora-28-x86_64-{{build_type}}",
"vm_name": "packer-fedora-28-x86_64",
"disk_size": "{{user `disk_size`}}",
"headless": "{{user `headless`}}",
"http_directory": "http",
"boot_wait": "5s",
"boot_command": [
"<tab> ",
"inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-28/anaconda-ks.cfg ",
"biosdevname=0 ",
"net.ifnames=0 ",
"<enter>"
],
"ssh_timeout": "{{user `ssh_timeout`}}",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"shutdown_command": "sudo systemctl poweroff",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"],
["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"]
]
}, {
"type": "vmware-iso",
"guest_os_type": "fedora-64",
"iso_url": "{{user `mirror`}}/releases/28/Server/x86_64/iso/Fedora-Server-netinst-x86_64-28-1.1.iso",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"output_directory": "output-fedora-28-x86_64-{{build_type}}",
"vm_name": "packer-fedora-28-x86_64",
"disk_size": "{{user `disk_size`}}",
"headless": "{{user `headless`}}",
"http_directory": "http",
"boot_wait": "5s",
"boot_command": [
"<tab> ",
"inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora-28/anaconda-ks.cfg ",
"biosdevname=0 ",
"net.ifnames=0 ",
"<enter>"
],
"ssh_timeout": "{{user `ssh_timeout`}}",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"shutdown_command": "sudo systemctl poweroff",
"vmx_data": {
"memsize": "{{user `memory`}}",
"numvcpus": "{{user `cpus`}}"
},
"vmx_remove_ethernet_interfaces": true
}],
"provisioners": [{
"type": "shell",
"scripts": [
"scripts/fedora/virtualbox.sh",
"scripts/fedora/vmware.sh",
"scripts/common/vagrant.sh",
"scripts/common/sshd.sh",
"scripts/fedora/cleanup.sh",
"scripts/common/minimize.sh"
]
}],
"post-processors": [{
"type": "vagrant",
"compression_level": "{{user `compression_level`}}",
"output": "fedora-28-x86_64-{{.Provider}}.box"
}],
"variables": {
"compression_level": "6",
"cpus": "1",
"disk_size": "40000",
"headless": "false",
"iso_checksum": "ea1efdc692356b3346326f82e2f468903e8da59324fdee8b10eac4fea83f23fe",
"iso_checksum_type": "sha256",
"memory": "768",
"mirror": "http://download.fedoraproject.org/pub/fedora/linux",
"ssh_timeout": "60m"
}
}
52 changes: 52 additions & 0 deletions http/fedora-28/anaconda-ks.cfg
@@ -0,0 +1,52 @@
install
text
reboot
url --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
lang en_US.UTF-8
keyboard us
timezone --utc Etc/UTC
rootpw --plaintext vagrant
user --name=vagrant --password=vagrant --plaintext
zerombr
autopart --type=plain
clearpart --all --initlabel
bootloader --timeout=1

%packages --excludeWeakdeps
@core
kernel-core
systemd-udev
which
-firewalld
-kernel
-NetworkManager
-plymouth
%end

%post --erroronfail
dnf -y update

cat <<EOF > /etc/sudoers.d/vagrant
Defaults:vagrant !requiretty
vagrant ALL=(ALL) NOPASSWD: ALL
EOF
chmod 440 /etc/sudoers.d/vagrant

mkdir -p /etc/systemd/network
ln -sf /dev/null /etc/systemd/network/99-default.link

cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF
BOOTPROTO=dhcp
DEVICE=eth0
ONBOOT=yes
EOF

cat > /etc/sysconfig/network <<EOF
DEVTIMEOUT=10
NOZEROCONF=yes
EOF

# Enabling network service in the services line causes the installer to crash
# https://bugzilla.redhat.com/show_bug.cgi?id=1369794
chkconfig network on
%end