veewee 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/Rakefile +23 -23
- data/bin/veewee +1 -1
- data/doc/kvm.md +58 -9
- data/doc/providers.md +2 -2
- data/doc/vagrant.md +1 -1
- data/lib/vagrant_init.rb +0 -1
- data/lib/veewee/cli.rb +1 -1
- data/lib/veewee/command.rb +2 -2
- data/lib/veewee/command/fusion.rb +2 -2
- data/lib/veewee/command/kvm.rb +1 -1
- data/lib/veewee/command/parallels.rb +2 -2
- data/lib/veewee/command/vagrant/define.rb +1 -1
- data/lib/veewee/command/vagrant/undefine.rb +1 -1
- data/lib/veewee/command/vbox.rb +2 -2
- data/lib/veewee/config.rb +8 -10
- data/lib/veewee/definition.rb +41 -41
- data/lib/veewee/definitions.rb +27 -30
- data/lib/veewee/environment.rb +16 -16
- data/lib/veewee/error.rb +18 -15
- data/lib/veewee/provider/core/box/build.rb +1 -1
- data/lib/veewee/provider/kvm/box.rb +1 -6
- data/lib/veewee/provider/kvm/box/validate_kvm.rb +1 -1
- data/lib/veewee/provider/kvm/provider.rb +19 -32
- data/lib/veewee/provider/virtualbox/box/helper/create.rb +5 -1
- data/lib/veewee/providers.rb +22 -21
- data/lib/veewee/template.rb +9 -9
- data/lib/veewee/templates.rb +14 -15
- data/lib/veewee/ui.rb +7 -7
- data/lib/veewee/version.rb +1 -1
- data/templates/CentOS-6.3-i386-minimal/base.sh +1 -1
- data/templates/CentOS-6.3-i386-minimal/definition.rb +13 -4
- data/templates/CentOS-6.3-i386-minimal/ks.cfg +50 -14
- data/templates/CentOS-6.3-i386-minimal/virtualbox.sh +3 -3
- data/templates/CentOS-6.3-x86_64-minimal/base.sh +1 -1
- data/templates/CentOS-6.3-x86_64-netboot/base.sh +14 -0
- data/templates/CentOS-6.3-x86_64-netboot/chef.sh +3 -0
- data/templates/CentOS-6.3-x86_64-netboot/cleanup.sh +5 -0
- data/templates/CentOS-6.3-x86_64-netboot/definition.rb +40 -0
- data/templates/CentOS-6.3-x86_64-netboot/ks.cfg +41 -0
- data/templates/CentOS-6.3-x86_64-netboot/puppet.sh +12 -0
- data/templates/CentOS-6.3-x86_64-netboot/ruby.sh +3 -0
- data/templates/CentOS-6.3-x86_64-netboot/vagrant.sh +18 -0
- data/templates/CentOS-6.3-x86_64-netboot/virtualbox.sh +8 -0
- data/templates/{Debian-7.0-b2-i386-netboot → CentOS-6.3-x86_64-netboot}/zerodisk.sh +0 -0
- data/templates/{Debian-7.0-b2-i386-netboot → Debian-7.0-b4-amd64-netboot}/base.sh +2 -3
- data/templates/{Debian-7.0-b2-i386-netboot → Debian-7.0-b4-amd64-netboot}/chef.sh +0 -0
- data/templates/{Debian-7.0-b2-i386-netboot → Debian-7.0-b4-amd64-netboot}/cleanup-virtualbox.sh +0 -0
- data/templates/{Debian-7.0-b2-i386-netboot → Debian-7.0-b4-amd64-netboot}/cleanup.sh +0 -0
- data/templates/{Debian-7.0-b3-amd64-netboot → Debian-7.0-b4-amd64-netboot}/definition.rb +3 -3
- data/templates/{Debian-7.0-b3-amd64-netboot → Debian-7.0-b4-amd64-netboot}/preseed.cfg +0 -0
- data/templates/{Debian-7.0-b2-i386-netboot → Debian-7.0-b4-amd64-netboot}/puppet.sh +0 -0
- data/templates/{Debian-7.0-b2-i386-netboot → Debian-7.0-b4-amd64-netboot}/ruby.sh +0 -0
- data/templates/{Debian-7.0-b2-i386-netboot → Debian-7.0-b4-amd64-netboot}/vagrant.sh +0 -0
- data/templates/{Debian-7.0-b2-i386-netboot → Debian-7.0-b4-amd64-netboot}/virtualbox.sh +0 -0
- data/templates/{Debian-7.0-b3-amd64-netboot → Debian-7.0-b4-amd64-netboot}/zerodisk.sh +0 -0
- data/templates/{Debian-7.0-b3-amd64-netboot → Debian-7.0-b4-i386-netboot}/base.sh +2 -3
- data/templates/{Debian-7.0-b3-amd64-netboot → Debian-7.0-b4-i386-netboot}/chef.sh +0 -0
- data/templates/{Debian-7.0-b3-amd64-netboot → Debian-7.0-b4-i386-netboot}/cleanup-virtualbox.sh +0 -0
- data/templates/{Debian-7.0-b3-amd64-netboot → Debian-7.0-b4-i386-netboot}/cleanup.sh +0 -0
- data/templates/{Debian-7.0-b2-i386-netboot → Debian-7.0-b4-i386-netboot}/definition.rb +3 -3
- data/templates/{Debian-7.0-b2-i386-netboot → Debian-7.0-b4-i386-netboot}/preseed.cfg +0 -0
- data/templates/{Debian-7.0-b3-amd64-netboot → Debian-7.0-b4-i386-netboot}/puppet.sh +0 -0
- data/templates/{Debian-7.0-b3-amd64-netboot → Debian-7.0-b4-i386-netboot}/ruby.sh +0 -0
- data/templates/{Debian-7.0-b3-amd64-netboot → Debian-7.0-b4-i386-netboot}/vagrant.sh +0 -0
- data/templates/{Debian-7.0-b3-amd64-netboot → Debian-7.0-b4-i386-netboot}/virtualbox.sh +0 -0
- data/templates/Debian-7.0-b4-i386-netboot/zerodisk.sh +3 -0
- data/templates/Fedora-18-i386/definition.rb +6 -6
- data/templates/Fedora-18-i386/postinstall.sh +3 -1
- data/templates/Fedora-18-x86_64/definition.rb +5 -5
- data/templates/Fedora-18-x86_64/postinstall.sh +6 -1
- data/templates/ubuntu-12.04.1-server-amd64-packages/postinstall.sh +4 -5
- data/templates/ubuntu-12.04.1-server-amd64/postinstall.sh +4 -5
- data/templates/ubuntu-8.04.4-server-amd64/postinstall.sh +6 -6
- data/templates/ubuntu-8.04.4-server-i386/postinstall.sh +6 -6
- data/templates/windows-8-amd64/Autounattend.xml +140 -0
- data/templates/windows-8-amd64/README.md +134 -0
- data/templates/windows-8-amd64/cygwin-setup.exe +0 -0
- data/templates/windows-8-amd64/definition.rb +101 -0
- data/templates/windows-8-amd64/install-cygwin-sshd.bat +38 -0
- data/templates/windows-8-amd64/install-winrm.bat +11 -0
- data/templates/windows-8-amd64/oracle-cert.cer +0 -0
- data/templates/windows-8-amd64/postinstall.sh +122 -0
- data/templates/windows-8-amd64/winrm.rb +8 -0
- data/templates/windows-8-i386/Autounattend.xml +140 -0
- data/templates/windows-8-i386/README.md +134 -0
- data/templates/windows-8-i386/cygwin-setup.exe +0 -0
- data/templates/windows-8-i386/definition.rb +101 -0
- data/templates/windows-8-i386/install-cygwin-sshd.bat +38 -0
- data/templates/windows-8-i386/install-winrm.bat +11 -0
- data/templates/windows-8-i386/oracle-cert.cer +0 -0
- data/templates/windows-8-i386/postinstall.sh +122 -0
- data/templates/windows-8-i386/winrm.rb +8 -0
- data/test/build_realtest.rb +4 -4
- data/veewee.gemspec +8 -9
- metadata +55 -27
data/lib/veewee/template.rb
CHANGED
@@ -3,20 +3,20 @@ module Veewee
|
|
3
3
|
|
4
4
|
attr_accessor :env
|
5
5
|
|
6
|
-
attr_reader :name
|
6
|
+
attr_reader :name, :path
|
7
7
|
|
8
|
-
def initialize(name,path,env)
|
9
|
-
@name=name
|
10
|
-
@path=path
|
11
|
-
@env=env
|
8
|
+
def initialize(name, path, env)
|
9
|
+
@name = name
|
10
|
+
@path = path
|
11
|
+
@env = env
|
12
12
|
return self
|
13
13
|
end
|
14
14
|
|
15
15
|
def exists?
|
16
|
-
filename=Dir.glob("#{path}/definition.rb")
|
17
|
-
if filename.length!=0
|
18
|
-
|
19
|
-
|
16
|
+
filename = Dir.glob("#{path}/definition.rb")
|
17
|
+
if filename.length != 0
|
18
|
+
env.logger.debug("[Template] template '#{name}' is valid")
|
19
|
+
return true
|
20
20
|
else
|
21
21
|
return false
|
22
22
|
end
|
data/lib/veewee/templates.rb
CHANGED
@@ -4,16 +4,16 @@ module Veewee
|
|
4
4
|
attr_accessor :env
|
5
5
|
|
6
6
|
def initialize(env)
|
7
|
-
@env=env
|
7
|
+
@env = env
|
8
8
|
return self
|
9
9
|
end
|
10
10
|
|
11
11
|
def [](name)
|
12
|
-
result=nil
|
12
|
+
result = nil
|
13
13
|
valid_paths(env.template_path).each do |template_dir|
|
14
|
-
template=Veewee::Template.new(name,File.join(template_dir,name)
|
14
|
+
template = Veewee::Template.new(name, File.join(template_dir, name), @env)
|
15
15
|
if template.exists?
|
16
|
-
result=template
|
16
|
+
result = template
|
17
17
|
return result
|
18
18
|
end
|
19
19
|
end
|
@@ -22,37 +22,38 @@ module Veewee
|
|
22
22
|
|
23
23
|
# Fetch all Templates
|
24
24
|
def each(&block)
|
25
|
-
templates=Hash.new
|
25
|
+
templates = Hash.new
|
26
26
|
|
27
27
|
valid_paths(env.template_path).each do |template_dir|
|
28
28
|
|
29
29
|
env.logger.debug("[Template] Searching #{template_dir} for templates")
|
30
30
|
|
31
|
-
subdirs=Dir.glob("#{template_dir}/*")
|
31
|
+
subdirs = Dir.glob("#{template_dir}/*")
|
32
32
|
subdirs.each do |sub|
|
33
33
|
if File.directory?("#{sub}")
|
34
|
-
name=sub.sub(/#{template_dir}\//,'')
|
35
|
-
template=Veewee::Template.new(name,sub
|
34
|
+
name = sub.sub(/#{template_dir}\//, '')
|
35
|
+
template = Veewee::Template.new(name, sub, @env)
|
36
36
|
if template.exists?
|
37
|
-
|
38
|
-
templates[name]=template
|
37
|
+
env.logger.debug("[Template] template '#{name}' found")
|
38
|
+
templates[name] = template
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
if templates.length==0
|
45
|
-
env.logger.debug("[Template] no templates found")
|
44
|
+
if templates.length == 0
|
45
|
+
env.logger.debug("[Template] no templates found")
|
46
46
|
end
|
47
47
|
|
48
48
|
Hash[templates.sort].each(&block)
|
49
49
|
end
|
50
50
|
|
51
51
|
private
|
52
|
+
|
52
53
|
# Traverses path to see which exist or not
|
53
54
|
# and checks if available
|
54
55
|
def valid_paths(paths)
|
55
|
-
valid_paths=paths.collect { |path|
|
56
|
+
valid_paths = paths.collect { |path|
|
56
57
|
if File.exists?(path) && File.directory?(path)
|
57
58
|
env.logger.info "Path #{path} exists"
|
58
59
|
File.expand_path(path)
|
@@ -64,7 +65,5 @@ module Veewee
|
|
64
65
|
return valid_paths.compact
|
65
66
|
end
|
66
67
|
|
67
|
-
|
68
|
-
|
69
68
|
end
|
70
69
|
end
|
data/lib/veewee/ui.rb
CHANGED
@@ -13,7 +13,7 @@ module Veewee
|
|
13
13
|
|
14
14
|
[:warn, :error, :info, :success].each do |method|
|
15
15
|
define_method(method) do |message, *argv|
|
16
|
-
opts
|
16
|
+
opts, *argv = argv
|
17
17
|
opts ||= {}
|
18
18
|
# Log normal console messages
|
19
19
|
env.logger.info("ui") { message }
|
@@ -36,7 +36,7 @@ module Veewee
|
|
36
36
|
|
37
37
|
[[:warn, :yellow], [:error, :red], [:info, nil], [:success, :green]].each do |method, color|
|
38
38
|
class_eval <<-CODE
|
39
|
-
def #{method}(message, opts=nil)
|
39
|
+
def #{method}(message, opts = nil)
|
40
40
|
super(message)
|
41
41
|
opts ||= {}
|
42
42
|
opts[:new_line] = true if !opts.has_key?(:new_line)
|
@@ -47,7 +47,7 @@ module Veewee
|
|
47
47
|
|
48
48
|
[:ask, :no?, :yes?].each do |method|
|
49
49
|
class_eval <<-CODE
|
50
|
-
def #{method}(message, opts=nil)
|
50
|
+
def #{method}(message, opts = nil)
|
51
51
|
super(message)
|
52
52
|
opts ||= {}
|
53
53
|
@shell.send(#{method.inspect}, format_message(message, opts), opts[:color])
|
@@ -55,7 +55,7 @@ module Veewee
|
|
55
55
|
CODE
|
56
56
|
end
|
57
57
|
|
58
|
-
def report_progress(progress, total, show_parts=true)
|
58
|
+
def report_progress(progress, total, show_parts = true)
|
59
59
|
percent = (progress.to_f / total.to_f) * 100
|
60
60
|
line = "Progress: #{percent.to_i}%"
|
61
61
|
line << " (#{progress} / #{total})" if show_parts
|
@@ -69,10 +69,10 @@ module Veewee
|
|
69
69
|
|
70
70
|
protected
|
71
71
|
|
72
|
-
def format_message(message, opts=nil)
|
72
|
+
def format_message(message, opts = nil)
|
73
73
|
opts = { :prefix => true }.merge(opts || {})
|
74
|
-
opts[:prefix]=false if env.resource=="veewee"
|
75
|
-
opts[:prefix]=false if env.resource=="vagrant"
|
74
|
+
opts[:prefix] = false if env.resource == "veewee"
|
75
|
+
opts[:prefix] = false if env.resource == "vagrant"
|
76
76
|
message = "[#{env.resource}] #{message}" if opts[:prefix]
|
77
77
|
message
|
78
78
|
end
|
data/lib/veewee/version.rb
CHANGED
@@ -10,5 +10,5 @@ enabled=1
|
|
10
10
|
gpgcheck=0
|
11
11
|
EOM
|
12
12
|
|
13
|
-
yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl wget
|
13
|
+
yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl wget dkms
|
14
14
|
|
@@ -1,10 +1,19 @@
|
|
1
|
+
# sudo acpid and wget are not included in the minimal DVD ISO. To fix
|
2
|
+
# this, use the *bin* ISO or run "yum install ..." in %post
|
1
3
|
Veewee::Session.declare({
|
2
4
|
:cpu_count => '1',
|
3
5
|
:memory_size=> '480',
|
4
6
|
:disk_size => '10140',
|
5
7
|
:disk_format => 'VDI',
|
6
|
-
:hostiocache => '
|
7
|
-
:os_type_id => '
|
8
|
+
:hostiocache => 'on',
|
9
|
+
:os_type_id => 'RedHat',
|
10
|
+
:virtualbox => { :vm_options => [
|
11
|
+
'hwvirtex' => 'off',
|
12
|
+
'hwvirtexexcl' => 'off',
|
13
|
+
'nestedpaging' => 'off',
|
14
|
+
'natdnshostresolver1' => 'on'
|
15
|
+
]
|
16
|
+
},
|
8
17
|
:iso_file => "CentOS-6.3-i386-minimal.iso",
|
9
18
|
:iso_src => "http://www.mirrorservice.org/sites/mirror.centos.org/6.3/isos/i386/CentOS-6.3-i386-minimal.iso",
|
10
19
|
:iso_md5 => "081ce8ba3e9f761a35d47f1c345562c1",
|
@@ -17,8 +26,8 @@ Veewee::Session.declare({
|
|
17
26
|
:kickstart_timeout => 10000,
|
18
27
|
:kickstart_file => "ks.cfg",
|
19
28
|
:ssh_login_timeout => "10000",
|
20
|
-
:ssh_user => "
|
21
|
-
:ssh_password => "
|
29
|
+
:ssh_user => "vagrant",
|
30
|
+
:ssh_password => "vagrant",
|
22
31
|
:ssh_key => "",
|
23
32
|
:ssh_host_port => "7222",
|
24
33
|
:ssh_guest_port => "22",
|
@@ -21,22 +21,58 @@ auth --useshadow --enablemd5
|
|
21
21
|
firstboot --disabled
|
22
22
|
reboot
|
23
23
|
|
24
|
-
%packages --
|
24
|
+
%packages --nobase --excludedocs --instLangs=en
|
25
25
|
@core
|
26
26
|
bzip2
|
27
|
-
|
28
|
-
|
29
|
-
-
|
30
|
-
-
|
31
|
-
-
|
32
|
-
|
27
|
+
-aic94xx-firmware.noarch
|
28
|
+
-atmel-firmware.noarch
|
29
|
+
-b43-openfwwf.noarch
|
30
|
+
-bfa-firmware.noarch
|
31
|
+
-ipw2100-firmware.noarch
|
32
|
+
-ipw2200-firmware.noarch
|
33
|
+
-ivtv-firmware.noarch
|
34
|
+
-iwl1000-firmware.noarch
|
35
|
+
-iwl100-firmware.noarch
|
36
|
+
-iwl3945-firmware.noarch
|
37
|
+
-iwl4965-firmware.noarch
|
38
|
+
-iwl5000-firmware.noarch
|
39
|
+
-iwl5150-firmware.noarch
|
40
|
+
-iwl6000-firmware.noarch
|
41
|
+
-iwl6000g2a-firmware.noarch
|
42
|
+
-iwl6000g2b-firmware.noarch
|
43
|
+
-iwl6050-firmware.noarch
|
44
|
+
-libertas-usb8388-firmware.noarch
|
45
|
+
-ql2100-firmware.noarch
|
46
|
+
-ql2200-firmware.noarch
|
47
|
+
-ql23xx-firmware.noarch
|
48
|
+
-ql2400-firmware.noarch
|
49
|
+
-ql2500-firmware.noarch
|
50
|
+
-rt61pci-firmware.noarch
|
51
|
+
-rt73usb-firmware.noarch
|
52
|
+
-xorg-x11-drv-ati-firmware.noarch
|
53
|
+
-zd1211-firmware.noarch
|
33
54
|
|
34
55
|
%post
|
35
|
-
/
|
36
|
-
|
37
|
-
/usr/
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
56
|
+
date > /etc/vagrant_box_build_time
|
57
|
+
|
58
|
+
/usr/bin/yum -y install acpid sudo wget bind-utils
|
59
|
+
|
60
|
+
/usr/sbin/groupadd vagrant
|
61
|
+
/usr/sbin/useradd vagrant -g vagrant -G wheel
|
62
|
+
echo "vagrant"|passwd --stdin vagrant
|
63
|
+
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
|
64
|
+
chmod 0440 /etc/sudoers.d/vagrant
|
42
65
|
|
66
|
+
mkdir -p /home/vagrant/.ssh
|
67
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
|
68
|
+
chown -R vagrant /home/vagrant/.ssh
|
69
|
+
chgrp -R vagrant /home/vagrant/.ssh
|
70
|
+
chmod -R go= /home/vagrant/.ssh
|
71
|
+
|
72
|
+
# Make ssh faster by not waiting on DNS
|
73
|
+
echo "UseDNS no" >> /etc/ssh/sshd_config
|
74
|
+
|
75
|
+
# show boot-time messages
|
76
|
+
sed -i'' -e's/ rhgb quiet//' /boot/grub/grub.conf
|
77
|
+
|
78
|
+
%end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# Installing the virtualbox guest additions
|
2
|
-
VBOX_VERSION=$(cat /home/
|
2
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
3
3
|
cd /tmp
|
4
|
-
mount -o loop /home/
|
4
|
+
mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
5
5
|
sh /mnt/VBoxLinuxAdditions.run
|
6
6
|
umount /mnt
|
7
|
-
rm -rf /home/
|
7
|
+
rm -rf /home/vagrant/VBoxGuestAdditions_*.iso
|
8
8
|
|
@@ -10,5 +10,5 @@ enabled=1
|
|
10
10
|
gpgcheck=0
|
11
11
|
EOM
|
12
12
|
|
13
|
-
yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl wget
|
13
|
+
yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl wget dkms
|
14
14
|
|
@@ -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 dkms
|
14
|
+
|
@@ -0,0 +1,40 @@
|
|
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-netinstall.iso",
|
9
|
+
:iso_src => "http://www.mirrorservice.org/sites/mirror.centos.org/6.3/isos/x86_64/CentOS-6.3-x86_64-netinstall.iso",
|
10
|
+
:iso_md5 => "690138908de516b6e5d7d180d085c3f3",
|
11
|
+
:iso_download_timeout => 1000,
|
12
|
+
:boot_wait => "15",
|
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
|
+
"zerodisk.sh"
|
38
|
+
],
|
39
|
+
:postinstall_timeout => 10000
|
40
|
+
})
|
@@ -0,0 +1,41 @@
|
|
1
|
+
install
|
2
|
+
url --url=http://www.mirrorservice.org/sites/mirror.centos.org/6.3/os/x86_64/
|
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
|
@@ -0,0 +1,18 @@
|
|
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 -pm 700 /home/vagrant/.ssh
|
13
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
|
14
|
+
chmod 0600 /home/vagrant/.ssh/authorized_keys
|
15
|
+
chown -R vagrant /home/vagrant/.ssh
|
16
|
+
|
17
|
+
# Customize the message of the day
|
18
|
+
echo 'Welcome to your Vagrant-built virtual machine.' > /etc/motd
|