Skip to content

Commit

Permalink
Skeleton out vivid vervet, FC21
Browse files Browse the repository at this point in the history
  • Loading branch information
cammoraton committed Apr 16, 2015
1 parent e491550 commit 0ef8d4e
Show file tree
Hide file tree
Showing 8 changed files with 356 additions and 9 deletions.
2 changes: 1 addition & 1 deletion debian.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"boot_command": [
"<esc><wait>",
"install <wait>",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed`}} <wait>",
"preseed/url=http://129.10.117.124:{{ .HTTPPort }}/{{user `preseed`}} <wait>",
"debian-installer=en_US <wait>",
"auto <wait>",
"locale=en_US <wait>",
Expand Down
9 changes: 5 additions & 4 deletions fedora-20.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"variables": {
"version": "1.0.0",
"iso_url": "http://mirror.seas.harvard.edu/fedora/linux/releases/20/Fedora/x86_64/iso/Fedora-20-x86_64-netinst.iso",
"iso_checksum": "376be7d4855ad6281cb139430606a782fd6189dcb01d7b61448e915802cc350f",
"iso_checksum_type": "sha256",
Expand All @@ -12,7 +13,7 @@
"ssh_password": "vagrant",
"hostname": "fedora-20",
"configuration": "minimal",
"kickstart": "fedora.ks"
"kickstart": "fedora-20.ks"
},
"builders": [
{
Expand Down Expand Up @@ -46,7 +47,7 @@
"disk_size" : "{{user `disk`}}",
"http_directory": "www",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `kickstart`}}<enter><wait>"
"<tab> text ks=http://129.10.117.124:{{ .HTTPPort }}/{{user `kickstart`}}<enter><wait>"
],
"boot_wait": "10s",
"ssh_username": "{{user `ssh_username`}}",
Expand Down Expand Up @@ -112,10 +113,10 @@
"type": "vagrant",
"override": {
"virtualbox": {
"output": "pug-{{user `hostname`}}-{{user `arch`}}-virtualbox.box"
"output": "pug-{{user `hostname`}}-{{user `arch`}}-{{user `version`}}-virtualbox.box"
},
"vmware": {
"output": "pug-{{user `hostname`}}-{{user `arch`}}-vmware.box"
"output": "pug-{{user `hostname`}}-{{user `arch`}}-{{user `version`}}-vmware.box"
}
}
}
Expand Down
124 changes: 124 additions & 0 deletions fedora-21.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"variables": {
"version": "1.0.0",
"iso_url": "http://mirror.seas.harvard.edu/fedora/linux/releases/21/Server/x86_64/iso/Fedora-Server-netinst-x86_64-21.iso",
"iso_checksum": "56af126a50c227d779a200b414f68ea7bcf58e21c8035500cd21ba164f85b9b4",
"iso_checksum_type": "sha256",
"vbox_guest_os": "RedHat_64",
"arch": "x64",
"memory": "512",
"cpus": "1",
"disk": "10240",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"hostname": "fedora-21",
"configuration": "minimal",
"kickstart": "fedora-21.ks"
},
"builders": [
{
"type": "virtualbox-iso",
"guest_os_type": "{{user `vbox_guest_os`}}",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"disk_size" : "{{user `disk`}}",
"http_directory": "www",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `kickstart`}}<enter><wait>"
],
"boot_wait": "10s",
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo '{{user `ssh_password`}}'|sudo -S sh '/tmp/shutdown.sh'",
"vboxmanage": [
[ "modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}" ],
[ "modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}" ]
]
},
{
"type": "vmware-iso",
"guest_os_type": "linux",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"disk_size" : "{{user `disk`}}",
"http_directory": "www",
"boot_command": [
"<tab> text ks=http://129.10.117.124:{{ .HTTPPort }}/{{user `kickstart`}}<enter><wait>"
],
"boot_wait": "10s",
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"tools_upload_flavor": "linux",
"tools_upload_path": "/tmp/{{.Flavor}}.iso",
"shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo '{{user `ssh_password`}}'|sudo -S sh '/tmp/shutdown.sh'",
"vmx_data": {
"memsize": "{{user `memory`}}",
"numvcpus": "{{user `cpus`}}",
"cpuid.coresPerSocket": "1"
}
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "echo '{{user `ssh_password`}}'|sudo -S sh '{{.Path}}'",
"scripts": [
"scripts/enterprise/base.sh",
"scripts/vagrant-key.sh",
"scripts/enterprise/repos.sh",
"scripts/enterprise/el7.sh"
]
},
{
"type": "shell",
"execute_command": "echo '{{user `ssh_password`}}'|sudo -S sh '{{.Path}}'",
"only": ["virtualbox-iso"],
"scripts": [
"scripts/enterprise/virtualbox.sh"
]
},
{
"type": "shell",
"execute_command": "echo '{{user `ssh_password`}}'|sudo -S sh '{{.Path}}'",
"only": ["vmware-iso"],
"scripts": [
"scripts/enterprise/vmware-el7.sh",
"scripts/enterprise/vmnetwork.sh"
]
},

{
"type": "puppet-masterless",
"manifest_file": "puppet/manifests/{{user `configuration`}}.pp",
"module_paths": [
"puppet/modules/"
]
},
{
"type": "shell",
"execute_command": "echo '{{user `ssh_password`}}'|sudo -S sh '{{.Path}}'",
"scripts": [
"scripts/cleanup.sh"
]
}
],
"post-processors": [
{
"type": "vagrant",
"override": {
"virtualbox": {
"output": "pug-{{user `hostname`}}-{{user `arch`}}-{{user `version`}}-virtualbox.box"
},
"vmware": {
"output": "pug-{{user `hostname`}}-{{user `arch`}}-{{user `version`}}-vmware.box"
}
}
}
]
}
7 changes: 7 additions & 0 deletions scripts/debian/packages-vivid.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Install puppetlabs upstream repo
# curl -o /tmp/puppetlabs-release-vivid.deb https://apt.puppetlabs.com/puppetlabs-release-vivid.deb
# dpkg -i /tmp/puppetlabs-release-vivid.deb
# apt-get update -y

# Install puppet
apt-get install puppet -y
4 changes: 2 additions & 2 deletions trusty.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"variables": {
"iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-amd64.iso",
"iso_checksum": "ca2531b8cd79ea5b778ede3a524779b9",
"iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
"iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
"iso_checksum_type": "md5",
"vbox_guest_os": "Ubuntu_64",
"arch": "x64",
Expand Down
166 changes: 166 additions & 0 deletions vivid.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
{
"variables": {
"iso_url": "http://releases.ubuntu.com/15.04/ubuntu-15.04-beta2-server-amd64.iso",
"iso_checksum": "7027ac66cbc2413c40ea643a284a2b1b",
"iso_checksum_type": "md5",
"vbox_guest_os": "Ubuntu_64",
"arch": "x64",
"memory": "512",
"cpus": "1",
"disk": "10240",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"hostname": "vivid-minimal",
"configuration": "minimal",
"preseed": "preseed.cfg"
},
"builders": [
{
"type": "virtualbox-iso",
"guest_os_type": "{{user `vbox_guest_os`}}",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"disk_size" : "{{user `disk`}}",
"http_directory": "www",
"boot_command": [
"<esc><wait>",
"<esc><wait>",
"<enter><wait>",
"/install/vmlinuz <wait>",
"auto <wait>",
"console-setup/ask_detect=false <wait>",
"console-setup/layoutcode=us <wait>",
"console-setup/modelcode=pc105 <wait>",
"debconf/frontend=noninteractive <wait>",
"debian-installer=en_US <wait>",
"fb=false <wait>",
"initrd=/install/initrd.gz <wait>",
"kbd-chooser/method=us <wait>",
"keyboard-configuration/layout=USA <wait>",
"keyboard-configuration/variant=USA <wait>",
"locale=en_US <wait>",
"netcfg/get_hostname={{user `hostname`}} <wait>",
"netcfg/get_domain=example.com <wait>",
"noapic <wait>",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed`}} <wait>",
"-- <wait>",
"<enter><wait>"
],
"boot_wait": "10s",
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo '{{user `ssh_password`}}'|sudo -S sh '/tmp/shutdown.sh'",
"vboxmanage": [
[ "modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}" ],
[ "modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}" ]
]
},
{
"type": "vmware-iso",
"guest_os_type": "linux",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"disk_size" : "{{user `disk`}}",
"http_directory": "www",
"boot_command": [
"<esc><wait>",
"<esc><wait>",
"<enter><wait>",
"/install/vmlinuz <wait>",
"auto <wait>",
"console-setup/ask_detect=false <wait>",
"console-setup/layoutcode=us <wait>",
"console-setup/modelcode=pc105 <wait>",
"debconf/frontend=noninteractive <wait>",
"debian-installer=en_US <wait>",
"fb=false <wait>",
"initrd=/install/initrd.gz <wait>",
"kbd-chooser/method=us <wait>",
"keyboard-configuration/layout=USA <wait>",
"keyboard-configuration/variant=USA <wait>",
"locale=en_US <wait>",
"netcfg/get_hostname={{user `hostname`}} <wait>",
"netcfg/get_domain=example.com <wait>",
"noapic <wait>",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed`}} <wait>",
"-- <wait>",
"<enter><wait>"
],
"boot_wait": "10s",
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo '{{user `ssh_password`}}'|sudo -S sh '/tmp/shutdown.sh'",

"tools_upload_flavor": "linux",
"tools_upload_path": "/tmp/{{.Flavor}}.iso",
"shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo '{{user `ssh_password`}}'|sudo -S sh '/tmp/shutdown.sh'",
"vmx_data": {
"memsize": "{{user `memory`}}",
"numvcpus": "{{user `cpus`}}",
"cpuid.coresPerSocket": "1"
}
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "echo '{{user `ssh_password`}}'|sudo -S sh '{{.Path}}'",
"scripts": [
"scripts/debian/base.sh",
"scripts/debian/packages-vivid.sh",
"scripts/vagrant-key.sh",
"scripts/udev-cleanup.sh",
"scripts/debian/apt.sh"
]
},
{
"type": "shell",
"execute_command": "echo '{{user `ssh_password`}}'|sudo -S sh '{{.Path}}'",
"only": ["virtualbox-iso"],
"scripts": [
"scripts/debian/virtualbox.sh"
]
},
{
"type": "shell",
"execute_command": "echo '{{user `ssh_password`}}'|sudo -S sh '{{.Path}}'",
"only": ["vmware-iso"],
"scripts": [
"scripts/debian/vmware.sh"
]
},
{
"type": "puppet-masterless",
"manifest_file": "puppet/manifests/{{user `configuration`}}.pp",
"module_paths": [
"puppet/modules/"
]
},
{
"type": "shell",
"execute_command": "echo '{{user `ssh_password`}}'|sudo -S sh '{{.Path}}'",
"scripts": [
"scripts/cleanup.sh"
]
}
],
"post-processors": [
{
"type": "vagrant",
"override": {
"virtualbox": {
"output": "pug-{{user `hostname`}}-{{user `arch`}}-virtualbox.box"
},
"vmware": {
"output": "pug-{{user `hostname`}}-{{user `arch`}}-vmware.box"
}
}
}
]
}
8 changes: 6 additions & 2 deletions www/fedora.ks → www/fedora-20.ks
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ skipx
text
install
eula --agreed
url --url=http://mirror.seas.harvard.edu/fedora/linux/releases/20/Everything/x86_64/os/

url --url=http://mirror.seas.harvard.edu/fedora/linux/releases/20/Fedora/x86_64/os/

timezone America/New_York --isUtc
lang en_US.UTF-8
keyboard --vckeymap=us --xlayouts='us'
Expand All @@ -18,9 +20,10 @@ selinux --permissive

zerombr
clearpart --all --initlabel --drives=sda
bootloader --location=mbr --boot-drive=sda --append="norhgb biosdevname=0"
bootloader --location=mbr --boot-drive=sda
autopart --type=lvm

repo --name="everything" --baseurl="http://mirror.seas.harvard.edu/fedora/linux/releases/20/Everything/x86_64/os/"
repo --name="updates" --baseurl="http://mirror.seas.harvard.edu/fedora/linux/updates/20/x86_64/"
repo --name="puppet-deps" --baseurl="http://yum.puppetlabs.com/fedora/f20/dependencies/x86_64/"
repo --name="puppet" --baseurl="http://yum.puppetlabs.com/fedora/f20/products/x86_64/"
Expand All @@ -38,4 +41,5 @@ puppetlabs-release
%post
# Add vagrant user to sudoers
echo "vagrant ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/vagrant
reboot
%end
Loading

0 comments on commit 0ef8d4e

Please sign in to comment.