From 4eb18f6608d7357af0235ac4eeece6cb310494de Mon Sep 17 00:00:00 2001 From: Nikolay Sturm Date: Tue, 23 Aug 2011 15:03:00 +0200 Subject: [PATCH] update ubuntu lts templates to version 10.04.3 --- .../ubuntu-10.04.2-server-amd64/definition.rb | 57 ------------ .../postinstall.sh | 90 ------------------- .../ubuntu-10.04.2-server-amd64/preseed.cfg | 87 ------------------ .../definition.rb | 8 +- .../postinstall.sh | 0 .../preseed.cfg | 0 .../definition.rb | 8 +- .../postinstall.sh | 0 .../preseed.cfg | 0 9 files changed, 8 insertions(+), 242 deletions(-) delete mode 100644 templates/ubuntu-10.04.2-server-amd64/definition.rb delete mode 100644 templates/ubuntu-10.04.2-server-amd64/postinstall.sh delete mode 100644 templates/ubuntu-10.04.2-server-amd64/preseed.cfg rename templates/{ubuntu-10.04.2-server-amd64-alt => ubuntu-10.04.3-server-amd64-alt}/definition.rb (89%) rename templates/{ubuntu-10.04.2-server-amd64-alt => ubuntu-10.04.3-server-amd64-alt}/postinstall.sh (100%) rename templates/{ubuntu-10.04.2-server-amd64-alt => ubuntu-10.04.3-server-amd64-alt}/preseed.cfg (100%) rename templates/{ubuntu-10.04.2-server-i386 => ubuntu-10.04.3-server-i386}/definition.rb (83%) rename templates/{ubuntu-10.04.2-server-i386 => ubuntu-10.04.3-server-i386}/postinstall.sh (100%) rename templates/{ubuntu-10.04.2-server-i386 => ubuntu-10.04.3-server-i386}/preseed.cfg (100%) diff --git a/templates/ubuntu-10.04.2-server-amd64/definition.rb b/templates/ubuntu-10.04.2-server-amd64/definition.rb deleted file mode 100644 index db6ce029..00000000 --- a/templates/ubuntu-10.04.2-server-amd64/definition.rb +++ /dev/null @@ -1,57 +0,0 @@ -require 'digest/md5' -CURRENT_DIR = File.dirname(__FILE__) -PRESEED_MD5 = "#{Digest::MD5.file("#{CURRENT_DIR}/preseed.cfg").hexdigest}" -#ISO_MD5 = "#{Digest::MD5.file("#{CURRENT_DIR}/../../iso/ubuntu-10.04.2-server-amd64.iso").hexdigest}" - -Veewee::Session.declare( { - :boot_cmd_sequence => [ - "", - "/install/vmlinuz ", - "noapic ", - "auto-install/enable", - "console-setup/ask_detect=false ", - "console-setup/modelcode=pc105 ", - "console-setup/layoutcode=us ", - "debconf/priority=critical ", - "debconf/frontend=noninteractive ", - "debian-installer=en_US ", - "debian-installer/locale=en_US ", - "debian-installer/framebuffer=false ", - "initrd=/install/initrd.gz ", - "kbd-chooser/method=us ", - "netcfg/get_hostname=%NAME% ", - "netcfg/dhcp_timeout=60 ", - "netcfg/choose_interface=auto ", - "preseed/interactive=false ", - "preseed/url=http://%IP%:%PORT%/preseed.cfg ", - "preseed/url/checksum=#{PRESEED_MD5} ", - "DEBCONF_DEBUG=5 ", - "-- " - ], - :boot_wait => "10", - :cpu_count => '1', - :disk_size => '10140', - :disk_format => 'VMDK', - :hostiocache => 'on', - :iso_download_timeout => "60", - :iso_file => "ubuntu-10.04.2-server-amd64.iso", - :iso_src => "http://releases.ubuntu.com/10.04.2/ubuntu-10.04.2-server-amd64.iso", - :iso_md5 => "b446b36430a29f3dcf0c5eb797197cac", - :kickstart_file => "preseed.cfg", - :kickstart_port => "7122", - :kickstart_timeout => "60", - :memory_size => '384', - :os_type_id => 'Ubuntu_64', - :postinstall_files => [ "postinstall.sh" ], - :postinstall_timeout => "10000", - :ssh_login_timeout => "60", - :ssh_user => "vagrant", - :ssh_password => "vagrant", - :ssh_key => "", - :ssh_host_port => "7222", - :ssh_guest_port => "22", - :sudo_cmd => "echo '%p'|sudo -S sh '%f'", - :shutdown_cmd => "shutdown -h now", - :use_hw_virt_ext => 'off', - :use_pae => 'on' -}) diff --git a/templates/ubuntu-10.04.2-server-amd64/postinstall.sh b/templates/ubuntu-10.04.2-server-amd64/postinstall.sh deleted file mode 100644 index 6a0cd93b..00000000 --- a/templates/ubuntu-10.04.2-server-amd64/postinstall.sh +++ /dev/null @@ -1,90 +0,0 @@ -# postinstall.sh created from Mitchell's official lucid32/64 baseboxes - -date > /etc/vagrant_box_build_time - -# Apt-install various things necessary for Ruby, guest additions, -# etc., and remove optional things to trim down the machine. -apt-get -y update -apt-get -y upgrade -apt-get -y install linux-headers-$(uname -r) build-essential -apt-get -y install zlib1g-dev libssl-dev libreadline5-dev -apt-get clean - -# Setup sudo to allow no-password sudo for "admin" -cp /etc/sudoers /etc/sudoers.orig -sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers -sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers - -# Install NFS client -apt-get -y install nfs-common - -# Install Ruby from source in /opt so that users of Vagrant -# can install their own Rubies using packages or however. -# We must install the 1.8.x series since Puppet doesn't support -# Ruby 1.9 yet. -wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p334.tar.gz -tar xvzf ruby-1.8.7-p334.tar.gz -cd ruby-1.8.7-p334 -./configure --prefix=/opt/ruby -make -make install -cd .. -rm -rf ruby-1.8.7-p334* - -# Install RubyGems 1.7.2 -wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz -tar xzf rubygems-1.7.2.tgz -cd rubygems-1.7.2 -/opt/ruby/bin/ruby setup.rb -cd .. -rm -rf rubygems-1.7.2* - -# Installing chef & Puppet -/opt/ruby/bin/gem install chef --no-ri --no-rdoc -/opt/ruby/bin/gem install puppet --no-ri --no-rdoc - -# Add /opt/ruby/bin to the global path as the last resort so -# Ruby, RubyGems, and Chef/Puppet are visible -echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh - -# Installing vagrant keys -mkdir /home/vagrant/.ssh -chmod 700 /home/vagrant/.ssh -cd /home/vagrant/.ssh -wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys -chmod 600 /home/vagrant/.ssh/authorized_keys -chown -R vagrant /home/vagrant/.ssh - -# Installing the virtualbox guest additions -VBOX_VERSION=$(cat /home/vagrant/.vbox_version) -cd /tmp -wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso -mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt -sh /mnt/VBoxLinuxAdditions.run -umount /mnt - -rm VBoxGuestAdditions_$VBOX_VERSION.iso - -# Remove items used for building, since they aren't needed anymore -apt-get -y remove linux-headers-$(uname -r) build-essential -apt-get -y autoremove - -# Zero out the free space to save space in the final image: -dd if=/dev/zero of=/EMPTY bs=1M -rm -f /EMPTY - -# Removing leftover leases and persistent rules -echo "cleaning up dhcp leases" -rm /var/lib/dhcp3/* - -# Make sure Udev doesn't block our network -# http://6.ptmc.org/?p=164 -echo "cleaning up udev rules" -rm /etc/udev/rules.d/70-persistent-net.rules -mkdir /etc/udev/rules.d/70-persistent-net.rules -rm -rf /dev/.udev/ -rm /lib/udev/rules.d/75-persistent-net-generator.rules - -echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" -echo "pre-up sleep 2" >> /etc/network/interfaces -exit diff --git a/templates/ubuntu-10.04.2-server-amd64/preseed.cfg b/templates/ubuntu-10.04.2-server-amd64/preseed.cfg deleted file mode 100644 index 7388ed0e..00000000 --- a/templates/ubuntu-10.04.2-server-amd64/preseed.cfg +++ /dev/null @@ -1,87 +0,0 @@ -## Options to set on the command line -d-i debian-installer/locale string en_US -d-i console-setup/ask_detect boolean false -d-i console-setup/layout string Belgium - -#d-i netcfg/get_hostname string dummy -d-i netcfg/get_hostname string unassigned-hostname -d-i netcfg/get_domain string unassigned-domain - -# Continue without a default route -# Not working , specify a dummy in the DHCP -#d-i netcfg/no_default_route boolean - -d-i time/zone string Europe/Brussels -d-i clock-setup/utc-auto boolean true -d-i clock-setup/utc boolean true - -d-i kbd-chooser/method select Belgian - -d-i netcfg/wireless_wep string - -d-i base-installer/kernel/override-image string linux-server -#d-i base-installer/kernel/override-image string linux-image-2.6.32-21-generic - -# Choices: Dialog, Readline, Gnome, Kde, Editor, Noninteractive -d-i debconf debconf/frontend select Noninteractive - -d-i pkgsel/install-language-support boolean false -tasksel tasksel/first multiselect standard, ubuntu-server - -#d-i partman-auto/method string regular -d-i partman-auto/method string lvm -#d-i partman-auto/purge_lvm_from_device boolean true - -d-i partman-lvm/confirm boolean true -d-i partman-lvm/device_remove_lvm boolean true -d-i partman-auto/choose_recipe select atomic - -d-i partman/confirm_write_new_label boolean true -d-i partman/confirm_nooverwrite boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true - -#http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=9626883 -#Message: "write the changes to disk and configure lvm preseed" -#http://serverfault.com/questions/189328/ubuntu-kickstart-installation-using-lvm-waits-for-input -#preseed partman-lvm/confirm_nooverwrite boolean true - -# Write the changes to disks and configure LVM? -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true -d-i partman-auto-lvm/guided_size string max - -## Default user, we can get away with a recipe to change this -d-i passwd/user-fullname string vagrant -d-i passwd/username string vagrant -d-i passwd/user-password password vagrant -d-i passwd/user-password-again password vagrant -d-i user-setup/encrypt-home boolean false -d-i user-setup/allow-password-weak boolean true - -## minimum is puppet and ssh and ntp -# Individual additional packages to install -d-i pkgsel/include string openssh-server ntp acpid - -# Whether to upgrade packages after debootstrap. -# Allowed values: none, safe-upgrade, full-upgrade -d-i pkgsel/upgrade select full-upgrade - -d-i grub-installer/only_debian boolean true -d-i grub-installer/with_other_os boolean true -d-i finish-install/reboot_in_progress note - -#For the update -d-i pkgsel/update-policy select none - -# debconf-get-selections --install -#Use mirror -#d-i apt-setup/use_mirror boolean true -#d-i mirror/country string manual -#choose-mirror-bin mirror/protocol string http -#choose-mirror-bin mirror/http/hostname string 192.168.4.150 -#choose-mirror-bin mirror/http/directory string /ubuntu -#choose-mirror-bin mirror/suite select maverick -#d-i debian-installer/allow_unauthenticated string true - -choose-mirror-bin mirror/http/proxy string diff --git a/templates/ubuntu-10.04.2-server-amd64-alt/definition.rb b/templates/ubuntu-10.04.3-server-amd64-alt/definition.rb similarity index 89% rename from templates/ubuntu-10.04.2-server-amd64-alt/definition.rb rename to templates/ubuntu-10.04.3-server-amd64-alt/definition.rb index c36a2ae5..b7fb20cf 100644 --- a/templates/ubuntu-10.04.2-server-amd64-alt/definition.rb +++ b/templates/ubuntu-10.04.3-server-amd64-alt/definition.rb @@ -1,7 +1,7 @@ require 'digest/md5' CURRENT_DIR = File.dirname(__FILE__) PRESEED_MD5 = "#{Digest::MD5.file("#{CURRENT_DIR}/preseed.cfg").hexdigest}" -#ISO_MD5 = "#{Digest::MD5.file("#{CURRENT_DIR}/../../iso/ubuntu-10.04.2-alternate-amd64.iso").hexdigest}" +#ISO_MD5 = "#{Digest::MD5.file("#{CURRENT_DIR}/../../iso/ubuntu-10.04.3-alternate-amd64.iso").hexdigest}" Veewee::Session.declare( { :boot_cmd_sequence => [ @@ -34,9 +34,9 @@ :disk_format => 'VMDK', :hostiocache => 'on', :iso_download_timeout => "60", - :iso_file => "ubuntu-10.04.2-alternate-amd64.iso", - :iso_src => "http://releases.ubuntu.com/10.04.2/ubuntu-10.04.2-alternate-amd64.iso", - :iso_md5 => "21929bb7caebcc600d92adb3e95a1229", + :iso_file => "ubuntu-10.04.3-alternate-amd64.iso", + :iso_src => "http://releases.ubuntu.com/10.04.3/ubuntu-10.04.3-alternate-amd64.iso", + :iso_md5 => "e38e5cf4cc02c9a3fa4ecd88832d120c", :kickstart_file => "preseed.cfg", :kickstart_port => "7122", :kickstart_timeout => "60", diff --git a/templates/ubuntu-10.04.2-server-amd64-alt/postinstall.sh b/templates/ubuntu-10.04.3-server-amd64-alt/postinstall.sh similarity index 100% rename from templates/ubuntu-10.04.2-server-amd64-alt/postinstall.sh rename to templates/ubuntu-10.04.3-server-amd64-alt/postinstall.sh diff --git a/templates/ubuntu-10.04.2-server-amd64-alt/preseed.cfg b/templates/ubuntu-10.04.3-server-amd64-alt/preseed.cfg similarity index 100% rename from templates/ubuntu-10.04.2-server-amd64-alt/preseed.cfg rename to templates/ubuntu-10.04.3-server-amd64-alt/preseed.cfg diff --git a/templates/ubuntu-10.04.2-server-i386/definition.rb b/templates/ubuntu-10.04.3-server-i386/definition.rb similarity index 83% rename from templates/ubuntu-10.04.2-server-i386/definition.rb rename to templates/ubuntu-10.04.3-server-i386/definition.rb index 36d91f55..72ace07a 100644 --- a/templates/ubuntu-10.04.2-server-i386/definition.rb +++ b/templates/ubuntu-10.04.3-server-i386/definition.rb @@ -1,10 +1,10 @@ Veewee::Session.declare({ - :cpu_count => '1', :memory_size=> '384', + :cpu_count => '1', :memory_size=> '384', :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :os_type_id => 'Ubuntu', - :iso_file => "ubuntu-10.04.2-server-i386.iso", - :iso_src => "http://releases.ubuntu.com/10.04.2/ubuntu-10.04.2-server-i386.iso", - :iso_md5 => "9807160b8935289096df8160832e358e", + :iso_file => "ubuntu-10.04.3-server-i386.iso", + :iso_src => "http://releases.ubuntu.com/10.04.3/ubuntu-10.04.3-server-i386.iso", + :iso_md5 => "388104f6225ae676ceab0ba4bd7b5784", :iso_download_timeout => "1000", :boot_wait => "10", :boot_cmd_sequence => [ '', diff --git a/templates/ubuntu-10.04.2-server-i386/postinstall.sh b/templates/ubuntu-10.04.3-server-i386/postinstall.sh similarity index 100% rename from templates/ubuntu-10.04.2-server-i386/postinstall.sh rename to templates/ubuntu-10.04.3-server-i386/postinstall.sh diff --git a/templates/ubuntu-10.04.2-server-i386/preseed.cfg b/templates/ubuntu-10.04.3-server-i386/preseed.cfg similarity index 100% rename from templates/ubuntu-10.04.2-server-i386/preseed.cfg rename to templates/ubuntu-10.04.3-server-i386/preseed.cfg