diff --git a/template/centos/centos510-net.json b/template/centos/centos510-net.json index bd0b741..d537212 100644 --- a/template/centos/centos510-net.json +++ b/template/centos/centos510-net.json @@ -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": [ - " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks-net.cfg" + " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks510-net.cfg" ], "shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h now", "disk_size": 10140, @@ -26,9 +27,10 @@ "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", @@ -36,7 +38,7 @@ "ssh_password": "vagrant", "ssh_wait_timeout": "10000s", "boot_command": [ - " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks-net.cfg" + " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks510-net.cfg" ], "shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h now", "disk_size": 10140, diff --git a/template/centos/centos59-net.json b/template/centos/centos59-net.json new file mode 100644 index 0000000..d539b49 --- /dev/null +++ b/template/centos/centos59-net.json @@ -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": [ + " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks59-net.cfg" + ], + "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": [ + " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks59-net.cfg" + ], + "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" + }] +} diff --git a/template/centos/centos64-net.json b/template/centos/centos64-net.json new file mode 100644 index 0000000..803ca21 --- /dev/null +++ b/template/centos/centos64-net.json @@ -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": [ + " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks510-net.cfg" + ], + "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": [ + " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks510-net.cfg" + ], + "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" + }] +} diff --git a/template/centos/http/ks510-net.cfg b/template/centos/http/ks510-net.cfg new file mode 100644 index 0000000..04b1173 --- /dev/null +++ b/template/centos/http/ks510-net.cfg @@ -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://: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 diff --git a/template/centos/http/ks-net.cfg b/template/centos/http/ks59-net.cfg similarity index 93% rename from template/centos/http/ks-net.cfg rename to template/centos/http/ks59-net.cfg index 1fc70d6..99d7d6a 100644 --- a/template/centos/http/ks-net.cfg +++ b/template/centos/http/ks59-net.cfg @@ -15,8 +15,8 @@ # > linux text ks=http://: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 diff --git a/template/centos/http/ks64-net.cfg b/template/centos/http/ks64-net.cfg new file mode 100644 index 0000000..57aa2b9 --- /dev/null +++ b/template/centos/http/ks64-net.cfg @@ -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://: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