Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions template/centos/centos510-net.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
"type": "vmware",
"guest_os_type": "centos-64",
"http_directory": "http",
"iso_url": "http://centos.mirrors.hoobly.com/5.10/isos/x86_64/CentOS-5.10-x86_64-netinstall.iso",
"iso_checksum": "0eaa8b1958132fa4dd9c7d7eb716a4e49f0802d6",
"iso_checksum_type": "sha1",
"headless":true,
"iso_url": "http://mirror.stanford.edu/yum/pub/centos/5.10/isos/x86_64/CentOS-5.10-x86_64-netinstall.iso",
"iso_checksum": "e09e44f04f0a4b97b04935e0ba88833f",
"iso_checksum_type": "md5",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "10000s",
"tools_upload_flavor": "linux",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks-net.cfg<enter>"
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks510-net.cfg<enter>"
],
"shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h now",
"disk_size": 10140,
Expand All @@ -26,17 +27,18 @@
"vm_name": "centos510-net",
"type": "virtualbox",
"http_directory": "http",
"iso_url": "http://centos.mirrors.hoobly.com/5.10/isos/x86_64/CentOS-5.10-x86_64-netinstall.iso",
"iso_checksum": "0eaa8b1958132fa4dd9c7d7eb716a4e49f0802d6",
"iso_checksum_type": "sha1",
"headless":true,
"iso_url": "http://mirror.stanford.edu/yum/pub/centos/5.10/isos/x86_64/CentOS-5.10-x86_64-netinstall.iso",
"iso_checksum": "e09e44f04f0a4b97b04935e0ba88833f",
"iso_checksum_type": "md5",
"guest_os_type": "RedHat_64",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"virtualbox_version_file": ".vbox_version",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "10000s",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks-net.cfg<enter>"
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks510-net.cfg<enter>"
],
"shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h now",
"disk_size": 10140,
Expand Down
73 changes: 73 additions & 0 deletions template/centos/centos59-net.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"builders": [{
"vm_name": "centos59",
"type": "vmware",
"guest_os_type": "centos-64",
"http_directory": "http",
"headless":true,
"iso_url": "http://mirror.stanford.edu/yum/pub/centos/5.9/isos/x86_64/CentOS-5.9-x86_64-netinstall.iso",
"iso_checksum": "445cfe6236327450bcbda17319b73559",
"iso_checksum_type": "md5",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "10000s",
"tools_upload_flavor": "linux",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks59-net.cfg<enter>"
],
"shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h now",
"disk_size": 10140,
"vmx_data": {
"memsize": "512",
"numvcpus": "1",
"cpuid.coresPerSocket": "1"
}
},
{
"vm_name": "centos59",
"type": "virtualbox",
"http_directory": "http",
"headless":true,
"iso_url": "http://mirror.stanford.edu/yum/pub/centos/5.9/isos/x86_64/CentOS-5.9-x86_64-netinstall.iso",
"iso_checksum": "445cfe6236327450bcbda17319b73559",
"iso_checksum_type": "md5",
"guest_os_type": "RedHat_64",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"virtualbox_version_file": ".vbox_version",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "10000s",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks59-net.cfg<enter>"
],
"shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h now",
"disk_size": 10140,
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "512"],
["modifyvm", "{{.Name}}", "--cpus", "1"]
]
}],
"provisioners": [{
"type": "shell",
"scripts": [
"script/base.sh",
"script/vagrant.sh",
"script/vmtools.sh",
"script/cleanup.sh",
"script/zerodisk.sh"
],
"override": {
"virtualbox": {
"execute_command": "echo 'vagrant'|{{.Vars}} sudo -E -S bash '{{.Path}}'"
},
"vmware": {
"execute_command": "echo 'vagrant'|{{.Vars}} sudo -E -S bash '{{.Path}}'"
}
}
}],
"post-processors": [{
"type": "vagrant",
"keep_input_artifact": false,
"output": "../../{{.Provider}}/centos59.box"
}]
}
73 changes: 73 additions & 0 deletions template/centos/centos64-net.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"builders": [{
"vm_name": "centos510-net",
"type": "vmware",
"guest_os_type": "centos-64",
"http_directory": "http",
"headless":true,
"iso_url": "http://mirror.stanford.edu/yum/pub/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-netinstall.iso",
"iso_checksum": "bb9af2aea1344597e11070abe6b1fcd3",
"iso_checksum_type": "md5",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "10000s",
"tools_upload_flavor": "linux",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks510-net.cfg<enter>"
],
"shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h now",
"disk_size": 10140,
"vmx_data": {
"memsize": "512",
"numvcpus": "1",
"cpuid.coresPerSocket": "1"
}
},
{
"vm_name": "centos510-net",
"type": "virtualbox",
"http_directory": "http",
"headless":true,
"iso_url": "http://mirror.stanford.edu/yum/pub/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-netinstall.iso",
"iso_checksum": "bb9af2aea1344597e11070abe6b1fcd3",
"iso_checksum_type": "md5",
"guest_os_type": "RedHat_64",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"virtualbox_version_file": ".vbox_version",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "10000s",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks510-net.cfg<enter>"
],
"shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h now",
"disk_size": 10140,
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "512"],
["modifyvm", "{{.Name}}", "--cpus", "1"]
]
}],
"provisioners": [{
"type": "shell",
"scripts": [
"script/base.sh",
"script/vagrant.sh",
"script/vmtools.sh",
"script/cleanup.sh",
"script/zerodisk.sh"
],
"override": {
"virtualbox": {
"execute_command": "echo 'vagrant'|{{.Vars}} sudo -E -S bash '{{.Path}}'"
},
"vmware": {
"execute_command": "echo 'vagrant'|{{.Vars}} sudo -E -S bash '{{.Path}}'"
}
}
}],
"post-processors": [{
"type": "vagrant",
"keep_input_artifact": false,
"output": "../../{{.Provider}}/centos510-net.box"
}]
}
62 changes: 62 additions & 0 deletions template/centos/http/ks510-net.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# CentOS 5.x & 6.x netboot kickstart file - ks-net.cfg
#
# For more information on kickstart syntax and commands, refer to the
# CentOS Installation Guide:
# http://www.centos.org/docs/5/html/Installation_Guide-en-US/ch-kickstart2.html
# https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-options.html
#
# For testing, you can fire up a local http server temporarily.
# cd to the directory where this ks.cfg file resides and run the following:
# $ python -m SimpleHTTPServer
# You don't have to restart the server every time you make changes. Python
# will reload the file from disk every time. As long as you save your changes
# they will be reflected in the next HTTP download. Then to test with
# a PXE boot server, enter the following on the PXE boot prompt:
# > linux text ks=http://<your_ip>:8000/ks.cfg

