Skip to content

Commit

Permalink
Merge pull request chef#489 from rickard-von-essen/fedora-23
Browse files Browse the repository at this point in the history
Support Fedora 23
  • Loading branch information
Seth Thomas committed Nov 16, 2015
2 parents abd2c7b + f12c1a2 commit 550509e
Show file tree
Hide file tree
Showing 3 changed files with 397 additions and 0 deletions.
173 changes: 173 additions & 0 deletions fedora-23-i386.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@

{
"builders": [
{
"boot_command": [
"<tab> linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 40960,
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"guest_os_type": "Fedora",
"hard_drive_interface": "sata",
"headless": "{{ user `headless` }}",
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-virtualbox",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_wait_timeout": "10000s",
"type": "virtualbox-iso",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"512"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"1"
]
],
"virtualbox_version_file": ".vbox_version",
"vm_name": "{{ user `template` }}"
},
{
"boot_command": [
"<tab> linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 40960,
"guest_os_type": "fedora",
"headless": "{{ user `headless` }}",
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-vmware",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_wait_timeout": "10000s",
"tools_upload_flavor": "linux",
"type": "vmware-iso",
"vm_name": "{{ user `template` }}",
"vmx_data": {
"cpuid.coresPerSocket": "1",
"memsize": "512",
"numvcpus": "1"
}
},
{
"boot_command": [
"<tab> linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 40960,
"guest_os_type": "fedora-core",
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-parallels",
"parallels_tools_flavor": "lin",
"prlctl": [
[
"set",
"{{.Name}}",
"--memsize",
"512"
],
[
"set",
"{{.Name}}",
"--cpus",
"1"
]
],
"prlctl_version_file": ".prlctl_version",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_wait_timeout": "10000s",
"type": "parallels-iso",
"vm_name": "{{ user `template` }}"
},
{
"boot_command": [
"<tab> linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 40960,
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-qemu",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_wait_timeout": "10000s",
"type": "qemu",
"vm_name": "{{ user `template` }}"
}
],
"post-processors": [
{
"output": "builds/{{user `box_basename`}}.{{.Provider}}.box",
"type": "vagrant"
}
],
"provisioners": [
{
"destination": "/tmp/bento-metadata.json",
"source": "{{user `metadata`}}",
"type": "file"
},
{
"environment_vars": [],
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
"scripts/common/metadata.sh",
"scripts/fedora/fix-slow-dns.sh",
"scripts/common/sshd.sh",
"scripts/fedora/22-build-tools.sh",
"scripts/common/vmtools.sh",
"scripts/common/vagrant.sh",
"scripts/fedora/cleanup.sh",
"scripts/common/minimize.sh"
],
"type": "shell"
}
],
"variables": {
"arch": "32",
"box_basename": "fedora-23-i386",
"build_timestamp": "{{isotime \"20060102150405\"}}",
"git_revision": "__unknown_git_revision__",
"headless": "",
"http_proxy": "{{env `http_proxy`}}",
"https_proxy": "{{env `https_proxy`}}",
"iso_checksum": "aa2125b6351480ce82ace619925d897d0588195a3287ef74fb203b6eb34cbccf",
"iso_checksum_type": "sha256",
"iso_name": "Fedora-Server-DVD-i386-23.iso",
"ks_path": "fedora-23/ks.cfg",
"metadata": "floppy/dummy_metadata.json",
"mirror": "http://download.fedoraproject.org/pub/fedora/linux",
"mirror_directory": "releases/23/Server/i386/iso",
"name": "fedora-23-i386",
"no_proxy": "{{env `no_proxy`}}",
"template": "fedora-23-i386",
"version": "2.0.TIMESTAMP"
}
}
177 changes: 177 additions & 0 deletions fedora-23-x86_64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"builders": [
{
"boot_command": [
"<tab> linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 40960,
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"guest_os_type": "Fedora_64",
"hard_drive_interface": "sata",
"headless": "{{ user `headless` }}",
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-virtualbox",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_wait_timeout": "10000s",
"type": "virtualbox-iso",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"512"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"1"
]
],
"virtualbox_version_file": ".vbox_version",
"vm_name": "{{ user `template` }}"
},
{
"boot_command": [
"<tab> linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 40960,
"guest_os_type": "fedora-64",
"headless": "{{ user `headless` }}",
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-vmware",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_wait_timeout": "10000s",
"tools_upload_flavor": "linux",
"type": "vmware-iso",
"vm_name": "{{ user `template` }}",
"vmx_data": {
"cpuid.coresPerSocket": "1",
"memsize": "512",
"numvcpus": "1"
}
},
{
"boot_command": [
"<tab> linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 40960,
"guest_os_type": "fedora-core",
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-parallels",
"parallels_tools_flavor": "lin",
"prlctl": [
[
"set",
"{{.Name}}",
"--memsize",
"512"
],
[
"set",
"{{.Name}}",
"--cpus",
"1"
]
],
"prlctl_version_file": ".prlctl_version",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_wait_timeout": "10000s",
"type": "parallels-iso",
"vm_name": "{{ user `template` }}"
},
{
"boot_command": [
"<tab> linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 40960,
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-qemu",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_wait_timeout": "10000s",
"type": "qemu",
"vm_name": "{{ user `template` }}"
}
],
"post-processors": [
{
"output": "builds/{{user `box_basename`}}.{{.Provider}}.box",
"type": "vagrant"
}
],
"provisioners": [
{
"destination": "/tmp/bento-metadata.json",
"source": "{{user `metadata`}}",
"type": "file"
},
{
"environment_vars": [
"HOME_DIR=/home/vagrant",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
"no_proxy={{user `no_proxy`}}"
],
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
"scripts/common/metadata.sh",
"scripts/fedora/fix-slow-dns.sh",
"scripts/fedora/22-build-tools.sh",
"scripts/common/sshd.sh",
"scripts/common/vmtools.sh",
"scripts/common/vagrant.sh",
"scripts/fedora/cleanup.sh",
"scripts/common/minimize.sh"
],
"type": "shell"
}
],
"variables": {
"arch": "64",
"box_basename": "fedora-23",
"build_timestamp": "{{isotime \"20060102150405\"}}",
"git_revision": "__unknown_git_revision__",
"headless": "",
"http_proxy": "{{env `http_proxy`}}",
"https_proxy": "{{env `https_proxy`}}",
"iso_checksum": "30758dc821d1530de427c9e35212bd79b058bd4282e64b7b34ae1a40c87c05ae",
"iso_checksum_type": "sha256",
"iso_name": "Fedora-Server-DVD-x86_64-23.iso",
"ks_path": "fedora-23/ks.cfg",
"metadata": "floppy/dummy_metadata.json",
"mirror": "http://download.fedoraproject.org/pub/fedora/linux",
"mirror_directory": "releases/23/Server/x86_64/iso",
"name": "fedora-23",
"no_proxy": "{{env `no_proxy`}}",
"template": "fedora-23-x86_64",
"version": "2.0.TIMESTAMP"
}
}
47 changes: 47 additions & 0 deletions http/fedora-23/ks.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
install
cdrom
lang en_US.UTF-8
keyboard us
network --bootproto=dhcp
rootpw vagrant
firewall --disabled
authconfig --enableshadow --passalgo=sha512
selinux --permissive
timezone UTC
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
part /boot --fstype=ext4 --size=500
part pv.2 --grow --size=500
volgroup vg_vagrant --pesize=32768 pv.2
logvol / --fstype=ext4 --name=lv_root --vgname=vg_vagrant --size=1024 --grow
logvol swap --fstype=swap --name=lv_swap --vgname=vg_vagrant --size=528 --grow --maxsize=1056
bootloader --location=mbr --append="norhgb biosdevname=0"
firstboot --disabled
reboot
user --name=vagrant --plaintext --password vagrant

%packages --ignoremissing --excludedocs
bzip2
# GCC won't install during kickstart
#gcc
kernel-devel
kernel-headers
tar
wget
nfs-utils
net-tools
dnf-yum
-linux-firmware
-plymouth
-plymouth-core-libs
%end

%post
# sudo
echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant
echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant
chmod 440 /etc/sudoers.d/vagrant
%end

0 comments on commit 550509e

Please sign in to comment.