veewee 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/Gemfile +4 -0
  2. data/README.md +1 -1
  3. data/doc/definition.md +18 -0
  4. data/doc/kvm.md +28 -1
  5. data/doc/template.md +53 -2
  6. data/lib/veewee/command/fusion.rb +37 -3
  7. data/lib/veewee/command/vagrant/basebox.rb +2 -0
  8. data/lib/veewee/command/vagrant/winrm.rb +39 -0
  9. data/lib/veewee/command/vbox.rb +18 -0
  10. data/lib/veewee/definition.rb +13 -3
  11. data/lib/veewee/error.rb +3 -0
  12. data/lib/veewee/provider/core/box.rb +7 -0
  13. data/lib/veewee/provider/core/box/build.rb +34 -14
  14. data/lib/veewee/provider/core/box/copy.rb +17 -0
  15. data/lib/veewee/provider/core/box/exec.rb +31 -12
  16. data/lib/veewee/provider/core/box/floppy.rb +1 -0
  17. data/lib/veewee/provider/core/box/halt.rb +7 -3
  18. data/lib/veewee/provider/core/box/validate_tags.rb +8 -2
  19. data/lib/veewee/provider/core/box/wincp.rb +120 -0
  20. data/lib/veewee/provider/core/box/winrm.rb +59 -0
  21. data/lib/veewee/provider/core/helper/comm.rb +47 -0
  22. data/lib/veewee/provider/core/helper/web.rb +20 -9
  23. data/lib/veewee/provider/core/helper/winrm.rb +167 -0
  24. data/lib/veewee/provider/kvm/box/create.rb +59 -3
  25. data/lib/veewee/provider/kvm/provider.rb +6 -6
  26. data/lib/veewee/provider/parallels/box/helper/buildinfo.rb +1 -1
  27. data/lib/veewee/provider/virtualbox/box.rb +1 -0
  28. data/lib/veewee/provider/virtualbox/box/build.rb +4 -2
  29. data/lib/veewee/provider/virtualbox/box/create.rb +32 -12
  30. data/lib/veewee/provider/virtualbox/box/helper/buildinfo.rb +6 -3
  31. data/lib/veewee/provider/virtualbox/box/helper/create.rb +20 -5
  32. data/lib/veewee/provider/virtualbox/box/helper/winrm_options.rb +31 -0
  33. data/lib/veewee/provider/virtualbox/box/up.rb +33 -12
  34. data/lib/veewee/provider/virtualbox/box/winrm.rb +13 -0
  35. data/lib/veewee/provider/vmfusion/box.rb +2 -0
  36. data/lib/veewee/provider/vmfusion/box/add_share.rb +18 -0
  37. data/lib/veewee/provider/vmfusion/box/build.rb +3 -1
  38. data/lib/veewee/provider/vmfusion/box/create.rb +7 -2
  39. data/lib/veewee/provider/vmfusion/box/helper/buildinfo.rb +9 -6
  40. data/lib/veewee/provider/vmfusion/box/helper/ip.rb +1 -1
  41. data/lib/veewee/provider/vmfusion/box/helper/winrm_options.rb +21 -0
  42. data/lib/veewee/provider/vmfusion/box/template.rb +7 -3
  43. data/lib/veewee/provider/vmfusion/box/template.vmx.erb +6 -0
  44. data/lib/veewee/provider/vmfusion/box/winrm.rb +12 -0
  45. data/lib/veewee/provider/vmfusion/provider.rb +7 -1
  46. data/lib/veewee/version.rb +1 -1
  47. data/templates/CentOS-5.6-x86_64-netboot-packages/definition.rb +16 -0
  48. data/templates/CentOS-5.6-x86_64-netboot-packages/ks.cfg +47 -0
  49. data/templates/CentOS-5.6-x86_64-netboot-packages/postinstall.sh +61 -0
  50. data/templates/Debian-7.0-b3-amd64-netboot/base.sh +27 -0
  51. data/templates/Debian-7.0-b3-amd64-netboot/chef.sh +2 -0
  52. data/templates/Debian-7.0-b3-amd64-netboot/cleanup-virtualbox.sh +4 -0
  53. data/templates/Debian-7.0-b3-amd64-netboot/cleanup.sh +17 -0
  54. data/templates/Debian-7.0-b3-amd64-netboot/definition.rb +51 -0
  55. data/templates/Debian-7.0-b3-amd64-netboot/preseed.cfg +313 -0
  56. data/templates/Debian-7.0-b3-amd64-netboot/puppet.sh +2 -0
  57. data/templates/Debian-7.0-b3-amd64-netboot/ruby.sh +10 -0
  58. data/templates/Debian-7.0-b3-amd64-netboot/vagrant.sh +25 -0
  59. data/templates/Debian-7.0-b3-amd64-netboot/virtualbox.sh +13 -0
  60. data/templates/Debian-7.0-b3-amd64-netboot/zerodisk.sh +3 -0
  61. data/templates/Fedora-18-i386/definition.rb +17 -0
  62. data/templates/Fedora-18-i386/ks.cfg +75 -0
  63. data/templates/Fedora-18-i386/postinstall.sh +38 -0
  64. data/templates/Fedora-18-x86_64/definition.rb +17 -0
  65. data/templates/Fedora-18-x86_64/ks.cfg +75 -0
  66. data/templates/Fedora-18-x86_64/postinstall.sh +38 -0
  67. data/templates/OracleLinux-6.3-x86_64-DVD/base.sh +30 -0
  68. data/templates/OracleLinux-6.3-x86_64-DVD/chef.sh +3 -0
  69. data/templates/OracleLinux-6.3-x86_64-DVD/cleanup.sh +5 -0
  70. data/templates/OracleLinux-6.3-x86_64-DVD/definition.rb +40 -0
  71. data/templates/OracleLinux-6.3-x86_64-DVD/ks.cfg +42 -0
  72. data/templates/OracleLinux-6.3-x86_64-DVD/puppet.sh +12 -0
  73. data/templates/OracleLinux-6.3-x86_64-DVD/ruby.sh +3 -0
  74. data/templates/OracleLinux-6.3-x86_64-DVD/vagrant.sh +18 -0
  75. data/templates/OracleLinux-6.3-x86_64-DVD/virtualbox.sh +8 -0
  76. data/templates/OracleLinux-6.3-x86_64-DVD/zerodisk.sh +3 -0
  77. data/templates/funtoo-latest-x86_64/definition.rb +37 -0
  78. data/templates/funtoo-latest-x86_64/postinstall.sh +401 -0
  79. data/templates/openbsd50_amd64/definition.rb +3 -2
  80. data/templates/openbsd50_amd64/postinstall.sh +4 -4
  81. data/templates/openbsd50_i386/definition.rb +4 -4
  82. data/templates/openbsd52_amd64/README +28 -0
  83. data/templates/openbsd52_amd64/definition.rb +85 -0
  84. data/templates/openbsd52_amd64/postinstall.sh +81 -0
  85. data/templates/openbsd52_i386/README +28 -0
  86. data/templates/openbsd52_i386/definition.rb +85 -0
  87. data/templates/openbsd52_i386/postinstall.sh +81 -0
  88. data/templates/windows-2008R1-serverstandard-amd64/Autounattend.xml +6 -6
  89. data/templates/windows-2008R1-serverweb-amd64/install-winrm.bat +1 -1
  90. data/templates/windows-2008R2-serverstandard-amd64-winrm/Autounattend.xml +224 -0
  91. data/templates/windows-2008R2-serverstandard-amd64-winrm/README.md +87 -0
  92. data/templates/windows-2008R2-serverstandard-amd64-winrm/definition.rb +33 -0
  93. data/templates/windows-2008R2-serverstandard-amd64-winrm/install-chef.bat +2 -0
  94. data/templates/windows-2008R2-serverstandard-amd64-winrm/install-vbox.bat +4 -0
  95. data/templates/windows-2008R2-serverstandard-amd64-winrm/oracle-cert.cer +0 -0
  96. data/templates/windows-2008R2-serverstandard-amd64-winrm/postinstall.sh +74 -0
  97. data/templates/windows-7-enterprise-amd64-winrm/Autounattend.xml +227 -0
  98. data/templates/windows-7-enterprise-amd64-winrm/README.md +52 -0
  99. data/templates/windows-7-enterprise-amd64-winrm/definition.rb +27 -0
  100. data/templates/windows-7-enterprise-amd64-winrm/install-chef.bat +2 -0
  101. data/templates/windows-7-enterprise-amd64-winrm/install-fusion.bat +18 -0
  102. data/templates/windows-7-enterprise-amd64-winrm/install-puppet.bat +4 -0
  103. data/templates/windows-7-enterprise-amd64-winrm/install-vbox.bat +4 -0
  104. data/templates/windows-7-enterprise-amd64-winrm/oracle-cert.cer +0 -0
  105. data/templates/windows-7-enterprise-amd64-winrm/postinstall.bat +74 -0
  106. data/validation/veewee-windows.feature +34 -0
  107. data/veewee.gemspec +1 -1
  108. metadata +73 -7