# Add a link to your favorite CentOS mirror to install via netboot.
url --url http://mirror.stanford.edu/yum/pub/centos/5.10/os/x86_64/
# url --url http://mirror.centos.org/centos/5.9/os/x86_64

# Required settings
lang en_US.UTF-8
keyboard us
rootpw vagrant
authconfig --enableshadow --enablemd5
#timezone UTC
timezone --utc America/Los_Angeles

# Optional settings
install
cdrom
network --bootproto=dhcp
firewall --disabled
selinux --disabled
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
autopart
firstboot --disabled
reboot

%packages --ignoremissing
@Base
# Prerequisites for installing VMware Tools or VirtualBox guest additions.
# Put in kickstart to ensure first version installed is from install disk,
# not latest from a mirror.
kernel-headers
kernel-devel
gcc
make
perl
curl
wget

%post
/usr/bin/yum -y install sudo
/usr/sbin/groupadd vagrant
/usr/sbin/useradd vagrant -g vagrant -G wheel
echo "vagrant"|passwd --stdin vagrant
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# > linux text ks=http://<your_ip>:8000/ks.cfg

# Add a link to your favorite CentOS mirror to install via netboot.
url --url http://centos.mirrors.hoobly.com/5.10/os/x86_64/
# url --url http://mirror.centos.org/centos/5.10/os/x86_64
url --url http://mirror.stanford.edu/yum/pub/centos/5.9/os/x86_64/
# url --url http://mirror.centos.org/centos/5.9/os/x86_64

# Required settings
lang en_US.UTF-8
Expand Down
62 changes: 62 additions & 0 deletions template/centos/http/ks64-net.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# CentOS 5.x & 6.x netboot kickstart file - ks-net.cfg
#
# For more information on kickstart syntax and commands, refer to the
# CentOS Installation Guide:
# http://www.centos.org/docs/5/html/Installation_Guide-en-US/ch-kickstart2.html
# https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-options.html
#
# For testing, you can fire up a local http server temporarily.
# cd to the directory where this ks.cfg file resides and run the following:
# $ python -m SimpleHTTPServer
# You don't have to restart the server every time you make changes. Python
# will reload the file from disk every time. As long as you save your changes
# they will be reflected in the next HTTP download. Then to test with
# a PXE boot server, enter the following on the PXE boot prompt:
# > linux text ks=http://<your_ip>:8000/ks.cfg

# Add a link to your favorite CentOS mirror to install via netboot.
url --url http://mirror.stanford.edu/yum/pub/centos/6.4/os/x86_64/
# url --url http://mirror.centos.org/centos/5.9/os/x86_64

# Required settings
lang en_US.UTF-8
keyboard us
rootpw vagrant
authconfig --enableshadow --enablemd5
#timezone UTC
timezone --utc America/Los_Angeles

# Optional settings
install
cdrom
network --bootproto=dhcp
firewall --disabled
selinux --disabled
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
autopart
firstboot --disabled
reboot

%packages --ignoremissing
@Base
# Prerequisites for installing VMware Tools or VirtualBox guest additions.
# Put in kickstart to ensure first version installed is from install disk,
# not latest from a mirror.
kernel-headers
kernel-devel
gcc
make
perl
curl
wget

%post
/usr/bin/yum -y install sudo
/usr/sbin/groupadd vagrant
/usr/sbin/useradd vagrant -g vagrant -G wheel
echo "vagrant"|passwd --stdin vagrant
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers