veewee 0.5.0.alpha1 → 0.5.0.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile +1 -1
- data/lib/veewee/provider/core/helper/iso.rb +9 -5
- data/lib/veewee/version.rb +1 -1
- data/templates/{CentOS-5.10-i386-netboot → CentOS-5.10}/base.sh +0 -0
- data/templates/CentOS-5.10/centos_32_dvd.yml +5 -0
- data/templates/CentOS-5.10/centos_32_net.yml +5 -0
- data/templates/CentOS-5.10/centos_64_dvd.yml +5 -0
- data/templates/CentOS-5.10/centos_64_net.yml +5 -0
- data/templates/{CentOS-5.10-i386-netboot → CentOS-5.10}/chef.sh +0 -0
- data/templates/{CentOS-5.10-i386-netboot → CentOS-5.10}/cleanup.sh +0 -0
- data/templates/CentOS-5.10/definition.rb +5 -0
- data/templates/CentOS-5.10/definition.yml +35 -0
- data/templates/{CentOS-5.10-x86_64-netboot → CentOS-5.10}/ks.cfg +6 -0
- data/templates/{CentOS-5.10-i386-netboot → CentOS-5.10}/puppet.sh +0 -0
- data/templates/{CentOS-5.10-i386-netboot → CentOS-5.10}/ruby.sh +0 -0
- data/templates/{CentOS-5.10-i386-netboot → CentOS-5.10}/vagrant.sh +0 -0
- data/templates/{CentOS-5.10-i386-netboot → CentOS-5.10}/virtualbox.sh +0 -0
- data/templates/{CentOS-5.10-i386-netboot → CentOS-5.10}/zerodisk.sh +0 -0
- data/templates/Debian-5.0.10-amd64-netboot/base.sh +1 -1
- data/templates/Debian-5.0.10-amd64-netboot/vagrant.sh +1 -1
- data/templates/Debian-5.0.10-i386-netboot/base.sh +1 -1
- data/templates/Debian-5.0.10-i386-netboot/vagrant.sh +1 -1
- data/templates/Debian-5.0.8-amd64-netboot/base.sh +1 -1
- data/templates/Debian-5.0.8-amd64-netboot/vagrant.sh +1 -1
- data/templates/Debian-5.0.8-i386-netboot/base.sh +1 -1
- data/templates/Debian-5.0.8-i386-netboot/vagrant.sh +1 -1
- data/templates/Debian-6.0.6-amd64-netboot/base.sh +1 -1
- data/templates/Debian-7.0-amd64-netboot/base.sh +1 -1
- data/templates/Debian-7.0-i386-netboot/base.sh +1 -1
- data/templates/Debian-7.1.0-amd64-netboot/base.sh +1 -1
- data/templates/Debian-7.1.0-i386-netboot/base.sh +1 -1
- data/templates/Debian-7.2.0-amd64-netboot/base.sh +1 -1
- data/templates/Debian-7.2.0-i386-netboot/base.sh +1 -1
- data/templates/Debian-7.3.0-amd64-netboot/base.sh +1 -1
- data/templates/Debian-7.3.0-i386-netboot/base.sh +1 -1
- data/templates/Debian-7.4.0-amd64-netboot/base.sh +1 -1
- data/templates/Debian-7.4.0-i386-netboot/base.sh +1 -1
- data/templates/Debian-7.5.0-amd64-netboot/base.sh +1 -1
- data/templates/Debian-7.5.0-i386-netboot/base.sh +1 -1
- data/templates/Debian-7.6.0-amd64-netboot/base.sh +1 -1
- data/templates/Debian-7.6.0-i386-netboot/base.sh +1 -1
- data/templates/Debian-7.7.0-amd64-netboot/base.sh +25 -0
- data/templates/Debian-7.7.0-amd64-netboot/chef.sh +49 -0
- data/templates/Debian-7.7.0-amd64-netboot/cleanup.sh +18 -0
- data/templates/Debian-7.7.0-amd64-netboot/definition.rb +52 -0
- data/templates/Debian-7.7.0-amd64-netboot/preseed.cfg +313 -0
- data/templates/Debian-7.7.0-amd64-netboot/puppet.sh +7 -0
- data/templates/Debian-7.7.0-amd64-netboot/ruby.sh +10 -0
- data/templates/Debian-7.7.0-amd64-netboot/vagrant.sh +21 -0
- data/templates/Debian-7.7.0-amd64-netboot/virtualbox.sh +37 -0
- data/templates/Debian-7.7.0-amd64-netboot/vmfusion.sh +7 -0
- data/templates/{CentOS-5.10-i386 → Debian-7.7.0-amd64-netboot}/zerodisk.sh +0 -1
- data/templates/kali-1.0.9a-amd64/base.sh +1 -1
- data/templates/ubuntu-12.04.2-server-amd64/base.sh +1 -1
- data/templates/ubuntu-12.04.3-server-amd64-parallels/base.sh +1 -1
- data/templates/ubuntu-12.04.3-server-amd64/base.sh +1 -1
- data/test/build_realtest.rb +3 -3
- data/test/definitions/erb_definition/autorun0.erb +8 -0
- data/test/definitions/erb_definition/definition.rb +24 -0
- data/test/veewee/provider/core/helper/web_test.rb +30 -0
- metadata +31 -42
- data/templates/CentOS-5.10-i386-netboot/definition.rb +0 -42
- data/templates/CentOS-5.10-i386-netboot/ks.cfg +0 -27
- data/templates/CentOS-5.10-i386/base.sh +0 -8
- data/templates/CentOS-5.10-i386/chef.sh +0 -3
- data/templates/CentOS-5.10-i386/cleanup.sh +0 -11
- data/templates/CentOS-5.10-i386/definition.rb +0 -42
- data/templates/CentOS-5.10-i386/ks.cfg +0 -27
- data/templates/CentOS-5.10-i386/puppet.sh +0 -17
- data/templates/CentOS-5.10-i386/ruby.sh +0 -41
- data/templates/CentOS-5.10-i386/vagrant.sh +0 -9
- data/templates/CentOS-5.10-i386/virtualbox.sh +0 -9
- data/templates/CentOS-5.10-x86_64-netboot/base.sh +0 -8
- data/templates/CentOS-5.10-x86_64-netboot/chef.sh +0 -3
- data/templates/CentOS-5.10-x86_64-netboot/cleanup.sh +0 -11
- data/templates/CentOS-5.10-x86_64-netboot/definition.rb +0 -42
- data/templates/CentOS-5.10-x86_64-netboot/puppet.sh +0 -17
- data/templates/CentOS-5.10-x86_64-netboot/ruby.sh +0 -41
- data/templates/CentOS-5.10-x86_64-netboot/vagrant.sh +0 -9
- data/templates/CentOS-5.10-x86_64-netboot/virtualbox.sh +0 -9
- data/templates/CentOS-5.10-x86_64-netboot/zerodisk.sh +0 -4
- data/templates/CentOS-5.10-x86_64/base.sh +0 -8
- data/templates/CentOS-5.10-x86_64/chef.sh +0 -3
- data/templates/CentOS-5.10-x86_64/cleanup.sh +0 -11
- data/templates/CentOS-5.10-x86_64/definition.rb +0 -42
- data/templates/CentOS-5.10-x86_64/ks.cfg +0 -27
- data/templates/CentOS-5.10-x86_64/puppet.sh +0 -17
- data/templates/CentOS-5.10-x86_64/ruby.sh +0 -41
- data/templates/CentOS-5.10-x86_64/vagrant.sh +0 -9
- data/templates/CentOS-5.10-x86_64/virtualbox.sh +0 -9
- data/templates/CentOS-5.10-x86_64/zerodisk.sh +0 -4
@@ -6,7 +6,7 @@ apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev libya
|
|
6
6
|
apt-get -y install curl unzip vim
|
7
7
|
|
8
8
|
# Set up sudo
|
9
|
-
echo 'vagrant ALL=NOPASSWD:ALL' > /etc/sudoers.d/vagrant
|
9
|
+
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vagrant
|
10
10
|
|
11
11
|
# Tweak sshd to prevent DNS resolution (speed up logins)
|
12
12
|
echo 'UseDNS no' >> /etc/ssh/sshd_config
|
data/test/build_realtest.rb
CHANGED
@@ -40,15 +40,15 @@ class TestVeeweeBuild < Test::Unit::TestCase
|
|
40
40
|
assert_match(/bla/,result.stdout)
|
41
41
|
}
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
# Are there as many disks as in disk_count?
|
45
45
|
def test_box_4_check_disk_count
|
46
|
-
assert_nothing_raised {
|
46
|
+
assert_nothing_raised {
|
47
47
|
result=@box.exec("lsblk -lo MODEL|grep -i harddisk|wc -l")
|
48
48
|
assert_match(/#{@box.definition.disk_count}/,result.stdout)
|
49
49
|
}
|
50
50
|
end
|
51
|
-
|
51
|
+
|
52
52
|
|
53
53
|
# Try shutdown
|
54
54
|
def test_box_5_shutdown
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Veewee::Definition.declare({
|
2
|
+
:cpu_count => '1', :memory_size=> '512',
|
3
|
+
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
|
4
|
+
:os_type_id => 'Linux26',
|
5
|
+
:iso_file => "systemrescuecd-x86-2.3.1.iso",
|
6
|
+
:iso_src => "http://downloads.sourceforge.net/project/systemrescuecd/sysresccd-x86/2.3.1/systemrescuecd-x86-2.3.1.iso",
|
7
|
+
:iso_md5 => "8813aa38506f6e6be1c02e871eb898ca",
|
8
|
+
#:iso_file => "systemrescuecd-x86-2.0.0.iso",
|
9
|
+
#:iso_src => "http://downloads.sourceforge.net/project/systemrescuecd/sysresccd-x86/2.0.0/systemrescuecd-x86-2.0.0.iso",
|
10
|
+
#:iso_md5 => "51012e0bb943cff6367e5cea3a61cdbe",
|
11
|
+
:iso_download_timeout => "1000",
|
12
|
+
:boot_wait => "10", :boot_cmd_sequence => [
|
13
|
+
'<Tab> raid=noautodetect setkmap=us dodhcp=eth0 fastboot dhcphostname=%NAME% rootpass=vagrant ar_source=http://%IP%:%PORT%/ autoruns=0 ar_nowait dns=127.0.0.1 nomodeset nodetect nodmraid nomadm edd=off quiet nosata nosound nosmp nohotplug acpi=off noresume load=eth1000 nonet noload=ipv6,floppy,md,raid10,raid456,raid1,raid0,multipath,linear,i2c_piix4,i2c_core,udev scandelay=0 nousb<Enter>'
|
14
|
+
],
|
15
|
+
:kickstart_port => "7122", :kickstart_timeout => "10000",
|
16
|
+
:kickstart_file => "autorun0.erb",
|
17
|
+
|
18
|
+
:ssh_login_timeout => "10000", :ssh_user => "root", :ssh_password => "vagrant", :ssh_key => "",
|
19
|
+
:ssh_host_port => "7222", :ssh_guest_port => "22",
|
20
|
+
:sudo_cmd => "sh '%f'",
|
21
|
+
:shutdown_cmd => "shutdown -h -H now",
|
22
|
+
:postinstall_files => ["_disabled_postinstall.sh", "enabled_postinstall.sh" ],
|
23
|
+
:postinstall_timeout => "10000"
|
24
|
+
})
|
@@ -0,0 +1,30 @@
|
|
1
|
+
`VBoxManage -v` rescue nil
|
2
|
+
if $?.success?
|
3
|
+
|
4
|
+
require 'test/unit'
|
5
|
+
require 'veewee'
|
6
|
+
|
7
|
+
class TestVeeweeBuild < Test::Unit::TestCase
|
8
|
+
def setup
|
9
|
+
@definition_dir = File.expand_path("../../../../../definitions", __FILE__)
|
10
|
+
@definition_name = "erb_definition"
|
11
|
+
ve = Veewee::Environment.new({ :definition_dir => @definition_dir })
|
12
|
+
@box = ve.providers["virtualbox"].get_box(@definition_name)
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_box_1_build
|
16
|
+
assert_equal(
|
17
|
+
"\
|
18
|
+
#!/bin/bash
|
19
|
+
|
20
|
+
echo \"Testing one Linux26\"
|
21
|
+
|
22
|
+
echo DVD
|
23
|
+
|
24
|
+
",
|
25
|
+
@box.send(:read_content, File.join(@definition_dir, @definition_name, "autorun0.erb"))
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: veewee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.0.
|
4
|
+
version: 0.5.0.alpha2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Debois
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -503,46 +503,21 @@ files:
|
|
503
503
|
- templates/CentOS-4.8-i386/definition.rb
|
504
504
|
- templates/CentOS-4.8-i386/ks.cfg
|
505
505
|
- templates/CentOS-4.8-i386/postinstall.sh
|
506
|
-
- templates/CentOS-5.10
|
507
|
-
- templates/CentOS-5.10
|
508
|
-
- templates/CentOS-5.10
|
509
|
-
- templates/CentOS-5.10
|
510
|
-
- templates/CentOS-5.10
|
511
|
-
- templates/CentOS-5.10
|
512
|
-
- templates/CentOS-5.10
|
513
|
-
- templates/CentOS-5.10
|
514
|
-
- templates/CentOS-5.10
|
515
|
-
- templates/CentOS-5.10
|
516
|
-
- templates/CentOS-5.10
|
517
|
-
- templates/CentOS-5.10
|
518
|
-
- templates/CentOS-5.10
|
519
|
-
- templates/CentOS-5.10
|
520
|
-
- templates/CentOS-5.10
|
521
|
-
- templates/CentOS-5.10-i386/puppet.sh
|
522
|
-
- templates/CentOS-5.10-i386/ruby.sh
|
523
|
-
- templates/CentOS-5.10-i386/vagrant.sh
|
524
|
-
- templates/CentOS-5.10-i386/virtualbox.sh
|
525
|
-
- templates/CentOS-5.10-i386/zerodisk.sh
|
526
|
-
- templates/CentOS-5.10-x86_64-netboot/base.sh
|
527
|
-
- templates/CentOS-5.10-x86_64-netboot/chef.sh
|
528
|
-
- templates/CentOS-5.10-x86_64-netboot/cleanup.sh
|
529
|
-
- templates/CentOS-5.10-x86_64-netboot/definition.rb
|
530
|
-
- templates/CentOS-5.10-x86_64-netboot/ks.cfg
|
531
|
-
- templates/CentOS-5.10-x86_64-netboot/puppet.sh
|
532
|
-
- templates/CentOS-5.10-x86_64-netboot/ruby.sh
|
533
|
-
- templates/CentOS-5.10-x86_64-netboot/vagrant.sh
|
534
|
-
- templates/CentOS-5.10-x86_64-netboot/virtualbox.sh
|
535
|
-
- templates/CentOS-5.10-x86_64-netboot/zerodisk.sh
|
536
|
-
- templates/CentOS-5.10-x86_64/base.sh
|
537
|
-
- templates/CentOS-5.10-x86_64/chef.sh
|
538
|
-
- templates/CentOS-5.10-x86_64/cleanup.sh
|
539
|
-
- templates/CentOS-5.10-x86_64/definition.rb
|
540
|
-
- templates/CentOS-5.10-x86_64/ks.cfg
|
541
|
-
- templates/CentOS-5.10-x86_64/puppet.sh
|
542
|
-
- templates/CentOS-5.10-x86_64/ruby.sh
|
543
|
-
- templates/CentOS-5.10-x86_64/vagrant.sh
|
544
|
-
- templates/CentOS-5.10-x86_64/virtualbox.sh
|
545
|
-
- templates/CentOS-5.10-x86_64/zerodisk.sh
|
506
|
+
- templates/CentOS-5.10/base.sh
|
507
|
+
- templates/CentOS-5.10/centos_32_dvd.yml
|
508
|
+
- templates/CentOS-5.10/centos_32_net.yml
|
509
|
+
- templates/CentOS-5.10/centos_64_dvd.yml
|
510
|
+
- templates/CentOS-5.10/centos_64_net.yml
|
511
|
+
- templates/CentOS-5.10/chef.sh
|
512
|
+
- templates/CentOS-5.10/cleanup.sh
|
513
|
+
- templates/CentOS-5.10/definition.rb
|
514
|
+
- templates/CentOS-5.10/definition.yml
|
515
|
+
- templates/CentOS-5.10/ks.cfg
|
516
|
+
- templates/CentOS-5.10/puppet.sh
|
517
|
+
- templates/CentOS-5.10/ruby.sh
|
518
|
+
- templates/CentOS-5.10/vagrant.sh
|
519
|
+
- templates/CentOS-5.10/virtualbox.sh
|
520
|
+
- templates/CentOS-5.10/zerodisk.sh
|
546
521
|
- templates/CentOS-5.5-i386-netboot/definition.rb
|
547
522
|
- templates/CentOS-5.5-i386-netboot/ks.cfg
|
548
523
|
- templates/CentOS-5.5-i386-netboot/postinstall.sh
|
@@ -1238,6 +1213,17 @@ files:
|
|
1238
1213
|
- templates/Debian-7.6.0-i386-netboot/virtualbox.sh
|
1239
1214
|
- templates/Debian-7.6.0-i386-netboot/vmfusion.sh
|
1240
1215
|
- templates/Debian-7.6.0-i386-netboot/zerodisk.sh
|
1216
|
+
- templates/Debian-7.7.0-amd64-netboot/base.sh
|
1217
|
+
- templates/Debian-7.7.0-amd64-netboot/chef.sh
|
1218
|
+
- templates/Debian-7.7.0-amd64-netboot/cleanup.sh
|
1219
|
+
- templates/Debian-7.7.0-amd64-netboot/definition.rb
|
1220
|
+
- templates/Debian-7.7.0-amd64-netboot/preseed.cfg
|
1221
|
+
- templates/Debian-7.7.0-amd64-netboot/puppet.sh
|
1222
|
+
- templates/Debian-7.7.0-amd64-netboot/ruby.sh
|
1223
|
+
- templates/Debian-7.7.0-amd64-netboot/vagrant.sh
|
1224
|
+
- templates/Debian-7.7.0-amd64-netboot/virtualbox.sh
|
1225
|
+
- templates/Debian-7.7.0-amd64-netboot/vmfusion.sh
|
1226
|
+
- templates/Debian-7.7.0-amd64-netboot/zerodisk.sh
|
1241
1227
|
- templates/Fedora-14-amd64-netboot/definition.rb
|
1242
1228
|
- templates/Fedora-14-amd64-netboot/ks.cfg
|
1243
1229
|
- templates/Fedora-14-amd64-netboot/postinstall.sh
|
@@ -2356,11 +2342,14 @@ files:
|
|
2356
2342
|
- templates/windows-8-preview-amd64/winrm.rb
|
2357
2343
|
- test/build_realtest.rb
|
2358
2344
|
- test/definition_test.rb
|
2345
|
+
- test/definitions/erb_definition/autorun0.erb
|
2346
|
+
- test/definitions/erb_definition/definition.rb
|
2359
2347
|
- test/definitions/test_definition/_disabled_postinstall.sh
|
2360
2348
|
- test/definitions/test_definition/autorun0
|
2361
2349
|
- test/definitions/test_definition/definition.rb
|
2362
2350
|
- test/definitions/test_definition/enabled_postinstall.sh
|
2363
2351
|
- test/environment_test.rb
|
2352
|
+
- test/veewee/provider/core/helper/web_test.rb
|
2364
2353
|
- test/veewee/provider/virtualbox/box/helper/guest_additions_test.rb
|
2365
2354
|
- test/veewee/provider/virtualbox/box/helper/version.rb
|
2366
2355
|
- validation/vagrant-private.key
|
@@ -1,42 +0,0 @@
|
|
1
|
-
Veewee::Session.declare({
|
2
|
-
:cpu_count => '1',
|
3
|
-
:memory_size=> '384',
|
4
|
-
:disk_size => '10140',
|
5
|
-
:disk_format => 'VDI',
|
6
|
-
:hostiocache => 'on',
|
7
|
-
:virtualbox => {
|
8
|
-
:vm_options => [
|
9
|
-
"pae" => "on",
|
10
|
-
"ioapic" => "on",
|
11
|
-
],
|
12
|
-
},
|
13
|
-
:os_type_id => 'RedHat',
|
14
|
-
:iso_file => "CentOS-5.10-i386-netinstall.iso",
|
15
|
-
:iso_src => "http://mirrors.kernel.org/centos/5.10/isos/i386/CentOS-5.10-i386-netinstall.iso",
|
16
|
-
:iso_md5 => "8d19b12cb5f65a4b5c2bc61a98abf80c",
|
17
|
-
:iso_download_timeout => 1000,
|
18
|
-
:boot_wait => "10",
|
19
|
-
:boot_cmd_sequence => [ 'linux text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
|
20
|
-
:kickstart_port => "7122",
|
21
|
-
:kickstart_timeout => 300,
|
22
|
-
:kickstart_file => "ks.cfg",
|
23
|
-
:ssh_login_timeout => "10000",
|
24
|
-
:ssh_user => "vagrant",
|
25
|
-
:ssh_password => "vagrant",
|
26
|
-
:ssh_key => "",
|
27
|
-
:ssh_host_port => "7222",
|
28
|
-
:ssh_guest_port => "22",
|
29
|
-
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
30
|
-
:shutdown_cmd => "/sbin/halt -h -p",
|
31
|
-
:postinstall_files => [
|
32
|
-
"base.sh",
|
33
|
-
"ruby.sh",
|
34
|
-
"chef.sh",
|
35
|
-
"puppet.sh",
|
36
|
-
"vagrant.sh",
|
37
|
-
"virtualbox.sh",
|
38
|
-
"cleanup.sh",
|
39
|
-
"zerodisk.sh"
|
40
|
-
],
|
41
|
-
:postinstall_timeout => 10000
|
42
|
-
})
|
@@ -1,27 +0,0 @@
|
|
1
|
-
install
|
2
|
-
url --url=http://mirrors.kernel.org/centos/5.10/os/i386/
|
3
|
-
lang en_US.UTF-8
|
4
|
-
langsupport --default=en_US.UTF-8 en_US.UTF-8
|
5
|
-
keyboard us
|
6
|
-
text
|
7
|
-
skipx
|
8
|
-
zerombr
|
9
|
-
network --device eth0 --bootproto dhcp
|
10
|
-
rootpw vagrant
|
11
|
-
firewall --enabled --trust eth0 --ssh
|
12
|
-
selinux --disabled
|
13
|
-
authconfig --enableshadow --enablemd5
|
14
|
-
timezone America/New_York
|
15
|
-
bootloader --location=mbr
|
16
|
-
clearpart --all --initlabel
|
17
|
-
autopart
|
18
|
-
reboot
|
19
|
-
|
20
|
-
%packages
|
21
|
-
@ core
|
22
|
-
%post
|
23
|
-
/usr/sbin/groupadd vagrant
|
24
|
-
/usr/sbin/useradd vagrant -g vagrant -G wheel
|
25
|
-
echo "vagrant"|passwd --stdin vagrant
|
26
|
-
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
27
|
-
%end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Base install
|
2
|
-
|
3
|
-
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
|
4
|
-
sed -i "s/^\(.*env_keep = \"\)/\1PATH /" /etc/sudoers
|
5
|
-
|
6
|
-
yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl wget dkms bzip2
|
7
|
-
|
8
|
-
yum -y erase gtk2 libX11 hicolor-icon-theme freetype bitstream-vera-fonts
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# Clean up
|
2
|
-
|
3
|
-
yum -y clean all
|
4
|
-
rm -rf /etc/yum.repos.d/puppetlabs.repo
|
5
|
-
rm -rf VBoxGuestAdditions_*.iso
|
6
|
-
|
7
|
-
# Remove mac address from network configuration
|
8
|
-
sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0
|
9
|
-
|
10
|
-
# Remove DHCP leases
|
11
|
-
rm /var/lib/dhclient/*.leases
|
@@ -1,42 +0,0 @@
|
|
1
|
-
Veewee::Session.declare({
|
2
|
-
:cpu_count => '1',
|
3
|
-
:memory_size=> '384',
|
4
|
-
:disk_size => '10140',
|
5
|
-
:disk_format => 'VDI',
|
6
|
-
:hostiocache => 'on',
|
7
|
-
:virtualbox => {
|
8
|
-
:vm_options => [
|
9
|
-
"pae" => "on",
|
10
|
-
"ioapic" => "on",
|
11
|
-
],
|
12
|
-
},
|
13
|
-
:os_type_id => 'RedHat',
|
14
|
-
:iso_file => "CentOS-5.10-i386-bin-DVD-1of2.iso",
|
15
|
-
:iso_src => "http://mirrors.kernel.org/centos/5.10/isos/i386/CentOS-5.10-i386-bin-DVD-1of2.iso",
|
16
|
-
:iso_md5 => "ec0acc2a4f6a813ea85bf1e36acb03f0",
|
17
|
-
:iso_download_timeout => 1000,
|
18
|
-
:boot_wait => "10",
|
19
|
-
:boot_cmd_sequence => [ 'linux text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
|
20
|
-
:kickstart_port => "7122",
|
21
|
-
:kickstart_timeout => 300,
|
22
|
-
:kickstart_file => "ks.cfg",
|
23
|
-
:ssh_login_timeout => "10000",
|
24
|
-
:ssh_user => "vagrant",
|
25
|
-
:ssh_password => "vagrant",
|
26
|
-
:ssh_key => "",
|
27
|
-
:ssh_host_port => "7222",
|
28
|
-
:ssh_guest_port => "22",
|
29
|
-
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
30
|
-
:shutdown_cmd => "/sbin/halt -h -p",
|
31
|
-
:postinstall_files => [
|
32
|
-
"base.sh",
|
33
|
-
"ruby.sh",
|
34
|
-
"chef.sh",
|
35
|
-
"puppet.sh",
|
36
|
-
"vagrant.sh",
|
37
|
-
"virtualbox.sh",
|
38
|
-
"cleanup.sh",
|
39
|
-
"zerodisk.sh"
|
40
|
-
],
|
41
|
-
:postinstall_timeout => 10000
|
42
|
-
})
|
@@ -1,27 +0,0 @@
|
|
1
|
-
install
|
2
|
-
cdrom
|
3
|
-
lang en_US.UTF-8
|
4
|
-
langsupport --default=en_US.UTF-8 en_US.UTF-8
|
5
|
-
keyboard us
|
6
|
-
text
|
7
|
-
skipx
|
8
|
-
zerombr
|
9
|
-
network --device eth0 --bootproto dhcp
|
10
|
-
rootpw vagrant
|
11
|
-
firewall --enabled --trust eth0 --ssh
|
12
|
-
selinux --disabled
|
13
|
-
authconfig --enableshadow --enablemd5
|
14
|
-
timezone America/New_York
|
15
|
-
bootloader --location=mbr
|
16
|
-
clearpart --all --initlabel
|
17
|
-
autopart
|
18
|
-
reboot
|
19
|
-
|
20
|
-
%packages
|
21
|
-
@ core
|
22
|
-
%post
|
23
|
-
/usr/sbin/groupadd vagrant
|
24
|
-
/usr/sbin/useradd vagrant -g vagrant -G wheel
|
25
|
-
echo "vagrant"|passwd --stdin vagrant
|
26
|
-
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
27
|
-
%end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# Install Puppet
|
2
|
-
|
3
|
-
cat > /etc/yum.repos.d/puppetlabs.repo << EOM
|
4
|
-
[puppetlabs-dependencies]
|
5
|
-
name=puppetlabdsdependencies
|
6
|
-
baseurl=http://yum.puppetlabs.com/el/5/dependencies/\$basearch
|
7
|
-
enabled=1
|
8
|
-
gpgcheck=0
|
9
|
-
|
10
|
-
[puppetlabs]
|
11
|
-
name=puppetlabs
|
12
|
-
baseurl=http://yum.puppetlabs.com/el/5/products/\$basearch
|
13
|
-
enabled=1
|
14
|
-
gpgcheck=0
|
15
|
-
EOM
|
16
|
-
|
17
|
-
yum -y install puppet facter ruby-shadow
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# Install Ruby from sources
|
2
|
-
|
3
|
-
# add epel repo for Ruby compile time dependencies
|
4
|
-
cat > /etc/yum.repos.d/epel.repo << EOM
|
5
|
-
[epel]
|
6
|
-
name=epel
|
7
|
-
baseurl=http://download.fedoraproject.org/pub/epel/5/\$basearch
|
8
|
-
enabled=1
|
9
|
-
gpgcheck=0
|
10
|
-
includepkgs=libffi*
|
11
|
-
EOM
|
12
|
-
|
13
|
-
# Install required library packages
|
14
|
-
yum install -y gdbm-devel libffi-devel ncurses-devel
|
15
|
-
|
16
|
-
# Install LibYAML (prerequisite for Ruby)
|
17
|
-
YAML_VERSION=0.1.4
|
18
|
-
wget http://pyyaml.org/download/libyaml/yaml-$YAML_VERSION.tar.gz
|
19
|
-
tar xzvf yaml-$YAML_VERSION.tar.gz
|
20
|
-
cd yaml-$YAML_VERSION
|
21
|
-
./configure --prefix=/opt
|
22
|
-
make && make install
|
23
|
-
cd ..
|
24
|
-
rm -rf yaml-$YAML_VERSION
|
25
|
-
rm -f yaml-$YAML_VERSION.tar.gz
|
26
|
-
|
27
|
-
# Install Ruby
|
28
|
-
RUBY_VERSION=1.9.3-p484
|
29
|
-
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-$RUBY_VERSION.tar.gz
|
30
|
-
tar xvzf ruby-$RUBY_VERSION.tar.gz
|
31
|
-
cd ruby-$RUBY_VERSION
|
32
|
-
# Fix: BSD compatibility arguments not supported by the installed version of sed
|
33
|
-
sed -i "s/sed -E/sed -e/" configure
|
34
|
-
./configure --prefix=/opt/ruby --disable-install-doc --with-opt-dir=/opt
|
35
|
-
make && make install
|
36
|
-
cd ..
|
37
|
-
rm -rf ruby-$RUBY_VERSION
|
38
|
-
rm -f ruby-$RUBY_VERSION.tar.gz
|
39
|
-
|
40
|
-
# remove epel repo
|
41
|
-
rm -rf /etc/yum.repos.d/epel.repo
|