veewee 0.3.0.alpha9 → 0.3.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/doc/definition.md +8 -1
- data/lib/fission/config.rb +52 -5
- data/lib/fission.rb +3 -5
- data/lib/veewee/cli.rb +1 -1
- data/lib/veewee/command/base.rb +1 -1
- data/lib/veewee/command/{vmfusion.rb → fusion.rb} +1 -1
- data/lib/veewee/command/group_base.rb +2 -1
- data/lib/veewee/command/kvm.rb +1 -0
- data/lib/veewee/command/{virtualbox.rb → vbox.rb} +1 -1
- data/lib/veewee/command.rb +2 -2
- data/lib/veewee/definitions.rb +29 -10
- data/lib/veewee/environment.rb +8 -0
- data/lib/veewee/provider/core/box/exec.rb +1 -1
- data/lib/veewee/provider/core/box/floppy.rb +2 -2
- data/lib/veewee/provider/core/helper/iso.rb +1 -1
- data/lib/veewee/provider/core/helper/web.rb +9 -4
- data/lib/veewee/provider/kvm/box/create.rb +1 -0
- data/lib/veewee/provider/vmfusion/box/create.rb +1 -1
- data/lib/veewee/provider/vmfusion/box/destroy.rb +1 -1
- data/lib/veewee/provider/vmfusion/box/export_ova.rb +1 -1
- data/lib/veewee/provider/vmfusion/box/helper/buildinfo.rb +16 -8
- data/lib/veewee/provider/vmfusion/box/helper/ip.rb +48 -3
- data/lib/veewee/provider/vmfusion/box/helper/vnc.rb +2 -2
- data/lib/veewee/provider/vmfusion/box.rb +3 -11
- data/lib/veewee/provider/vmfusion/provider.rb +15 -2
- data/lib/veewee/templates.rb +1 -2
- data/lib/veewee/version.rb +1 -1
- data/templates/CentOS-6.2-i386-minimal/base.sh +14 -0
- data/templates/CentOS-6.2-i386-minimal/chef.sh +3 -0
- data/templates/CentOS-6.2-i386-minimal/cleanup.sh +5 -0
- data/templates/CentOS-6.2-i386-minimal/definition.rb +39 -0
- data/templates/CentOS-6.2-i386-minimal/ks.cfg +39 -0
- data/templates/CentOS-6.2-i386-minimal/puppet.sh +12 -0
- data/templates/CentOS-6.2-i386-minimal/ruby.sh +3 -0
- data/templates/CentOS-6.2-i386-minimal/vagrant.sh +17 -0
- data/templates/CentOS-6.2-i386-minimal/virtualbox.sh +8 -0
- data/templates/CentOS-6.3-i386-minimal/base.sh +14 -0
- data/templates/CentOS-6.3-i386-minimal/chef.sh +3 -0
- data/templates/CentOS-6.3-i386-minimal/cleanup.sh +5 -0
- data/templates/CentOS-6.3-i386-minimal/definition.rb +39 -0
- data/templates/CentOS-6.3-i386-minimal/ks.cfg +42 -0
- data/templates/CentOS-6.3-i386-minimal/puppet.sh +12 -0
- data/templates/CentOS-6.3-i386-minimal/ruby.sh +3 -0
- data/templates/CentOS-6.3-i386-minimal/vagrant.sh +17 -0
- data/templates/CentOS-6.3-i386-minimal/virtualbox.sh +8 -0
- data/templates/CentOS-6.3-x86_64-minimal/base.sh +14 -0
- data/templates/CentOS-6.3-x86_64-minimal/chef.sh +3 -0
- data/templates/CentOS-6.3-x86_64-minimal/cleanup.sh +5 -0
- data/templates/CentOS-6.3-x86_64-minimal/definition.rb +39 -0
- data/templates/CentOS-6.3-x86_64-minimal/ks.cfg +42 -0
- data/templates/CentOS-6.3-x86_64-minimal/puppet.sh +12 -0
- data/templates/CentOS-6.3-x86_64-minimal/ruby.sh +3 -0
- data/templates/CentOS-6.3-x86_64-minimal/vagrant.sh +17 -0
- data/templates/CentOS-6.3-x86_64-minimal/virtualbox.sh +8 -0
- data/templates/Debian-6.0.3-amd64-netboot/base.sh +14 -0
- data/templates/Debian-6.0.3-i386-netboot/base.sh +14 -0
- data/templates/Debian-6.0.4-amd64-netboot/base.sh +14 -0
- data/templates/Debian-6.0.4-i386-netboot/base.sh +14 -0
- data/templates/Debian-6.0.5-amd64-netboot/base.sh +27 -0
- data/templates/Debian-6.0.5-amd64-netboot/chef.sh +2 -0
- data/templates/Debian-6.0.5-amd64-netboot/cleanup-virtualbox.sh +4 -0
- data/templates/Debian-6.0.5-amd64-netboot/cleanup.sh +17 -0
- data/templates/Debian-6.0.5-amd64-netboot/definition.rb +49 -0
- data/templates/Debian-6.0.5-amd64-netboot/preseed.cfg +315 -0
- data/templates/Debian-6.0.5-amd64-netboot/puppet.sh +2 -0
- data/templates/Debian-6.0.5-amd64-netboot/ruby.sh +10 -0
- data/templates/Debian-6.0.5-amd64-netboot/vagrant.sh +21 -0
- data/templates/Debian-6.0.5-amd64-netboot/virtualbox.sh +13 -0
- data/templates/Debian-6.0.5-amd64-netboot/zerodisk.sh +3 -0
- data/templates/Debian-6.0.5-i386-netboot/base.sh +27 -0
- data/templates/Debian-6.0.5-i386-netboot/chef.sh +2 -0
- data/templates/Debian-6.0.5-i386-netboot/cleanup-virtualbox.sh +4 -0
- data/templates/Debian-6.0.5-i386-netboot/cleanup.sh +17 -0
- data/templates/Debian-6.0.5-i386-netboot/definition.rb +51 -0
- data/templates/Debian-6.0.5-i386-netboot/preseed.cfg +315 -0
- data/templates/Debian-6.0.5-i386-netboot/puppet.sh +2 -0
- data/templates/Debian-6.0.5-i386-netboot/ruby.sh +10 -0
- data/templates/Debian-6.0.5-i386-netboot/vagrant.sh +21 -0
- data/templates/Debian-6.0.5-i386-netboot/virtualbox.sh +13 -0
- data/templates/Debian-6.0.5-i386-netboot/zerodisk.sh +3 -0
- data/templates/Fedora-16-x86_64-netboot/definition.rb +29 -0
- data/templates/Fedora-16-x86_64-netboot/ks.cfg +70 -0
- data/templates/Fedora-16-x86_64-netboot/postinstall.sh +26 -0
- data/templates/Fedora-17-i386/definition.rb +17 -0
- data/templates/Fedora-17-i386/ks.cfg +72 -0
- data/templates/Fedora-17-i386/postinstall.sh +35 -0
- data/templates/Fedora-17-x86_64/definition.rb +17 -0
- data/templates/Fedora-17-x86_64/ks.cfg +72 -0
- data/templates/Fedora-17-x86_64/postinstall.sh +35 -0
- data/templates/gentoo-latest-x86_64-experimental/definition.rb +1 -1
- data/templates/scientificlinux-6.2-i386-netboot/base.sh +1 -0
- data/templates/scientificlinux-6.2-i386-netboot/chef.sh +1 -0
- data/templates/scientificlinux-6.2-i386-netboot/cleanup.sh +4 -0
- data/templates/scientificlinux-6.2-i386-netboot/definition.rb +36 -0
- data/templates/scientificlinux-6.2-i386-netboot/ks.cfg +53 -0
- data/templates/scientificlinux-6.2-i386-netboot/postinstall.sh +30 -0
- data/templates/scientificlinux-6.2-i386-netboot/puppet.sh +1 -0
- data/templates/scientificlinux-6.2-i386-netboot/vagrant.sh +8 -0
- data/templates/scientificlinux-6.2-i386-netboot/virtualbox.sh +8 -0
- data/templates/scientificlinux-6.2-x86_64-netboot/base.sh +1 -0
- data/templates/scientificlinux-6.2-x86_64-netboot/chef.sh +1 -0
- data/templates/scientificlinux-6.2-x86_64-netboot/cleanup.sh +4 -0
- data/templates/scientificlinux-6.2-x86_64-netboot/definition.rb +36 -0
- data/templates/scientificlinux-6.2-x86_64-netboot/ks.cfg +53 -0
- data/templates/scientificlinux-6.2-x86_64-netboot/postinstall.sh +30 -0
- data/templates/scientificlinux-6.2-x86_64-netboot/puppet.sh +1 -0
- data/templates/scientificlinux-6.2-x86_64-netboot/vagrant.sh +8 -0
- data/templates/scientificlinux-6.2-x86_64-netboot/virtualbox.sh +8 -0
- data/templates/ubuntu-10.04.4-server-amd64/postinstall.sh +9 -0
- data/templates/ubuntu-12.04-server-amd64/definition.rb +1 -3
- data/templates/ubuntu-12.04-server-amd64-packages/definition.rb +1 -3
- data/templates/ubuntu-12.04-server-i386/definition.rb +1 -3
- data/templates/ubuntu-12.04-server-i386-packages/definition.rb +35 -0
- data/templates/ubuntu-12.04-server-i386-packages/postinstall.sh +72 -0
- data/templates/ubuntu-12.04-server-i386-packages/preseed.cfg +87 -0
- data/templates/windows-7-enterprise-amd64/Autounattend.xml +8 -8
- data/validation/features/steps/veewee_steps.rb +1 -1
- data/veewee.gemspec +5 -3
- metadata +104 -37
- data/lib/fission/cli.rb +0 -76
- data/lib/fission/command/clone.rb +0 -68
- data/lib/fission/command/delete.rb +0 -71
- data/lib/fission/command/snapshot_create.rb +0 -52
- data/lib/fission/command/snapshot_list.rb +0 -45
- data/lib/fission/command/snapshot_revert.rb +0 -54
- data/lib/fission/command/start.rb +0 -69
- data/lib/fission/command/status.rb +0 -31
- data/lib/fission/command/stop.rb +0 -49
- data/lib/fission/command/suspend.rb +0 -67
- data/lib/fission/command.rb +0 -15
- data/lib/fission/core_ext/class.rb +0 -5
- data/lib/fission/core_ext/file.rb +0 -7
- data/lib/fission/core_ext/object.rb +0 -112
- data/lib/fission/error.rb +0 -9
- data/lib/fission/fusion.rb +0 -17
- data/lib/fission/leasesfile.rb +0 -74
- data/lib/fission/metadata.rb +0 -39
- data/lib/fission/response.rb +0 -16
- data/lib/fission/ui.rb +0 -22
- data/lib/fission/version.rb +0 -3
- data/lib/fission/vm.rb +0 -365
- data/templates/openbsd50_i386/.definition.rb.swp +0 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
Veewee::Session.declare({
|
2
|
+
:cpu_count => '1',
|
3
|
+
:memory_size=> '480',
|
4
|
+
:disk_size => '10140',
|
5
|
+
:disk_format => 'VDI',
|
6
|
+
:hostiocache => 'off',
|
7
|
+
:os_type_id => 'RedHat_64',
|
8
|
+
:iso_file => "CentOS-6.2-i386-minimal.iso",
|
9
|
+
:iso_src => "http://ftp.yz.yamagata-u.ac.jp/pub/linux/centos/6.2/isos/i386/CentOS-6.2-i386-minimal.iso",
|
10
|
+
:iso_md5 => "cc4fbd16bd305f5bf6731b4b10f8fd18",
|
11
|
+
:iso_download_timeout => 1000,
|
12
|
+
:boot_wait => "10",
|
13
|
+
:boot_cmd_sequence => [
|
14
|
+
'<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'
|
15
|
+
],
|
16
|
+
:kickstart_port => "7122",
|
17
|
+
:kickstart_timeout => 10000,
|
18
|
+
:kickstart_file => "ks.cfg",
|
19
|
+
:ssh_login_timeout => "10000",
|
20
|
+
:ssh_user => "veewee",
|
21
|
+
:ssh_password => "veewee",
|
22
|
+
:ssh_key => "",
|
23
|
+
:ssh_host_port => "7222",
|
24
|
+
:ssh_guest_port => "22",
|
25
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
26
|
+
:shutdown_cmd => "/sbin/halt -h -p",
|
27
|
+
:postinstall_files => [
|
28
|
+
"base.sh",
|
29
|
+
"ruby.sh",
|
30
|
+
"chef.sh",
|
31
|
+
"puppet.sh",
|
32
|
+
"vagrant.sh",
|
33
|
+
"virtualbox.sh",
|
34
|
+
#"kvm.sh",
|
35
|
+
#"vmfusion.sh",
|
36
|
+
"cleanup.sh"
|
37
|
+
],
|
38
|
+
:postinstall_timeout => 10000
|
39
|
+
})
|
@@ -0,0 +1,39 @@
|
|
1
|
+
install
|
2
|
+
cdrom
|
3
|
+
lang en_US.UTF-8
|
4
|
+
keyboard us
|
5
|
+
network --bootproto=dhcp
|
6
|
+
rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/
|
7
|
+
firewall --enabled --service=ssh
|
8
|
+
authconfig --enableshadow --passalgo=sha512
|
9
|
+
selinux --disabled
|
10
|
+
timezone UTC
|
11
|
+
bootloader --location=mbr
|
12
|
+
|
13
|
+
text
|
14
|
+
skipx
|
15
|
+
zerombr
|
16
|
+
|
17
|
+
clearpart --all --initlabel
|
18
|
+
autopart
|
19
|
+
|
20
|
+
auth --useshadow --enablemd5
|
21
|
+
firstboot --disabled
|
22
|
+
reboot
|
23
|
+
|
24
|
+
%packages --ignoremissing
|
25
|
+
@core
|
26
|
+
bzip2
|
27
|
+
|
28
|
+
-ipw2100-firmware
|
29
|
+
-ipw2200-firmware
|
30
|
+
-ivtv-firmware
|
31
|
+
|
32
|
+
%post
|
33
|
+
/usr/bin/yum -y install sudo
|
34
|
+
/usr/sbin/groupadd veewee
|
35
|
+
/usr/sbin/useradd veewee -g veewee -G wheel
|
36
|
+
echo "veewee"|passwd --stdin veewee
|
37
|
+
echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
|
38
|
+
chmod 0440 /etc/sudoers.d/veewee
|
39
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Vagrant specific
|
2
|
+
date > /etc/vagrant_box_build_time
|
3
|
+
|
4
|
+
# Add vagrant user
|
5
|
+
/usr/sbin/groupadd vagrant
|
6
|
+
/usr/sbin/useradd vagrant -g vagrant -G wheel
|
7
|
+
echo "vagrant"|passwd --stdin vagrant
|
8
|
+
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
|
9
|
+
chmod 0440 /etc/sudoers.d/vagrant
|
10
|
+
|
11
|
+
# Installing vagrant keys
|
12
|
+
mkdir -p /home/vagrant/.ssh
|
13
|
+
chmod 700 /home/vagrant/.ssh
|
14
|
+
cd /home/vagrant/.ssh
|
15
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
|
16
|
+
chown -R vagrant /home/vagrant/.ssh
|
17
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Installing the virtualbox guest additions
|
2
|
+
VBOX_VERSION=$(cat /home/veewee/.vbox_version)
|
3
|
+
cd /tmp
|
4
|
+
mount -o loop /home/veewee/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
5
|
+
sh /mnt/VBoxLinuxAdditions.run
|
6
|
+
umount /mnt
|
7
|
+
rm -rf /home/veewee/VBoxGuestAdditions_*.iso
|
8
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Base install
|
2
|
+
|
3
|
+
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
|
4
|
+
|
5
|
+
cat > /etc/yum.repos.d/epel.repo << EOM
|
6
|
+
[epel]
|
7
|
+
name=epel
|
8
|
+
baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch
|
9
|
+
enabled=1
|
10
|
+
gpgcheck=0
|
11
|
+
EOM
|
12
|
+
|
13
|
+
yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl wget
|
14
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
Veewee::Session.declare({
|
2
|
+
:cpu_count => '1',
|
3
|
+
:memory_size=> '480',
|
4
|
+
:disk_size => '10140',
|
5
|
+
:disk_format => 'VDI',
|
6
|
+
:hostiocache => 'off',
|
7
|
+
:os_type_id => 'RedHat_64',
|
8
|
+
:iso_file => "CentOS-6.3-i386-minimal.iso",
|
9
|
+
:iso_src => "http://www.mirrorservice.org/sites/mirror.centos.org/6.3/isos/i386/CentOS-6.3-i386-minimal.iso",
|
10
|
+
:iso_md5 => "081ce8ba3e9f761a35d47f1c345562c1",
|
11
|
+
:iso_download_timeout => 1000,
|
12
|
+
:boot_wait => "10",
|
13
|
+
:boot_cmd_sequence => [
|
14
|
+
'<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'
|
15
|
+
],
|
16
|
+
:kickstart_port => "7122",
|
17
|
+
:kickstart_timeout => 10000,
|
18
|
+
:kickstart_file => "ks.cfg",
|
19
|
+
:ssh_login_timeout => "10000",
|
20
|
+
:ssh_user => "veewee",
|
21
|
+
:ssh_password => "veewee",
|
22
|
+
:ssh_key => "",
|
23
|
+
:ssh_host_port => "7222",
|
24
|
+
:ssh_guest_port => "22",
|
25
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
26
|
+
:shutdown_cmd => "/sbin/halt -h -p",
|
27
|
+
:postinstall_files => [
|
28
|
+
"base.sh",
|
29
|
+
"ruby.sh",
|
30
|
+
"chef.sh",
|
31
|
+
"puppet.sh",
|
32
|
+
"vagrant.sh",
|
33
|
+
"virtualbox.sh",
|
34
|
+
#"kvm.sh",
|
35
|
+
#"vmfusion.sh",
|
36
|
+
"cleanup.sh"
|
37
|
+
],
|
38
|
+
:postinstall_timeout => 10000
|
39
|
+
})
|
@@ -0,0 +1,42 @@
|
|
1
|
+
install
|
2
|
+
cdrom
|
3
|
+
lang en_US.UTF-8
|
4
|
+
keyboard us
|
5
|
+
network --bootproto=dhcp
|
6
|
+
rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/
|
7
|
+
firewall --enabled --service=ssh
|
8
|
+
authconfig --enableshadow --passalgo=sha512
|
9
|
+
selinux --disabled
|
10
|
+
timezone UTC
|
11
|
+
bootloader --location=mbr
|
12
|
+
|
13
|
+
text
|
14
|
+
skipx
|
15
|
+
zerombr
|
16
|
+
|
17
|
+
clearpart --all --initlabel
|
18
|
+
autopart
|
19
|
+
|
20
|
+
auth --useshadow --enablemd5
|
21
|
+
firstboot --disabled
|
22
|
+
reboot
|
23
|
+
|
24
|
+
%packages --ignoremissing
|
25
|
+
@core
|
26
|
+
bzip2
|
27
|
+
kernel-devel
|
28
|
+
kernel-headers
|
29
|
+
-ipw2100-firmware
|
30
|
+
-ipw2200-firmware
|
31
|
+
-ivtv-firmware
|
32
|
+
%end
|
33
|
+
|
34
|
+
%post
|
35
|
+
/usr/bin/yum -y install sudo
|
36
|
+
/usr/sbin/groupadd veewee
|
37
|
+
/usr/sbin/useradd veewee -g veewee -G wheel
|
38
|
+
echo "veewee"|passwd --stdin veewee
|
39
|
+
echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
|
40
|
+
chmod 0440 /etc/sudoers.d/veewee
|
41
|
+
%end
|
42
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Vagrant specific
|
2
|
+
date > /etc/vagrant_box_build_time
|
3
|
+
|
4
|
+
# Add vagrant user
|
5
|
+
/usr/sbin/groupadd vagrant
|
6
|
+
/usr/sbin/useradd vagrant -g vagrant -G wheel
|
7
|
+
echo "vagrant"|passwd --stdin vagrant
|
8
|
+
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
|
9
|
+
chmod 0440 /etc/sudoers.d/vagrant
|
10
|
+
|
11
|
+
# Installing vagrant keys
|
12
|
+
mkdir -p /home/vagrant/.ssh
|
13
|
+
chmod 700 /home/vagrant/.ssh
|
14
|
+
cd /home/vagrant/.ssh
|
15
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
|
16
|
+
chown -R vagrant /home/vagrant/.ssh
|
17
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Installing the virtualbox guest additions
|
2
|
+
VBOX_VERSION=$(cat /home/veewee/.vbox_version)
|
3
|
+
cd /tmp
|
4
|
+
mount -o loop /home/veewee/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
5
|
+
sh /mnt/VBoxLinuxAdditions.run
|
6
|
+
umount /mnt
|
7
|
+
rm -rf /home/veewee/VBoxGuestAdditions_*.iso
|
8
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Base install
|
2
|
+
|
3
|
+
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
|
4
|
+
|
5
|
+
cat > /etc/yum.repos.d/epel.repo << EOM
|
6
|
+
[epel]
|
7
|
+
name=epel
|
8
|
+
baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch
|
9
|
+
enabled=1
|
10
|
+
gpgcheck=0
|
11
|
+
EOM
|
12
|
+
|
13
|
+
yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl wget
|
14
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
Veewee::Session.declare({
|
2
|
+
:cpu_count => '1',
|
3
|
+
:memory_size=> '480',
|
4
|
+
:disk_size => '10140',
|
5
|
+
:disk_format => 'VDI',
|
6
|
+
:hostiocache => 'off',
|
7
|
+
:os_type_id => 'RedHat_64',
|
8
|
+
:iso_file => "CentOS-6.3-x86_64-minimal.iso",
|
9
|
+
:iso_src => "http://www.mirrorservice.org/sites/mirror.centos.org/6.3/isos/x86_64/CentOS-6.3-x86_64-minimal.iso",
|
10
|
+
:iso_md5 => "087713752fa88c03a5e8471c661ad1a2",
|
11
|
+
:iso_download_timeout => 1000,
|
12
|
+
:boot_wait => "10",
|
13
|
+
:boot_cmd_sequence => [
|
14
|
+
'<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'
|
15
|
+
],
|
16
|
+
:kickstart_port => "7122",
|
17
|
+
:kickstart_timeout => 10000,
|
18
|
+
:kickstart_file => "ks.cfg",
|
19
|
+
:ssh_login_timeout => "10000",
|
20
|
+
:ssh_user => "veewee",
|
21
|
+
:ssh_password => "veewee",
|
22
|
+
:ssh_key => "",
|
23
|
+
:ssh_host_port => "7222",
|
24
|
+
:ssh_guest_port => "22",
|
25
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
26
|
+
:shutdown_cmd => "/sbin/halt -h -p",
|
27
|
+
:postinstall_files => [
|
28
|
+
"base.sh",
|
29
|
+
"ruby.sh",
|
30
|
+
"chef.sh",
|
31
|
+
"puppet.sh",
|
32
|
+
"vagrant.sh",
|
33
|
+
"virtualbox.sh",
|
34
|
+
#"kvm.sh",
|
35
|
+
#"vmfusion.sh",
|
36
|
+
"cleanup.sh"
|
37
|
+
],
|
38
|
+
:postinstall_timeout => 10000
|
39
|
+
})
|
@@ -0,0 +1,42 @@
|
|
1
|
+
install
|
2
|
+
cdrom
|
3
|
+
lang en_US.UTF-8
|
4
|
+
keyboard us
|
5
|
+
network --bootproto=dhcp
|
6
|
+
rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/
|
7
|
+
firewall --enabled --service=ssh
|
8
|
+
authconfig --enableshadow --passalgo=sha512
|
9
|
+
selinux --disabled
|
10
|
+
timezone UTC
|
11
|
+
bootloader --location=mbr
|
12
|
+
|
13
|
+
text
|
14
|
+
skipx
|
15
|
+
zerombr
|
16
|
+
|
17
|
+
clearpart --all --initlabel
|
18
|
+
autopart
|
19
|
+
|
20
|
+
auth --useshadow --enablemd5
|
21
|
+
firstboot --disabled
|
22
|
+
reboot
|
23
|
+
|
24
|
+
%packages --ignoremissing
|
25
|
+
@core
|
26
|
+
bzip2
|
27
|
+
kernel-devel
|
28
|
+
kernel-headers
|
29
|
+
-ipw2100-firmware
|
30
|
+
-ipw2200-firmware
|
31
|
+
-ivtv-firmware
|
32
|
+
%end
|
33
|
+
|
34
|
+
%post
|
35
|
+
/usr/bin/yum -y install sudo
|
36
|
+
/usr/sbin/groupadd veewee
|
37
|
+
/usr/sbin/useradd veewee -g veewee -G wheel
|
38
|
+
echo "veewee"|passwd --stdin veewee
|
39
|
+
echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
|
40
|
+
chmod 0440 /etc/sudoers.d/veewee
|
41
|
+
%end
|
42
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Vagrant specific
|
2
|
+
date > /etc/vagrant_box_build_time
|
3
|
+
|
4
|
+
# Add vagrant user
|
5
|
+
/usr/sbin/groupadd vagrant
|
6
|
+
/usr/sbin/useradd vagrant -g vagrant -G wheel
|
7
|
+
echo "vagrant"|passwd --stdin vagrant
|
8
|
+
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
|
9
|
+
chmod 0440 /etc/sudoers.d/vagrant
|
10
|
+
|
11
|
+
# Installing vagrant keys
|
12
|
+
mkdir -p /home/vagrant/.ssh
|
13
|
+
chmod 700 /home/vagrant/.ssh
|
14
|
+
cd /home/vagrant/.ssh
|
15
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
|
16
|
+
chown -R vagrant /home/vagrant/.ssh
|
17
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Installing the virtualbox guest additions
|
2
|
+
VBOX_VERSION=$(cat /home/veewee/.vbox_version)
|
3
|
+
cd /tmp
|
4
|
+
mount -o loop /home/veewee/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
5
|
+
sh /mnt/VBoxLinuxAdditions.run
|
6
|
+
umount /mnt
|
7
|
+
rm -rf /home/veewee/VBoxGuestAdditions_*.iso
|
8
|
+
|
@@ -11,3 +11,17 @@ sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
|
|
11
11
|
|
12
12
|
# Tweak sshd to prevent DNS resolution (speed up logins)
|
13
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
|
@@ -11,3 +11,17 @@ sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
|
|
11
11
|
|
12
12
|
# Tweak sshd to prevent DNS resolution (speed up logins)
|
13
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
|
@@ -11,3 +11,17 @@ sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
|
|
11
11
|
|
12
12
|
# Tweak sshd to prevent DNS resolution (speed up logins)
|
13
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
|
@@ -11,3 +11,17 @@ sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
|
|
11
11
|
|
12
12
|
# Tweak sshd to prevent DNS resolution (speed up logins)
|
13
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,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 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,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,49 @@
|
|
1
|
+
Veewee::Definition.declare({
|
2
|
+
:cpu_count => '1',
|
3
|
+
:memory_size=> '256',
|
4
|
+
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
|
5
|
+
:os_type_id => 'Debian_64',
|
6
|
+
:iso_file => "debian-6.0.5-amd64-netinst.iso",
|
7
|
+
:iso_src => "http://cdimage.debian.org/debian-cd/6.0.5/amd64/iso-cd/debian-6.0.5-amd64-netinst.iso",
|
8
|
+
:iso_md5 => "a213b1d6da1996c677706d843b6ee0f2",
|
9
|
+
:iso_download_timeout => "1000",
|
10
|
+
:boot_wait => "10", :boot_cmd_sequence => [
|
11
|
+
'<Esc>',
|
12
|
+
'install ',
|
13
|
+
'preseed/url=http://%IP%:%PORT%/preseed.cfg ',
|
14
|
+
'debian-installer=en_US ',
|
15
|
+
'auto ',
|
16
|
+
'locale=en_US ',
|
17
|
+
'kbd-chooser/method=us ',
|
18
|
+
'netcfg/get_hostname=%NAME% ',
|
19
|
+
'netcfg/get_domain=vagrantup.com ',
|
20
|
+
'fb=false ',
|
21
|
+
'debconf/frontend=noninteractive ',
|
22
|
+
'console-setup/ask_detect=false ',
|
23
|
+
'console-keymaps-at/keymap=us ',
|
24
|
+
'<Enter>'
|
25
|
+
],
|
26
|
+
:kickstart_port => "7122",
|
27
|
+
:kickstart_timeout => "10000",
|
28
|
+
:kickstart_file => "preseed.cfg",
|
29
|
+
:ssh_login_timeout => "10000",
|
30
|
+
:ssh_user => "vagrant",
|
31
|
+
:ssh_password => "vagrant",
|
32
|
+
:ssh_key => "",
|
33
|
+
:ssh_host_port => "7222",
|
34
|
+
:ssh_guest_port => "22",
|
35
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
36
|
+
:shutdown_cmd => "halt -p",
|
37
|
+
:postinstall_files => [
|
38
|
+
"base.sh",
|
39
|
+
"vagrant.sh",
|
40
|
+
"virtualbox.sh",
|
41
|
+
"ruby.sh",
|
42
|
+
"puppet.sh",
|
43
|
+
"chef.sh",
|
44
|
+
"cleanup-virtualbox.sh",
|
45
|
+
"cleanup.sh",
|
46
|
+
"zerodisk.sh"
|
47
|
+
],
|
48
|
+
:postinstall_timeout => "10000"
|
49
|
+
})
|