@@ -0,0 +1,27 @@
1
+ # Update the box
2
+ apt-get -y update
3
+ apt-get -y install linux-headers-$(uname -r) build-essential
4
+ apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
5
+ apt-get -y install curl unzip
6
+ apt-get clean
7
+
8
+ # Set up sudo
9
+ cp /etc/sudoers /etc/sudoers.orig
10
+ sed -i -e 's/%sudo[ \t]*ALL=(ALL:ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
11
+
12
+ # Tweak sshd to prevent DNS resolution (speed up logins)
13
+ echo 'UseDNS no' >> /etc/ssh/sshd_config
14
+
15
+ # Remove 5s grub timeout to speed up booting
16
+ echo <<EOF > /etc/default/grub
17
+ # If you change this file, run 'update-grub' afterwards to update
18
+ # /boot/grub/grub.cfg.
19
+
20
+ GRUB_DEFAULT=0
21
+ GRUB_TIMEOUT=0
22
+ GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
23
+ GRUB_CMDLINE_LINUX_DEFAULT="quiet"
24
+ GRUB_CMDLINE_LINUX="debian-installer=en_US"
25
+ EOF
26
+
27
+ update-grub
@@ -0,0 +1,2 @@
1
+ # Install Chef
2
+ gem install chef --no-ri --no-rdoc
@@ -0,0 +1,4 @@
1
+ # Cleanup Virtualbox
2
+ VBOX_VERSION=$(cat .vbox_version)
3
+ VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso
4
+ rm $VBOX_ISO
@@ -0,0 +1,17 @@
1
+ # Clean up
2
+ apt-get -y remove linux-headers-$(uname -r) build-essential
3
+ apt-get -y autoremove
4
+
5
+ # Removing leftover leases and persistent rules
6
+ echo "cleaning up dhcp leases"
7
+ rm /var/lib/dhcp/*
8
+
9
+ # Make sure Udev doesn't block our network
10
+ echo "cleaning up udev rules"
11
+ rm /etc/udev/rules.d/70-persistent-net.rules
12
+ mkdir /etc/udev/rules.d/70-persistent-net.rules
13
+ rm -rf /dev/.udev/
14
+ rm /lib/udev/rules.d/75-persistent-net-generator.rules
15
+
16
+ echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
17
+ echo "pre-up sleep 2" >> /etc/network/interfaces
@@ -0,0 +1,51 @@
1
+ #Thanks to Fletcher Nichol - https://github.com/fnichol
2
+
3
+ Veewee::Definition.declare({
4
+ :cpu_count => '1',
5
+ :memory_size=> '256',
6
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
7
+ :os_type_id => 'Debian',
8
+ :iso_file => "debian-wheezy-DI-b3-amd64-netinst.iso",
9
+ :iso_src => "http://cdimage.debian.org/cdimage/wheezy_di_beta3/amd64/iso-cd/debian-wheezy-DI-b3-amd64-netinst.iso",
10
+ :iso_md5 => "e9f2479c43a623dd8b9c0bc95d8460ce",
11
+ :iso_download_timeout => "1000",
12
+ :boot_wait => "10", :boot_cmd_sequence => [
13
+ '<Esc>',
14
+ 'install ',
15
+ 'preseed/url=http://%IP%:%PORT%/preseed.cfg ',
16
+ 'debian-installer=en_US ',
17
+ 'auto ',
18
+ 'locale=en_US ',
19
+ 'kbd-chooser/method=us ',
20
+ 'netcfg/get_hostname=%NAME% ',
21
+ 'netcfg/get_domain=vagrantup.com ',
22
+ 'fb=false ',
23
+ 'debconf/frontend=noninteractive ',
24
+ 'console-setup/ask_detect=false ',
25
+ 'keyboard-configuration/xkb-keymap=us ',
26
+ '<Enter>'
27
+ ],
28
+ :kickstart_port => "7122",
29
+ :kickstart_timeout => "10000",
30
+ :kickstart_file => "preseed.cfg",
31
+ :ssh_login_timeout => "10000",
32
+ :ssh_user => "vagrant",
33
+ :ssh_password => "vagrant",
34
+ :ssh_key => "",
35
+ :ssh_host_port => "7222",
36
+ :ssh_guest_port => "22",
37
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
38
+ :shutdown_cmd => "halt -p",
39
+ :postinstall_files => [
40
+ "base.sh",
41
+ "vagrant.sh",
42
+ "virtualbox.sh",
43
+ "ruby.sh",
44
+ "puppet.sh",
45
+ "chef.sh",
46
+ "cleanup-virtualbox.sh",
47
+ "cleanup.sh",
48
+ "zerodisk.sh"
49
+ ],
50
+ :postinstall_timeout => "10000"
51
+ })
@@ -0,0 +1,313 @@
1
+ #### Contents of the preconfiguration file (for squeeze)
2
+ ### Localization
3
+ # Locale sets language and country.
4
+ d-i debian-installer/locale string en_US
5
+
6
+ # Keyboard selection.
7
+ #d-i keymap select us
8
+ d-i keyboard-configuration/xkb-keymap select us
9
+
10
+ ### Network configuration
11
+ # netcfg will choose an interface that has link if possible. This makes it
12
+ # skip displaying a list if there is more than one interface.
13
+ d-i netcfg/choose_interface select auto
14
+
15
+ # To pick a particular interface instead:
16
+ #d-i netcfg/choose_interface select eth1
17
+
18
+ # If you have a slow dhcp server and the installer times out waiting for
19
+ # it, this might be useful.
20
+ #d-i netcfg/dhcp_timeout string 60
21
+
22
+ # If you prefer to configure the network manually, uncomment this line and
23
+ # the static network configuration below.
24
+ #d-i netcfg/disable_dhcp boolean true
25
+
26
+ # If you want the preconfiguration file to work on systems both with and
27
+ # without a dhcp server, uncomment these lines and the static network
28
+ # configuration below.
29
+ #d-i netcfg/dhcp_failed note
30
+ #d-i netcfg/dhcp_options select Configure network manually
31
+
32
+ # Static network configuration.
33
+ #d-i netcfg/get_nameservers string 192.168.1.1
34
+ #d-i netcfg/get_ipaddress string 192.168.1.42
35
+ #d-i netcfg/get_netmask string 255.255.255.0
36
+ #d-i netcfg/get_gateway string 192.168.1.1
37
+ #d-i netcfg/confirm_static boolean true
38
+
39
+ # Any hostname and domain names assigned from dhcp take precedence over
40
+ # values set here. However, setting the values still prevents the questions
41
+ # from being shown, even if values come from dhcp.
42
+ #d-i netcfg/get_hostname string vagrant
43
+ d-i netcfg/get_domain string vagrantup.com
44
+
45
+ # Disable that annoying WEP key dialog.
46
+ d-i netcfg/wireless_wep string
47
+ # The wacky dhcp hostname that some ISPs use as a password of sorts.
48
+ #d-i netcfg/dhcp_hostname string radish
49
+
50
+ # If non-free firmware is needed for the network or other hardware, you can
51
+ # configure the installer to always try to load it, without prompting. Or
52
+ # change to false to disable asking.
53
+ #d-i hw-detect/load_firmware boolean true
54
+
55
+ ### Network console
56
+ # Use the following settings if you wish to make use of the network-console
57
+ # component for remote installation over SSH. This only makes sense if you
58
+ # intend to perform the remainder of the installation manually.
59
+ #d-i anna/choose_modules string network-console
60
+ #d-i network-console/password password r00tme
61
+ #d-i network-console/password-again password r00tme
62
+
63
+ ### Mirror settings
64
+ # If you select ftp, the mirror/country string does not need to be set.
65
+ #d-i mirror/protocol string ftp
66
+ d-i mirror/country string manual
67
+ d-i mirror/http/hostname string http.us.debian.org
68
+ d-i mirror/http/directory string /debian
69
+ d-i mirror/http/proxy string
70
+
71
+ # Suite to install.
72
+ #d-i mirror/suite string testing
73
+ # Suite to use for loading installer components (optional).
74
+ #d-i mirror/udeb/suite string testing
75
+
76
+ ### Clock and time zone setup
77
+ # Controls whether or not the hardware clock is set to UTC.
78
+ d-i clock-setup/utc boolean true
79
+
80
+ # You may set this to any valid setting for $TZ; see the contents of
81
+ # /usr/share/zoneinfo/ for valid values.
82
+ d-i time/zone string UTC
83
+
84
+ # Controls whether to use NTP to set the clock during the install
85
+ d-i clock-setup/ntp boolean true
86
+ # NTP server to use. The default is almost always fine here.
87
+ #d-i clock-setup/ntp-server string ntp.example.com
88
+
89
+ ### Partitioning
90
+ # If the system has free space you can choose to only partition that space.
91
+ #d-i partman-auto/init_automatically_partition select biggest_free
92
+
93
+ # Alternatively, you can specify a disk to partition. The device name must
94
+ # be given in traditional non-devfs format.
95
+ # Note: A disk must be specified, unless the system has only one disk.
96
+ # For example, to use the first SCSI/SATA hard disk:
97
+ d-i partman-auto/disk string /dev/sda
98
+ # In addition, you'll need to specify the method to use.
99
+ # The presently available methods are: "regular", "lvm" and "crypto"
100
+ d-i partman-auto/method string lvm
101
+
102
+ # If one of the disks that are going to be automatically partitioned
103
+ # contains an old LVM configuration, the user will normally receive a
104
+ # warning. This can be preseeded away...
105
+ d-i partman-lvm/device_remove_lvm boolean true
106
+ # The same applies to pre-existing software RAID array:
107
+ d-i partman-md/device_remove_md boolean true
108
+
109
+ # And the same goes for the confirmation to write the lvm partitions.
110
+ d-i partman-lvm/confirm boolean true
111
+ d-i partman-lvm/confirm_nooverwrite boolean true
112
+
113
+
114
+ d-i partman/choose_partition select finish
115
+ d-i partman-auto-lvm/guided_size string max
116
+
117
+ # You can choose one of the three predefined partitioning recipes:
118
+ # - atomic: all files in one partition
119
+ # - home: separate /home partition
120
+ # - multi: separate /home, /usr, /var, and /tmp partitions
121
+ d-i partman-auto/choose_recipe select atomic
122
+ d-i partman/default_filesystem string ext3
123
+
124
+ # Or provide a recipe of your own...
125
+ # The recipe format is documented in the file devel/partman-auto-recipe.txt.
126
+ # If you have a way to get a recipe file into the d-i environment, you can
127
+ # just point at it.
128
+ #d-i partman-auto/expert_recipe_file string /hd-media/recipe
129
+
130
+ # If not, you can put an entire recipe into the preconfiguration file in one
131
+ # (logical) line. This example creates a small /boot partition, suitable
132
+ # swap, and uses the rest of the space for the root partition:
133
+ #d-i partman-auto/expert_recipe string \
134
+ # boot-root :: \
135
+ # 40 50 100 ext3 \
136
+ # $primary{ } $bootable{ } \
137
+ # method{ format } format{ } \
138
+ # use_filesystem{ } filesystem{ ext3 } \
139
+ # mountpoint{ /boot } \
140
+ # . \
141
+ # 500 10000 1000000000 ext3 \
142
+ # method{ format } format{ } \
143
+ # use_filesystem{ } filesystem{ ext3 } \
144
+ # mountpoint{ / } \
145
+ # . \
146
+ # 64 512 300% linux-swap \
147
+ # method{ swap } format{ } \
148
+ # .
149
+
150
+ #The preseed line that "selects finish" needs to be in a certain order in your preseed, the example-preseed does not follow this.
151
+ #http://ubuntuforums.org/archive/index.php/t-1504045.html
152
+
153
+ # This makes partman automatically partition without confirmation, provided
154
+ # that you told it what to do using one of the methods above.
155
+ d-i partman/confirm_write_new_label boolean true
156
+ d-i partman/confirm boolean true
157
+ d-i partman/confirm_nooverwrite boolean true
158
+
159
+
160
+ ### Base system installation
161
+ # Select the initramfs generator used to generate the initrd for 2.6 kernels.
162
+ #d-i base-installer/kernel/linux/initramfs-generators string yaird
163
+
164
+ # The kernel image (meta) package to be installed; "none" can be used if no
165
+ # kernel is to be installed.
166
+ #d-i base-installer/kernel/image string linux-image-2.6-486
167
+
168
+ ### Account setup
169
+ # Skip creation of a root account (normal user account will be able to
170
+ # use sudo).
171
+ d-i passwd/root-login boolean false
172
+ # Alternatively, to skip creation of a normal user account.
173
+ #d-i passwd/make-user boolean false
174
+
175
+ # Root password, either in clear text
176
+ d-i passwd/root-password password vagrant
177
+ d-i passwd/root-password-again password vagrant
178
+ # or encrypted using an MD5 hash.
179
+ #d-i passwd/root-password-crypted password [MD5 hash]
180
+
181
+ # To create a normal user account.
182
+ d-i passwd/user-fullname string Vagrant User
183
+ d-i passwd/username string vagrant
184
+ # Normal user's password, either in clear text
185
+ d-i passwd/user-password password vagrant
186
+ d-i passwd/user-password-again password vagrant
187
+ # or encrypted using an MD5 hash.
188
+ #d-i passwd/user-password-crypted password [MD5 hash]
189
+ # Create the first user with the specified UID instead of the default.
190
+ #d-i passwd/user-uid string 1010
191
+ d-i user-setup/encrypt-home boolean false
192
+ d-i user-setup/allow-password-weak boolean true
193
+
194
+ # The user account will be added to some standard initial groups. To
195
+ # override that, use this.
196
+ d-i passwd/user-default-groups string audio cdrom video admin
197
+
198
+ ### Apt setup
199
+ # You can choose to install non-free and contrib software.
200
+ #d-i apt-setup/non-free boolean true
201
+ #d-i apt-setup/contrib boolean true
202
+ # Uncomment this if you don't want to use a network mirror.
203
+ #d-i apt-setup/use_mirror boolean false
204
+ # Select which update services to use; define the mirrors to be used.
205
+ # Values shown below are the normal defaults.
206
+ #d-i apt-setup/services-select multiselect security, volatile
207
+ #d-i apt-setup/security_host string security.debian.org
208
+ #d-i apt-setup/volatile_host string volatile.debian.org
209
+
210
+
211
+ # By default the installer requires that repositories be authenticated
212
+ # using a known gpg key. This setting can be used to disable that
213
+ # authentication. Warning: Insecure, not recommended.
214
+ #d-i debian-installer/allow_unauthenticated string true
215
+
216
+ ### Package selection
217
+ tasksel tasksel/first multiselect standard
218
+ # If the desktop task is selected, install the kde and xfce desktops
219
+ # instead of the default gnome desktop.
220
+ #tasksel tasksel/desktop multiselect kde, xfce
221
+
222
+ # Individual additional packages to install
223
+ d-i pkgsel/include string openssh-server ntp acpid sudo bzip2
224
+
225
+ # Whether to upgrade packages after debootstrap.
226
+ # Allowed values: none, safe-upgrade, full-upgrade
227
+ d-i pkgsel/upgrade select none
228
+
229
+ # Some versions of the installer can report back on what software you have
230
+ # installed, and what software you use. The default is not to report back,
231
+ # but sending reports helps the project determine what software is most
232
+ # popular and include it on CDs.
233
+ popularity-contest popularity-contest/participate boolean false
234
+
235
+ ### Boot loader installation
236
+ # Grub is the default boot loader (for x86). If you want lilo installed
237
+ # instead, uncomment this:
238
+ #d-i grub-installer/skip boolean true
239
+ # To also skip installing lilo, and install no bootloader, uncomment this
240
+ # too:
241
+ #d-i lilo-installer/skip boolean true
242
+
243
+ # This is fairly safe to set, it makes grub install automatically to the MBR
244
+ # if no other operating system is detected on the machine.
245
+ d-i grub-installer/only_debian boolean true
246
+
247
+ # This one makes grub-installer install to the MBR if it also finds some other
248
+ # OS, which is less safe as it might not be able to boot that other OS.
249
+ d-i grub-installer/with_other_os boolean true
250
+
251
+ # Alternatively, if you want to install to a location other than the mbr,
252
+ # uncomment and edit these lines:
253
+ #d-i grub-installer/only_debian boolean false
254
+ #d-i grub-installer/with_other_os boolean false
255
+ #d-i grub-installer/bootdev string (hd0,0)
256
+ # To install grub to multiple disks:
257
+ #d-i grub-installer/bootdev string (hd0,0) (hd1,0) (hd2,0)
258
+
259
+ # Optional password for grub, either in clear text
260
+ #d-i grub-installer/password password r00tme
261
+ #d-i grub-installer/password-again password r00tme
262
+ # or encrypted using an MD5 hash, see grub-md5-crypt(8).
263
+ #d-i grub-installer/password-crypted password [MD5 hash]
264
+
265
+ ### Finishing up the installation
266
+ # During installations from serial console, the regular virtual consoles
267
+ # (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
268
+ # line to prevent this.
269
+ #d-i finish-install/keep-consoles boolean true
270
+
271
+ # Avoid that last message about the install being complete.
272
+ d-i finish-install/reboot_in_progress note
273
+
274
+ # This will prevent the installer from ejecting the CD during the reboot,
275
+ # which is useful in some situations.
276
+ #d-i cdrom-detect/eject boolean false
277
+
278
+ # This is how to make the installer shutdown when finished, but not
279
+ # reboot into the installed system.
280
+ #d-i debian-installer/exit/halt boolean true
281
+ # This will power off the machine instead of just halting it.
282
+ #d-i debian-installer/exit/poweroff boolean true
283
+
284
+ ### Preseeding other packages
285
+ # Depending on what software you choose to install, or if things go wrong
286
+ # during the installation process, it's possible that other questions may
287
+ # be asked. You can preseed those too, of course. To get a list of every
288
+ # possible question that could be asked during an install, do an
289
+ # installation, and then run these commands:
290
+ # debconf-get-selections --installer > file
291
+ # debconf-get-selections >> file
292
+
293
+
294
+ #### Advanced options
295
+ ### Running custom commands during the installation
296
+ # d-i preseeding is inherently not secure. Nothing in the installer checks
297
+ # for attempts at buffer overflows or other exploits of the values of a
298
+ # preconfiguration file like this one. Only use preconfiguration files from
299
+ # trusted locations! To drive that home, and because it's generally useful,
300
+ # here's a way to run any shell command you'd like inside the installer,
301
+ # automatically.
302
+
303
+ # This first command is run as early as possible, just after
304
+ # preseeding is read.
305
+ # Prevent packaged version of VirtualBox Guest Additions being installed:
306
+ d-i preseed/early_command string sed -i \
307
+ '/in-target/idiscover(){/sbin/discover|grep -v VirtualBox;}' \
308
+ /usr/lib/pre-pkgsel.d/20install-hwpackages
309
+
310
+ # This command is run just before the install finishes, but when there is
311
+ # still a usable /target directory. You can chroot to /target and use it
312
+ # directly, or use the apt-install and in-target commands to easily install
313
+ # packages and run commands in the target system.
@@ -0,0 +1,2 @@
1
+ # Install Puppet
2
+ gem install puppet --no-ri --no-rdoc
@@ -0,0 +1,10 @@
1
+ # Install Ruby from packages
2
+ apt-get -y install ruby ruby-dev libopenssl-ruby1.8 irb ri rdoc
3
+
4
+ # Install Rubygems from source
5
+ rg_ver=1.8.22
6
+ curl -o /tmp/rubygems-${rg_ver}.zip \
7
+ "http://production.cf.rubygems.org/rubygems/rubygems-${rg_ver}.zip"
8
+ (cd /tmp && unzip rubygems-${rg_ver}.zip && \
9
+ cd rubygems-${rg_ver} && ruby setup.rb --no-format-executable)
10
+ rm -rf /tmp/rubygems-${rg_ver} /tmp/rubygems-${rg_ver}.zip
@@ -0,0 +1,25 @@
1
+ # Set up Vagrant.
2
+
3
+ date > /etc/vagrant_box_build_time
4
+
5
+ # Add groups puppet and chef
6
+ groupadd puppet
7
+ groupadd chef
8
+
9
+ # Create the user vagrant with password vagrant
10
+ useradd -G sudo -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant
11
+
12
+ # Install vagrant keys
13
+ mkdir -pm 700 /home/vagrant/.ssh
14
+ curl -Lo /home/vagrant/.ssh/authorized_keys \
15
+ 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub'
16
+ chmod 0600 /home/vagrant/.ssh/authorized_keys
17
+ chown -R vagrant:vagrant /home/vagrant/.ssh
18
+
19
+ # Customize the message of the day
20
+ echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd
21
+
22
+ # Install NFS client
23
+ apt-get -y install nfs-common
24
+
25
+