/$URL
Created
January 14, 2011 17:58
preseed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
set -e | |
if grep -qs nochef /proc/cmdline; then | |
exit 0 | |
fi | |
apt-get install -y python-software-properties | |
add-apt-repository ppa:varnish-software/sysadmin | |
apt-get update | |
mkdir -p /etc/chef | |
apt-get install -y chef | |
/etc/init.d/chef-client stop | |
cat > /etc/chef/validation.pem <<EOF | |
-----BEGIN RSA PRIVATE KEY----- | |
... | |
-----END RSA PRIVATE KEY----- | |
EOF | |
cat > /var/tmp/chef.json <<EOF | |
{ | |
"run_list": [ "role[base]", "recipe[pkgsync]" ] | |
} | |
EOF | |
chef-client -j /var/tmp/chef.json -l debug | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d-i netcfg/disable_dhcp boolean true | |
# Disable PCMCIA support. | |
d-i hw-detect/start_pcmcia false | |
# Use default kernel, perfectly suitable for KVM guests. | |
bootstrap-base base-installer/kernel/image select linux-image-2.6 | |
# Locale settings. | |
clock-setup clock-setup/utc boolean true | |
d-i debian-installer/language en | |
d-i debian-installer/locale select en_DK.UTF8 | |
d-i console-setup/ask_detect boolean false | |
d-i console-setup/variant select Norway | |
d-i console-setup/layoutcode string no | |
d-i time/zone string Europe/Oslo | |
# Mirror settings for apt and debian-installer. | |
d-i mirror/codename string lucid | |
d-i mirror/country string enter information manually | |
d-i mirror/ftp/proxy string | |
d-i mirror/http/directory string /ubuntu | |
d-i mirror/http/hostname string no.archive.ubuntu.com | |
d-i mirror/http/proxy string | |
d-i mirror/protocol select http | |
# Disk partitioning. | |
d-i partman-auto/method string regular | |
d-i partman-auto/choose_recipe select atomic | |
# If one of the disks that are going to be automatically partitioned | |
# contains an old LVM configuration, the user will normally receive a | |
# warning. This can be preseeded away... | |
d-i partman-lvm/device_remove_lvm boolean true | |
# The same applies to pre-existing software RAID array: | |
d-i partman-md/device_remove_md boolean true | |
# And the same goes for the confirmation to write the lvm partitions. | |
d-i partman-lvm/confirm boolean true | |
# This makes partman automatically partition without confirmation, provided | |
# that you told it what to do using one of the methods above. | |
d-i partman/confirm_write_new_label boolean true | |
d-i partman/choose_partition select finish | |
d-i partman/confirm boolean true | |
d-i partman/confirm_nooverwrite boolean true | |
# We just want a bare boned system. | |
d-i tasksel/first multiselect none | |
d-i pkgsel/include string openssh-server curl | |
d-i pkgsel/install-language-support boolean false | |
d-i pkgsel/language-pack-patterns string | |
d-i pkgsel/language-packs multiselect none | |
tasksel tasksel/skip-tasks string standard | |
# Policy for applying updates. May be "none" (no automatic updates), | |
# "unattended-upgrades" (install security updates automatically), or | |
# "landscape" (manage system with Landscape). | |
d-i pkgsel/update-policy select none | |
# Enable popularity contest. | |
d-i popularity-contest/participate boolean true | |
# User settings. | |
user-setup-udeb passwd/shadow boolean true | |
# We want to lock the root account and remove the password later on (in the | |
# late_command), but don't want to setup any user accounts for now. Setting | |
# both "passwd/root-login" and "passwd/make-user" to false doesn't work, | |
# because the installer thinks that's an idiotic thing to do and we'll still be | |
# prompted to create a user account. So instead we set the hashed password for | |
# root to something invalid. We can't use ! because the user-setup-udb checks | |
# for that, and it will prompt for a different password. | |
d-i passwd/make-user boolean false | |
d-i passwd/root-login boolean true | |
d-i passwd/root-password-crypted password XXXXX | |
# GRUB settings. | |
grub-installer grub-installer/only_debian boolean true | |
grub-installer grub-installer/with_other_os boolean true | |
# Run post-installation script and finish installation. | |
finish-install finish-install/reboot_in_progress note | |
# This is how to make the installer not shutdown when finished, but to | |
# reboot into the installed system. | |
d-i debian-installer/exit/always_halt boolean false | |
d-i preseed/late_command string in-target sh -c 'curl $URL | sh' | |
chef chef/chef_server_url string https://chef.varnish-software.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment