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,72 @@
|
|
1
|
+
# Kickstart file automatically generated by anaconda.
|
2
|
+
|
3
|
+
install
|
4
|
+
cdrom
|
5
|
+
lang en_US.UTF-8
|
6
|
+
keyboard us
|
7
|
+
# note we set biosdevname=0 when launching install
|
8
|
+
# this means we will be using standard ethernet devices, e.g. eth[0,1,2] eth
|
9
|
+
network --onboot yes --device eth0 --bootproto dhcp --noipv6
|
10
|
+
timezone --utc America/Los_Angeles
|
11
|
+
rootpw --iscrypted $6$n/NGsk5H2aiBMXL4$r/oPkJtB5rasvQHPo9AvIJBe6sNVlQbpZxvTRMN7.qZk/Sn9u2qZ0XgNxflUvK20y7OIWdr/vv7MED6gzkBiH0
|
12
|
+
selinux --enforcing
|
13
|
+
authconfig --enableshadow --passalgo=sha512
|
14
|
+
firewall --service=ssh
|
15
|
+
# The following is the partition information you requested
|
16
|
+
# Note that any partitions you deleted are not expressed
|
17
|
+
# here so unless you clear all partitions first, this is
|
18
|
+
# not guaranteed to work
|
19
|
+
clearpart --all --drives=sda --initlabel
|
20
|
+
|
21
|
+
#part biosboot --fstype=biosboot --size=1
|
22
|
+
part /boot --fstype=ext4 --size=500
|
23
|
+
part pv.2 --grow --size=500
|
24
|
+
|
25
|
+
volgroup vg_vagrant --pesize=32768 pv.2
|
26
|
+
logvol / --fstype=ext4 --name=lv_root --vgname=vg_vagrant --size=1024 --grow
|
27
|
+
logvol swap --fstype=swap --name=lv_swap --vgname=vg_vagrant --size=528 --grow --maxsize=1056
|
28
|
+
bootloader --location=mbr --driveorder=sda --append="norhgb biosdevname=0"
|
29
|
+
# Disable remote repositories, as this is a non-netinst install.
|
30
|
+
#repo --name="Fedora 17 - x86_64" --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-17&arch=x86_64 --cost=1000
|
31
|
+
#repo --name="Fedora 17 - x86_64 - Updates" --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f17&arch=x86_64 --cost=1000
|
32
|
+
services --enabled network
|
33
|
+
reboot
|
34
|
+
|
35
|
+
%packages
|
36
|
+
@core
|
37
|
+
@online-docs
|
38
|
+
|
39
|
+
# Requirements for vagrant
|
40
|
+
kernel-devel
|
41
|
+
kernel-headers
|
42
|
+
make
|
43
|
+
gcc
|
44
|
+
%end
|
45
|
+
|
46
|
+
%post
|
47
|
+
# Make ssh quicker in disconnected situations.
|
48
|
+
echo 'UseDNS no' >> /etc/ssh/sshd_config
|
49
|
+
|
50
|
+
# Disable udev persistent net rules
|
51
|
+
# We do this so that we do not persist rules mapped to virtual machines
|
52
|
+
# instances created from this basebox.
|
53
|
+
ln -s /dev/null /etc/udev/rule.d/70-persistent-net.rules
|
54
|
+
|
55
|
+
# Add Vagrant user and group.
|
56
|
+
/usr/sbin/groupadd vagrant
|
57
|
+
/usr/sbin/useradd vagrant -g vagrant
|
58
|
+
echo "vagrant"|passwd --stdin vagrant
|
59
|
+
|
60
|
+
# Give Vagrant user permission to sudo.
|
61
|
+
echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant
|
62
|
+
echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant
|
63
|
+
chmod 440 /etc/sudoers.d/vagrant
|
64
|
+
|
65
|
+
# Install vagrant authorized ssh key.
|
66
|
+
mkdir /home/vagrant/.ssh
|
67
|
+
curl -L 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' > /home/vagrant/.ssh/authorized_keys
|
68
|
+
chown vagrant:vagrant -R /home/vagrant/.ssh
|
69
|
+
chmod 700 /home/vagrant/.ssh
|
70
|
+
chmod 600 /home/vagrant/.ssh/authorized_keys
|
71
|
+
chcon -R unconfined_u:object_r:user_home_t:s0 /home/vagrant/.ssh
|
72
|
+
%end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
date > /etc/vagrant_box_build_time
|
4
|
+
|
5
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
6
|
+
|
7
|
+
yum -y update
|
8
|
+
|
9
|
+
yum -y install \
|
10
|
+
ruby \
|
11
|
+
ruby-devel \
|
12
|
+
puppet \
|
13
|
+
rubygems \
|
14
|
+
rubygem-erubis \
|
15
|
+
rubygem-highline \
|
16
|
+
rubygem-json \
|
17
|
+
rubygem-mime-types \
|
18
|
+
rubygem-net-ssh \
|
19
|
+
rubygem-polyglot \
|
20
|
+
rubygem-rest-client \
|
21
|
+
rubygem-treetop \
|
22
|
+
rubygem-uuidtools
|
23
|
+
|
24
|
+
cd /tmp
|
25
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
26
|
+
mount -o loop,ro VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
27
|
+
sh /mnt/VBoxLinuxAdditions.run
|
28
|
+
umount /mnt
|
29
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
30
|
+
|
31
|
+
gem install chef --no-rdoc --no-ri
|
32
|
+
|
33
|
+
exit
|
34
|
+
|
35
|
+
# EOF
|
@@ -0,0 +1 @@
|
|
1
|
+
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
|
@@ -0,0 +1 @@
|
|
1
|
+
gem install --no-ri --no-rdoc chef
|
@@ -0,0 +1,36 @@
|
|
1
|
+
Veewee::Session.declare({
|
2
|
+
:cpu_count => '1',
|
3
|
+
:memory_size=> '512',
|
4
|
+
:disk_size => '10140',
|
5
|
+
:disk_format => 'VDI',
|
6
|
+
:hostiocache => 'off',
|
7
|
+
:ioapic => 'on',
|
8
|
+
:pae => 'on',
|
9
|
+
:os_type_id => 'RedHat',
|
10
|
+
:iso_file => "SL-62-i386-2012-02-06-boot.iso",
|
11
|
+
:iso_src => "http://ftp.heanet.ie/pub/rsync.scientificlinux.org/6.2/i386/iso/SL-62-i386-2012-02-06-boot.iso",
|
12
|
+
:iso_md5 => "c9f591724738634803f815f69339fc21",
|
13
|
+
:iso_download_timeout => 1000,
|
14
|
+
:boot_wait => "15",
|
15
|
+
:boot_cmd_sequence => [ '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
|
16
|
+
:kickstart_port => "7122",
|
17
|
+
:kickstart_timeout => 10000,
|
18
|
+
:kickstart_file => "ks.cfg",
|
19
|
+
:ssh_login_timeout => "10000",
|
20
|
+
:ssh_user => "vagrant",
|
21
|
+
:ssh_password => "vagrant",
|
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
|
+
"puppet.sh",
|
30
|
+
"chef.sh",
|
31
|
+
"vagrant.sh",
|
32
|
+
"virtualbox.sh",
|
33
|
+
"cleanup.sh"
|
34
|
+
],
|
35
|
+
:postinstall_timeout => 10000
|
36
|
+
})
|
@@ -0,0 +1,53 @@
|
|
1
|
+
install
|
2
|
+
url --url=http://ftp.heanet.ie/pub/rsync.scientificlinux.org/6.2/i386/os
|
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 --trust eth0 --ssh
|
8
|
+
authconfig --enableshadow --enablemd5
|
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
|
+
repo --name=epel --baseurl=http://download.fedoraproject.org/pub/epel/6/i386/ --includepkgs='ruby-augeas,ruby-shadow'
|
25
|
+
repo --name=puppetlabs --baseurl=http://yum.puppetlabs.com/el/6/products/i386/ --includepkgs='puppet,facter'
|
26
|
+
repo --name=puppetlabs-dependencies --baseurl=http://yum.puppetlabs.com/el/6/dependencies/i386/
|
27
|
+
|
28
|
+
%packages
|
29
|
+
@ core
|
30
|
+
ruby
|
31
|
+
ruby-devel
|
32
|
+
rubygems
|
33
|
+
kernel-devel
|
34
|
+
gcc
|
35
|
+
gcc-c++
|
36
|
+
bzip2
|
37
|
+
make
|
38
|
+
zlib-devel
|
39
|
+
openssl-devel
|
40
|
+
readline-devel
|
41
|
+
sqlite-devel
|
42
|
+
puppet
|
43
|
+
facter
|
44
|
+
|
45
|
+
-ipw2100-firmware
|
46
|
+
-ipw2200-firmware
|
47
|
+
-ivtv-firmware
|
48
|
+
|
49
|
+
%post
|
50
|
+
/usr/sbin/groupadd vagrant
|
51
|
+
/usr/sbin/useradd vagrant -g vagrant -G wheel
|
52
|
+
echo "vagrant"|passwd --stdin vagrant
|
53
|
+
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
|
2
|
+
|
3
|
+
date > /etc/vagrant_box_build_time
|
4
|
+
|
5
|
+
yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
|
6
|
+
yum -y clean all
|
7
|
+
|
8
|
+
gem install --no-ri --no-rdoc chef
|
9
|
+
|
10
|
+
# Installing vagrant keys
|
11
|
+
mkdir /home/vagrant/.ssh
|
12
|
+
chmod 700 /home/vagrant/.ssh
|
13
|
+
cd /home/vagrant/.ssh
|
14
|
+
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
15
|
+
chown -R vagrant /home/vagrant/.ssh
|
16
|
+
|
17
|
+
# Installing the virtualbox guest additions
|
18
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
19
|
+
cd /tmp
|
20
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
21
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
22
|
+
sh /mnt/VBoxLinuxAdditions.run
|
23
|
+
umount /mnt
|
24
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
25
|
+
|
26
|
+
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
|
27
|
+
|
28
|
+
dd if=/dev/zero of=/tmp/clean || rm /tmp/clean
|
29
|
+
|
30
|
+
exit
|
@@ -0,0 +1 @@
|
|
1
|
+
gem install --no-ri --no-rdoc puppet
|
@@ -0,0 +1,8 @@
|
|
1
|
+
date > /etc/vagrant_box_build_time
|
2
|
+
|
3
|
+
# Installing vagrant keys
|
4
|
+
mkdir /home/vagrant/.ssh
|
5
|
+
chmod 700 /home/vagrant/.ssh
|
6
|
+
cd /home/vagrant/.ssh
|
7
|
+
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
8
|
+
chown -R vagrant /home/vagrant/.ssh
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Installing the virtualbox guest additions
|
2
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
3
|
+
cd /tmp
|
4
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
5
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
6
|
+
sh /mnt/VBoxLinuxAdditions.run
|
7
|
+
umount /mnt
|
8
|
+
rm -rf VBoxGuestAdditions_$VBOX_VERSION.iso
|
@@ -0,0 +1 @@
|
|
1
|
+
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
|
@@ -0,0 +1 @@
|
|
1
|
+
gem install --no-ri --no-rdoc chef
|
@@ -0,0 +1,36 @@
|
|
1
|
+
Veewee::Session.declare({
|
2
|
+
:cpu_count => '1',
|
3
|
+
:memory_size=> '512',
|
4
|
+
:disk_size => '10140',
|
5
|
+
:disk_format => 'VDI',
|
6
|
+
:hostiocache => 'off',
|
7
|
+
:ioapic => 'on',
|
8
|
+
:pae => 'on',
|
9
|
+
:os_type_id => 'RedHat_64',
|
10
|
+
:iso_file => "SL-62-x86_64-2012-02-06-boot.iso",
|
11
|
+
:iso_src => "http://ftp.heanet.ie/pub/rsync.scientificlinux.org/6.2/x86_64/iso/SL-62-x86_64-2012-02-06-boot.iso",
|
12
|
+
:iso_md5 => "ef209276a7ba85f2e8a680e003c3c15d",
|
13
|
+
:iso_download_timeout => 1000,
|
14
|
+
:boot_wait => "15",
|
15
|
+
:boot_cmd_sequence => [ '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
|
16
|
+
:kickstart_port => "7122",
|
17
|
+
:kickstart_timeout => 10000,
|
18
|
+
:kickstart_file => "ks.cfg",
|
19
|
+
:ssh_login_timeout => "10000",
|
20
|
+
:ssh_user => "vagrant",
|
21
|
+
:ssh_password => "vagrant",
|
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
|
+
"puppet.sh",
|
30
|
+
"chef.sh",
|
31
|
+
"vagrant.sh",
|
32
|
+
"virtualbox.sh",
|
33
|
+
"cleanup.sh"
|
34
|
+
],
|
35
|
+
:postinstall_timeout => 10000
|
36
|
+
})
|
@@ -0,0 +1,53 @@
|
|
1
|
+
install
|
2
|
+
url --url=http://ftp.heanet.ie/pub/rsync.scientificlinux.org/6.2/x86_64/os
|
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 --trust eth0 --ssh
|
8
|
+
authconfig --enableshadow --enablemd5
|
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
|
+
repo --name=epel --baseurl=http://download.fedoraproject.org/pub/epel/6/x86_64/ --includepkgs='ruby-augeas,ruby-shadow'
|
25
|
+
repo --name=puppetlabs --baseurl=http://yum.puppetlabs.com/el/6/products/x86_64/ --includepkgs='puppet,facter'
|
26
|
+
repo --name=puppetlabs-dependencies --baseurl=http://yum.puppetlabs.com/el/6/dependencies/x86_64/
|
27
|
+
|
28
|
+
%packages
|
29
|
+
@ core
|
30
|
+
ruby
|
31
|
+
ruby-devel
|
32
|
+
rubygems
|
33
|
+
kernel-devel
|
34
|
+
gcc
|
35
|
+
gcc-c++
|
36
|
+
bzip2
|
37
|
+
make
|
38
|
+
zlib-devel
|
39
|
+
openssl-devel
|
40
|
+
readline-devel
|
41
|
+
sqlite-devel
|
42
|
+
puppet
|
43
|
+
facter
|
44
|
+
|
45
|
+
-ipw2100-firmware
|
46
|
+
-ipw2200-firmware
|
47
|
+
-ivtv-firmware
|
48
|
+
|
49
|
+
%post
|
50
|
+
/usr/sbin/groupadd vagrant
|
51
|
+
/usr/sbin/useradd vagrant -g vagrant -G wheel
|
52
|
+
echo "vagrant"|passwd --stdin vagrant
|
53
|
+
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
|
2
|
+
|
3
|
+
date > /etc/vagrant_box_build_time
|
4
|
+
|
5
|
+
yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
|
6
|
+
yum -y clean all
|
7
|
+
|
8
|
+
gem install --no-ri --no-rdoc chef
|
9
|
+
|
10
|
+
# Installing vagrant keys
|
11
|
+
mkdir /home/vagrant/.ssh
|
12
|
+
chmod 700 /home/vagrant/.ssh
|
13
|
+
cd /home/vagrant/.ssh
|
14
|
+
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
15
|
+
chown -R vagrant /home/vagrant/.ssh
|
16
|
+
|
17
|
+
# Installing the virtualbox guest additions
|
18
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
19
|
+
cd /tmp
|
20
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
21
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
22
|
+
sh /mnt/VBoxLinuxAdditions.run
|
23
|
+
umount /mnt
|
24
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
25
|
+
|
26
|
+
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
|
27
|
+
|
28
|
+
dd if=/dev/zero of=/tmp/clean || rm /tmp/clean
|
29
|
+
|
30
|
+
exit
|
@@ -0,0 +1 @@
|
|
1
|
+
gem install --no-ri --no-rdoc puppet
|
@@ -0,0 +1,8 @@
|
|
1
|
+
date > /etc/vagrant_box_build_time
|
2
|
+
|
3
|
+
# Installing vagrant keys
|
4
|
+
mkdir /home/vagrant/.ssh
|
5
|
+
chmod 700 /home/vagrant/.ssh
|
6
|
+
cd /home/vagrant/.ssh
|
7
|
+
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
8
|
+
chown -R vagrant /home/vagrant/.ssh
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Installing the virtualbox guest additions
|
2
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
3
|
+
cd /tmp
|
4
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
5
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
6
|
+
sh /mnt/VBoxLinuxAdditions.run
|
7
|
+
umount /mnt
|
8
|
+
rm -rf VBoxGuestAdditions_$VBOX_VERSION.iso
|
@@ -58,6 +58,15 @@ rm -rf rubygems-1.8.17*
|
|
58
58
|
# Ruby, RubyGems, and Chef/Puppet are visible
|
59
59
|
echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
|
60
60
|
|
61
|
+
# Need conditionals around `mesg n` so that Chef doesn't throw
|
62
|
+
# `stdin: not a tty`
|
63
|
+
sed -i '$d' /root/.profile
|
64
|
+
cat << 'EOH' >> /root/.profile
|
65
|
+
if `tty -s`; then
|
66
|
+
mesg n
|
67
|
+
fi
|
68
|
+
EOH
|
69
|
+
|
61
70
|
# Installing vagrant keys
|
62
71
|
mkdir /home/vagrant/.ssh
|
63
72
|
chmod 700 /home/vagrant/.ssh
|
@@ -1,7 +1,5 @@
|
|
1
|
-
# obviously this is using the "alternate" ISO, not the "server" ISO, but that
|
2
|
-
# is only because it hasn't been released yet.
|
3
1
|
Veewee::Session.declare({
|
4
|
-
:cpu_count => '
|
2
|
+
:cpu_count => '1',
|
5
3
|
:memory_size=> '2048',
|
6
4
|
:disk_size => '10140',
|
7
5
|
:disk_format => 'VDI',
|
@@ -1,7 +1,5 @@
|
|
1
|
-
# obviously this is using the "alternate" ISO, not the "server" ISO, but that
|
2
|
-
# is only because it hasn't been released yet.
|
3
1
|
Veewee::Session.declare({
|
4
|
-
:cpu_count => '
|
2
|
+
:cpu_count => '1',
|
5
3
|
:memory_size=> '2048',
|
6
4
|
:disk_size => '10140',
|
7
5
|
:disk_format => 'VDI',
|
@@ -1,7 +1,5 @@
|
|
1
|
-
# obviously this is using the "alternate" ISO, not the "server" ISO, but that
|
2
|
-
# is only because it hasn't been released yet.
|
3
1
|
Veewee::Session.declare({
|
4
|
-
:cpu_count => '
|
2
|
+
:cpu_count => '1',
|
5
3
|
:memory_size=> '2048',
|
6
4
|
:disk_size => '10140',
|
7
5
|
:disk_format => 'VDI',
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Veewee::Session.declare({
|
2
|
+
:cpu_count => '1',
|
3
|
+
:memory_size=> '2048',
|
4
|
+
:disk_size => '10140',
|
5
|
+
:disk_format => 'VDI',
|
6
|
+
:hostiocache => 'off',
|
7
|
+
:os_type_id => 'Ubuntu',
|
8
|
+
:iso_file => "ubuntu-12.04-server-i386.iso",
|
9
|
+
:iso_src => "http://releases.ubuntu.com/12.04/ubuntu-12.04-server-i386.iso",
|
10
|
+
:iso_md5 => '32184a83c8b5e6031e1264e5c499bc03',
|
11
|
+
:iso_download_timeout => "1000",
|
12
|
+
:boot_wait => "4",
|
13
|
+
:boot_cmd_sequence => [
|
14
|
+
'<Esc><Esc><Enter>',
|
15
|
+
'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
|
16
|
+
'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
|
17
|
+
'hostname=%NAME% ',
|
18
|
+
'fb=false debconf/frontend=noninteractive ',
|
19
|
+
'keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ',
|
20
|
+
'initrd=/install/initrd.gz -- <Enter>'
|
21
|
+
],
|
22
|
+
:kickstart_port => "7122",
|
23
|
+
:kickstart_timeout => "10000",
|
24
|
+
:kickstart_file => "preseed.cfg",
|
25
|
+
:ssh_login_timeout => "10000",
|
26
|
+
:ssh_user => "vagrant",
|
27
|
+
:ssh_password => "vagrant",
|
28
|
+
:ssh_key => "",
|
29
|
+
:ssh_host_port => "7222",
|
30
|
+
:ssh_guest_port => "22",
|
31
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
32
|
+
:shutdown_cmd => "shutdown -P now",
|
33
|
+
:postinstall_files => [ "postinstall.sh"],
|
34
|
+
:postinstall_timeout => "10000"
|
35
|
+
})
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# postinstall.sh created from Mitchell's official lucid32/64 baseboxes
|
2
|
+
|
3
|
+
date > /etc/vagrant_box_build_time
|
4
|
+
|
5
|
+
# Apt-install various things necessary for Ruby, guest additions,
|
6
|
+
# etc., and remove optional things to trim down the machine.
|
7
|
+
apt-get -y update
|
8
|
+
apt-get -y upgrade
|
9
|
+
apt-get -y install linux-headers-$(uname -r) build-essential
|
10
|
+
apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev
|
11
|
+
apt-get -y install vim
|
12
|
+
apt-get clean
|
13
|
+
|
14
|
+
# Installing the virtualbox guest additions
|
15
|
+
apt-get -y install dkms
|
16
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
17
|
+
cd /tmp
|
18
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
19
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
20
|
+
sh /mnt/VBoxLinuxAdditions.run
|
21
|
+
umount /mnt
|
22
|
+
|
23
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
24
|
+
|
25
|
+
# Setup sudo to allow no-password sudo for "admin"
|
26
|
+
groupadd -r admin
|
27
|
+
usermod -a -G admin vagrant
|
28
|
+
cp /etc/sudoers /etc/sudoers.orig
|
29
|
+
sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
|
30
|
+
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
31
|
+
|
32
|
+
# Install NFS client
|
33
|
+
apt-get -y install nfs-common
|
34
|
+
|
35
|
+
# Install Ruby from packages
|
36
|
+
apt-get -y install ruby rubygems
|
37
|
+
|
38
|
+
# Installing chef & Puppet
|
39
|
+
gem install chef --no-ri --no-rdoc
|
40
|
+
gem install puppet --no-ri --no-rdoc
|
41
|
+
|
42
|
+
# Installing vagrant keys
|
43
|
+
mkdir /home/vagrant/.ssh
|
44
|
+
chmod 700 /home/vagrant/.ssh
|
45
|
+
cd /home/vagrant/.ssh
|
46
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
|
47
|
+
chmod 600 /home/vagrant/.ssh/authorized_keys
|
48
|
+
chown -R vagrant /home/vagrant/.ssh
|
49
|
+
|
50
|
+
# Remove items used for building, since they aren't needed anymore
|
51
|
+
apt-get -y remove linux-headers-$(uname -r) build-essential
|
52
|
+
apt-get -y autoremove
|
53
|
+
|
54
|
+
# Zero out the free space to save space in the final image:
|
55
|
+
dd if=/dev/zero of=/EMPTY bs=1M
|
56
|
+
rm -f /EMPTY
|
57
|
+
|
58
|
+
# Removing leftover leases and persistent rules
|
59
|
+
echo "cleaning up dhcp leases"
|
60
|
+
rm /var/lib/dhcp3/*
|
61
|
+
|
62
|
+
# Make sure Udev doesn't block our network
|
63
|
+
# http://6.ptmc.org/?p=164
|
64
|
+
echo "cleaning up udev rules"
|
65
|
+
rm /etc/udev/rules.d/70-persistent-net.rules
|
66
|
+
mkdir /etc/udev/rules.d/70-persistent-net.rules
|
67
|
+
rm -rf /dev/.udev/
|
68
|
+
rm /lib/udev/rules.d/75-persistent-net-generator.rules
|
69
|
+
|
70
|
+
echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
|
71
|
+
echo "pre-up sleep 2" >> /etc/network/interfaces
|
72
|
+
exit
|