vbox 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +14 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +68 -0
- data/README.md +5 -0
- data/Rakefile +91 -0
- data/bin/vbox +73 -0
- data/lib/java/README.txt +5 -0
- data/lib/java/dir2floppy.jar +0 -0
- data/lib/java/dir2floppy.java +134 -0
- data/lib/vagrant_init.rb +6 -0
- data/lib/vbox.rb +2 -0
- data/lib/vbox/command.rb +82 -0
- data/lib/vbox/config.rb +5 -0
- data/lib/vbox/export.rb +65 -0
- data/lib/vbox/scancode.rb +208 -0
- data/lib/vbox/session.rb +893 -0
- data/lib/vbox/shell.rb +54 -0
- data/lib/vbox/ssh.rb +193 -0
- data/lib/vbox/transaction.rb +122 -0
- data/lib/vbox/utils.rb +26 -0
- data/lib/vbox/version.rb +3 -0
- data/lib/vbox/web.rb +48 -0
- data/templates/CentOS-5.7-i386-netboot/definition.rb +16 -0
- data/templates/CentOS-5.7-i386-netboot/ks.cfg +45 -0
- data/templates/CentOS-5.7-i386-netboot/postinstall.sh +53 -0
- data/templates/CentOS-5.7-x86_64-netboot/definition.rb +16 -0
- data/templates/CentOS-5.7-x86_64-netboot/ks.cfg +45 -0
- data/templates/CentOS-5.7-x86_64-netboot/postinstall.sh +60 -0
- data/templates/CentOS-6.0-i386-netboot/definition.rb +16 -0
- data/templates/CentOS-6.0-i386-netboot/ks.cfg +52 -0
- data/templates/CentOS-6.0-i386-netboot/postinstall.sh +30 -0
- data/templates/CentOS-6.0-i386/definition.rb +17 -0
- data/templates/CentOS-6.0-i386/ks.cfg +47 -0
- data/templates/CentOS-6.0-i386/postinstall.sh +48 -0
- data/templates/CentOS-6.0-x86_64-netboot/definition.rb +16 -0
- data/templates/CentOS-6.0-x86_64-netboot/ks.cfg +52 -0
- data/templates/CentOS-6.0-x86_64-netboot/postinstall.sh +30 -0
- data/templates/CentOS-6.0-x86_64/definition.rb +17 -0
- data/templates/CentOS-6.0-x86_64/ks.cfg +47 -0
- data/templates/CentOS-6.0-x86_64/postinstall.sh +48 -0
- data/templates/Debian-6.0.3-amd64-netboot/definition.rb +42 -0
- data/templates/Debian-6.0.3-amd64-netboot/postinstall.sh +80 -0
- data/templates/Debian-6.0.3-amd64-netboot/preseed.cfg +42 -0
- data/templates/Debian-6.0.3-i386-netboot/definition.rb +44 -0
- data/templates/Debian-6.0.3-i386-netboot/postinstall.sh +80 -0
- data/templates/Debian-6.0.3-i386-netboot/preseed.cfg +42 -0
- data/templates/Fedora-15-i386-netboot/definition.rb +17 -0
- data/templates/Fedora-15-i386-netboot/ks.cfg +82 -0
- data/templates/Fedora-15-i386-netboot/postinstall.sh +18 -0
- data/templates/Fedora-15-i386/definition.rb +17 -0
- data/templates/Fedora-15-i386/ks.cfg +64 -0
- data/templates/Fedora-15-i386/postinstall.sh +33 -0
- data/templates/Fedora-15-x86_64-netboot/definition.rb +29 -0
- data/templates/Fedora-15-x86_64-netboot/ks.cfg +64 -0
- data/templates/Fedora-15-x86_64-netboot/postinstall.sh +33 -0
- data/templates/Fedora-15-x86_64/definition.rb +17 -0
- data/templates/Fedora-15-x86_64/ks.cfg +64 -0
- data/templates/Fedora-15-x86_64/postinstall.sh +33 -0
- data/templates/Sysrescuecd-2.0.0-experimental/autorun0 +3 -0
- data/templates/Sysrescuecd-2.0.0-experimental/definition.rb +20 -0
- data/templates/archlinux-i386-netboot/aif.cfg +34 -0
- data/templates/archlinux-i386-netboot/definition.rb +29 -0
- data/templates/archlinux-i386-netboot/postinstall.sh +87 -0
- data/templates/archlinux-i386-netboot/postinstall2.sh +28 -0
- data/templates/archlinux-i386/aif.cfg +33 -0
- data/templates/archlinux-i386/definition.rb +29 -0
- data/templates/archlinux-i386/postinstall.sh +106 -0
- data/templates/archlinux-x86_64-netboot/aif.cfg +34 -0
- data/templates/archlinux-x86_64-netboot/definition.rb +29 -0
- data/templates/archlinux-x86_64-netboot/postinstall.sh +90 -0
- data/templates/archlinux-x86_64-netboot/postinstall2.sh +28 -0
- data/templates/archlinux-x86_64/aif.cfg +33 -0
- data/templates/archlinux-x86_64/definition.rb +29 -0
- data/templates/archlinux-x86_64/postinstall.sh +90 -0
- data/templates/archlinux-x86_64/postinstall2.sh +38 -0
- data/templates/freebsd-8.2-experimental/definition.rb +19 -0
- data/templates/freebsd-8.2-experimental/postinstall.sh +191 -0
- data/templates/freebsd-8.2-pcbsd-i386-netboot/definition.rb +35 -0
- data/templates/freebsd-8.2-pcbsd-i386-netboot/pcinstall.fbg.cfg +58 -0
- data/templates/freebsd-8.2-pcbsd-i386-netboot/postinstall.sh +93 -0
- data/templates/freebsd-8.2-pcbsd-i386/definition.rb +31 -0
- data/templates/freebsd-8.2-pcbsd-i386/pcinstall.fbg.cfg +57 -0
- data/templates/freebsd-8.2-pcbsd-i386/postinstall.sh +93 -0
- data/templates/gentoo-latest-i386-experimental/definition.rb +29 -0
- data/templates/gentoo-latest-i386-experimental/postinstall.sh +184 -0
- data/templates/openSUSE-11.4-DVD-i586/autoinst_de.xml +1284 -0
- data/templates/openSUSE-11.4-DVD-i586/autoinst_en.xml +1284 -0
- data/templates/openSUSE-11.4-DVD-i586/definition.rb +28 -0
- data/templates/openSUSE-11.4-DVD-i586/postinstall.sh +43 -0
- data/templates/openSUSE-11.4-DVD-x86_64/autoinst_de.xml +1459 -0
- data/templates/openSUSE-11.4-DVD-x86_64/autoinst_en.xml +1459 -0
- data/templates/openSUSE-11.4-DVD-x86_64/definition.rb +28 -0
- data/templates/openSUSE-11.4-DVD-x86_64/postinstall.sh +43 -0
- data/templates/openSUSE-11.4-NET-i586/autoinst_de.xml +1278 -0
- data/templates/openSUSE-11.4-NET-i586/autoinst_en.xml +1278 -0
- data/templates/openSUSE-11.4-NET-i586/definition.rb +28 -0
- data/templates/openSUSE-11.4-NET-i586/postinstall.sh +43 -0
- data/templates/openSUSE-11.4-NET-x86_64/autoinst_de.xml +1453 -0
- data/templates/openSUSE-11.4-NET-x86_64/autoinst_en.xml +1453 -0
- data/templates/openSUSE-11.4-NET-x86_64/definition.rb +28 -0
- data/templates/openSUSE-11.4-NET-x86_64/postinstall.sh +43 -0
- data/templates/solaris-11-express-i386/auto_install/ai.dtd +58 -0
- data/templates/solaris-11-express-i386/auto_install/ai_manifest.xml +241 -0
- data/templates/solaris-11-express-i386/auto_install/configuration.dtd +44 -0
- data/templates/solaris-11-express-i386/auto_install/default.xml +124 -0
- data/templates/solaris-11-express-i386/auto_install/default.xml.orig +124 -0
- data/templates/solaris-11-express-i386/auto_install/sc_profiles/static_network.xml +105 -0
- data/templates/solaris-11-express-i386/auto_install/software.dtd +105 -0
- data/templates/solaris-11-express-i386/auto_install/target.dtd +196 -0
- data/templates/solaris-11-express-i386/default.xml +121 -0
- data/templates/solaris-11-express-i386/definition.rb +65 -0
- data/templates/solaris-11-express-i386/postinstall.sh +98 -0
- data/templates/ubuntu-10.04.3-server-amd64/definition.rb +54 -0
- data/templates/ubuntu-10.04.3-server-amd64/postinstall.sh +90 -0
- data/templates/ubuntu-10.04.3-server-amd64/preseed.cfg +87 -0
- data/templates/ubuntu-10.04.3-server-i386/definition.rb +24 -0
- data/templates/ubuntu-10.04.3-server-i386/postinstall.sh +91 -0
- data/templates/ubuntu-10.04.3-server-i386/preseed.cfg +87 -0
- data/templates/ubuntu-11.10-server-amd64/definition.rb +35 -0
- data/templates/ubuntu-11.10-server-amd64/postinstall.sh +90 -0
- data/templates/ubuntu-11.10-server-amd64/preseed.cfg +87 -0
- data/templates/ubuntu-11.10-server-i386/definition.rb +35 -0
- data/templates/ubuntu-11.10-server-i386/postinstall.sh +90 -0
- data/templates/ubuntu-11.10-server-i386/preseed.cfg +87 -0
- data/validation/features/steps/ssh_steps.rb +169 -0
- data/validation/support/env.rb +1 -0
- data/validation/vagrant-private.key +27 -0
- data/validation/vagrant.feature +52 -0
- data/validation/vagrant.pub +1 -0
- data/vbox.gemspec +32 -0
- metadata +338 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
CDDL HEADER START
|
|
4
|
+
|
|
5
|
+
The contents of this file are subject to the terms of the
|
|
6
|
+
Common Development and Distribution License (the "License").
|
|
7
|
+
You may not use this file except in compliance with the License.
|
|
8
|
+
|
|
9
|
+
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
10
|
+
or http://www.opensolaris.org/os/licensing.
|
|
11
|
+
See the License for the specific language governing permissions
|
|
12
|
+
and limitations under the License.
|
|
13
|
+
|
|
14
|
+
When distributing Covered Code, include this CDDL HEADER in each
|
|
15
|
+
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
16
|
+
If applicable, add the following below this CDDL HEADER, with the
|
|
17
|
+
fields enclosed by brackets "[]" replaced with your own identifying
|
|
18
|
+
information: Portions Copyright [yyyy] [name of copyright owner]
|
|
19
|
+
|
|
20
|
+
CDDL HEADER END
|
|
21
|
+
|
|
22
|
+
Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
|
23
|
+
|
|
24
|
+
-->
|
|
25
|
+
<!DOCTYPE auto_install SYSTEM "file:///usr/share/auto_install/ai.dtd">
|
|
26
|
+
<auto_install>
|
|
27
|
+
<ai_instance name="default">
|
|
28
|
+
<software>
|
|
29
|
+
<source>
|
|
30
|
+
<publisher name="solaris">
|
|
31
|
+
<origin name="http://pkg.oracle.com/solaris/release"/>
|
|
32
|
+
</publisher>
|
|
33
|
+
</source>
|
|
34
|
+
<!--
|
|
35
|
+
By default the latest build available, in the specified IPS
|
|
36
|
+
repository, is installed. If another build is required, the
|
|
37
|
+
build number has to be appended to the 'entire' package in following
|
|
38
|
+
form:
|
|
39
|
+
|
|
40
|
+
<name>pkg:/entire@0.5.11-0.build#</name>
|
|
41
|
+
-->
|
|
42
|
+
<software_data action="install" type="IPS">
|
|
43
|
+
<name>pkg:/server_install</name>
|
|
44
|
+
<!--
|
|
45
|
+
The following packages are required by iSCSI and included
|
|
46
|
+
by default to make it easier for users to enable iSCSI if
|
|
47
|
+
desired. They can be deleted from this list if iSCSI isn't
|
|
48
|
+
used. See iscsiadm(1m) man page for more information.
|
|
49
|
+
support for iSCSI.
|
|
50
|
+
-->
|
|
51
|
+
</software_data>
|
|
52
|
+
<!--
|
|
53
|
+
babel_install and slim_install are group packages used to
|
|
54
|
+
define the default installation. They are removed here so
|
|
55
|
+
that they do not inhibit removal of other packages on the
|
|
56
|
+
installed system.
|
|
57
|
+
-->
|
|
58
|
+
<software_data action="uninstall" type="IPS">
|
|
59
|
+
<name>pkg:/server_install</name>
|
|
60
|
+
</software_data>
|
|
61
|
+
|
|
62
|
+
</software>
|
|
63
|
+
<!--
|
|
64
|
+
Add missing driver packages to a booted install image so an
|
|
65
|
+
installation can complete. Add packages to target as well.
|
|
66
|
+
<search_all> searches and installs from configured repo.
|
|
67
|
+
-->
|
|
68
|
+
<add_drivers>
|
|
69
|
+
<search_all/>
|
|
70
|
+
</add_drivers>
|
|
71
|
+
<sc_embedded_manifest name="AI">
|
|
72
|
+
<!-- <?xml version='1.0'?>
|
|
73
|
+
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
|
|
74
|
+
<service_bundle type="profile" name="system configuration">
|
|
75
|
+
<service name="system/install/config" version="1" type="service">
|
|
76
|
+
<instance name="default" enabled="true">
|
|
77
|
+
<property_group name="user_account" type="application">
|
|
78
|
+
<propval name="login" type="astring" value="vagrant"/>
|
|
79
|
+
<propval name="password" type="astring" value="$1$MPmczGP9$1SeNO4bw5YgiEJuo/ZkWq1"/>
|
|
80
|
+
<propval name="description" type="astring" value="default_user"/>
|
|
81
|
+
<propval name="shell" type="astring" value="/usr/bin/bash"/>
|
|
82
|
+
<propval name="uid" type='count' value='101'/>
|
|
83
|
+
<propval name="gid" type='count' value='10'/>
|
|
84
|
+
<propval name="type" type="astring" value="normal"/>
|
|
85
|
+
<propval name="roles" type="astring" value="root"/>
|
|
86
|
+
</property_group>
|
|
87
|
+
|
|
88
|
+
<property_group name="root_account" type="application">
|
|
89
|
+
<propval name="password" type="astring" value="$1$MPmczGP9$1SeNO4bw5YgiEJuo/ZkWq1"/>
|
|
90
|
+
<propval name="type" type="astring" value="role"/>
|
|
91
|
+
</property_group>
|
|
92
|
+
|
|
93
|
+
<property_group name="other_sc_params" type="application">
|
|
94
|
+
<propval name="timezone" type="astring" value="GMT"/>
|
|
95
|
+
<propval name="hostname" type="astring" value="solaris"/>
|
|
96
|
+
</property_group>
|
|
97
|
+
</instance>
|
|
98
|
+
</service>
|
|
99
|
+
<service name="system/console-login" version="1" type="service">
|
|
100
|
+
<property_group name="ttymon" type="application">
|
|
101
|
+
<propval name="terminal_type" type="astring" value="sun"/>
|
|
102
|
+
</property_group>
|
|
103
|
+
</service>
|
|
104
|
+
|
|
105
|
+
<service name='system/keymap' version='1' type='service'>
|
|
106
|
+
<instance name='default' enabled='true'>
|
|
107
|
+
<property_group name='keymap' type='system'>
|
|
108
|
+
<propval name='layout' type='astring' value='US-English'/>
|
|
109
|
+
</property_group>
|
|
110
|
+
</instance>
|
|
111
|
+
</service>
|
|
112
|
+
|
|
113
|
+
<service name="network/physical" version="1" type="service">
|
|
114
|
+
<instance name="nwam" enabled="true"/>
|
|
115
|
+
<instance name="default" enabled="false"/>
|
|
116
|
+
</service>
|
|
117
|
+
</service_bundle>
|
|
118
|
+
-->
|
|
119
|
+
</sc_embedded_manifest>
|
|
120
|
+
</ai_instance>
|
|
121
|
+
</auto_install>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Veewee::Session.declare({
|
|
2
|
+
:cpu_count => '1', :memory_size=> '768',
|
|
3
|
+
#Disk size needs to be 12Gig +
|
|
4
|
+
:disk_size => '15140', :disk_format => 'VDI', :hostiocache => 'off', :use_hw_virt_ext => 'on',
|
|
5
|
+
:os_type_id => 'OpenSolaris',
|
|
6
|
+
:iso_file => "sol-11-exp-201011-ai-x86.iso",
|
|
7
|
+
:iso_src => "",
|
|
8
|
+
:iso_download_instructions => "- You need to download this manually as there is no automated way to do it\n"+
|
|
9
|
+
"http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html\n"+
|
|
10
|
+
"\n"+
|
|
11
|
+
"- The version tested is 2010.11\n"+
|
|
12
|
+
"- For other version: changed the iso filename+checksum\n",
|
|
13
|
+
:iso_md5 => "36527d4d49a645ef6f6d2677c8e0118c",
|
|
14
|
+
:iso_download_timeout => 1000,
|
|
15
|
+
:boot_wait => "10", :boot_cmd_sequence => [
|
|
16
|
+
'e',
|
|
17
|
+
'e',
|
|
18
|
+
'<Backspace>'*22,
|
|
19
|
+
'false',
|
|
20
|
+
#',aimanifest=prompt',
|
|
21
|
+
#',aimanifest=http://%IP%:%PORT%/default.xml',
|
|
22
|
+
'<Enter>',
|
|
23
|
+
'b',
|
|
24
|
+
'<Wait>'*75,
|
|
25
|
+
|
|
26
|
+
# login as root
|
|
27
|
+
'root<Enter><Wait>',
|
|
28
|
+
'solaris<Enter><Wait>',
|
|
29
|
+
|
|
30
|
+
# Background check when install is complete, add vagrant to the sudo
|
|
31
|
+
'while (true); do sleep 5; test -f /a/etc/sudoers && grep -v "vagrant" "/a/etc/sudoers" 2> /dev/null',
|
|
32
|
+
' && echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /a/etc/sudoers && break ; done &<Enter>',
|
|
33
|
+
|
|
34
|
+
# Background check to see if install has finished and reboot
|
|
35
|
+
'<Enter>while (true); do grep "You may wish to reboot" "/tmp/install_log" 2> /dev/null',
|
|
36
|
+
' && reboot; sleep 10; done &<Enter>',
|
|
37
|
+
|
|
38
|
+
# Wait for 5 seconds, so the webserver will be up
|
|
39
|
+
'sleep 5; curl http://%IP%:%PORT%/default.xml -o default.xml;',
|
|
40
|
+
'cp default.xml /tmp/ai_combined_manifest.xml;',
|
|
41
|
+
|
|
42
|
+
# Start the installer
|
|
43
|
+
'svcadm enable svc:/application/auto-installer:default;',
|
|
44
|
+
|
|
45
|
+
# Wait for the installer to launch and display the logfile
|
|
46
|
+
'sleep 3; tail -f /tmp/install_log<Enter>'
|
|
47
|
+
|
|
48
|
+
],
|
|
49
|
+
:kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "default.xml",
|
|
50
|
+
:ssh_login_timeout => "100", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
|
|
51
|
+
:ssh_host_port => "7222", :ssh_guest_port => "22",
|
|
52
|
+
:sudo_cmd => "echo '%p'|sudo -S bash ./%f",
|
|
53
|
+
:shutdown_cmd => "/usr/sbin/halt",
|
|
54
|
+
:postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
# Notes:
|
|
58
|
+
# http://dlc.sun.com/osol/docs/content/dev/AIinstall/aimanifest.html
|
|
59
|
+
# http://download.oracle.com/docs/cd/E19963-01/html/820-6566/media-ai.html#gklco
|
|
60
|
+
# default.xml
|
|
61
|
+
# /.cdrom/auto_install/default.xml
|
|
62
|
+
# /usr/share/auto_install/default.xml
|
|
63
|
+
|
|
64
|
+
#tail -f /tmp/install.log
|
|
65
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# http://projects.puppetlabs.com/projects/1/wiki/Puppet_Solaris
|
|
2
|
+
|
|
3
|
+
date > /etc/vagrant_box_build_time
|
|
4
|
+
|
|
5
|
+
# Add the opencsw package site
|
|
6
|
+
export PATH=/usr/bin:/usr/sbin:$PATH
|
|
7
|
+
|
|
8
|
+
yes|/usr/sbin/pkgadd -d http://mirror.opencsw.org/opencsw/pkgutil-`uname -p`.pkg all
|
|
9
|
+
|
|
10
|
+
/opt/csw/bin/pkgutil -U
|
|
11
|
+
|
|
12
|
+
# We need some header stuff and so on to get gcc going
|
|
13
|
+
# Tip thx to - https://wiki.chipp.ch/twiki/bin/view/CmsTier3/InstallationSolaris
|
|
14
|
+
/usr/bin/pkg install SUNWarc SUNWsfwhea SUNWhea SUNWtoo
|
|
15
|
+
/usr/bin/pkg install math/header-math
|
|
16
|
+
|
|
17
|
+
/opt/csw/bin/pkgutil -y -i CSWgsed
|
|
18
|
+
/opt/csw/bin/pkgutil -y -i CSWruby18-gcc4
|
|
19
|
+
/opt/csw/bin/pkgutil -y -i CSWruby18-dev
|
|
20
|
+
/opt/csw/bin/pkgutil -y -i CSWrubygems
|
|
21
|
+
|
|
22
|
+
# These are needed to get a compiler working
|
|
23
|
+
# Mainly because chef depends on compiling some native gems
|
|
24
|
+
export PATH=/opt/csw/bin:$PATH
|
|
25
|
+
export PATH=/opt/csw/gcc4/bin:$PATH
|
|
26
|
+
|
|
27
|
+
/opt/csw/bin/pkgutil -y -i CSWgcc4core
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
/opt/csw/bin/pkgutil -y -i CSWgcc4g++
|
|
31
|
+
/opt/csw/bin/pkgutil -y -i CSWreadline
|
|
32
|
+
/opt/csw/bin/pkgutil -y -i CSWzlib
|
|
33
|
+
/opt/csw/bin/pkgutil -y -i CSWossldevel
|
|
34
|
+
|
|
35
|
+
# prevents ":in `require': no such file to load -- mkmf (LoadError)"
|
|
36
|
+
# yes|/opt/csw/bin/pkgutil -i CSWruby
|
|
37
|
+
# used SUNWspro
|
|
38
|
+
# has entries in /opt/csw/lib/ruby/1.8/i386-solaris2.9/rbconfig.rb
|
|
39
|
+
# luckily there is another one
|
|
40
|
+
# For some reason these don't get installed ok, we need to give them a slight kick again
|
|
41
|
+
/opt/csw/bin/pkgutil -y -i CSWgcc4core
|
|
42
|
+
/opt/csw/bin/pkgutil -y -i CSWruby18-gcc4
|
|
43
|
+
|
|
44
|
+
# no solaris2.11 .... mkheaders here ! needs some fixing ??
|
|
45
|
+
# /opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.10/4.3.3/install-tools/mkheaders
|
|
46
|
+
/opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.8/4.3.3/install-tools/mkheaders
|
|
47
|
+
|
|
48
|
+
/opt/csw/sbin/alternatives --display rbconfig18
|
|
49
|
+
/opt/csw/sbin/alternatives --set rbconfig18 /opt/csw/lib/ruby/1.8/i386-solaris2.9/rbconfig.rb.gcc4
|
|
50
|
+
|
|
51
|
+
/opt/csw/bin/gem install puppet --no-ri --no-rdoc
|
|
52
|
+
/opt/csw/bin/gem install chef --no-ri --no-rdoc
|
|
53
|
+
|
|
54
|
+
#Installing vagrant keys
|
|
55
|
+
mkdir /export/home/vagrant/.ssh
|
|
56
|
+
chmod 700 /export/home/vagrant/.ssh
|
|
57
|
+
cd /export/home/vagrant/.ssh
|
|
58
|
+
/usr/bin/wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
|
|
59
|
+
chown -R vagrant /export/home/vagrant/.ssh
|
|
60
|
+
|
|
61
|
+
#Installing the virtualbox guest additions
|
|
62
|
+
VBOX_VERSION=$(cat /export/home/vagrant/.vbox_version)
|
|
63
|
+
cd /tmp
|
|
64
|
+
/usr/bin/wget http://download.virtualbox.org/virtualbox/4.0.6/VirtualBox-4.0.6-71344-SunOS.tar.gz
|
|
65
|
+
/usr/gnu/bin/tar -xzvf VirtualBox-4.0.6-71344-SunOS.tar.gz
|
|
66
|
+
/usr/bin/pkgtrans VirtualBox-4.0.6-SunOS-r71344.pkg . all
|
|
67
|
+
yes|/usr/sbin/pkgadd -d . SUNWvbox
|
|
68
|
+
|
|
69
|
+
# Fix the shells to include the /opt/csw directories
|
|
70
|
+
|
|
71
|
+
echo "export PATH=/opt/csw/bin:/opt/csw/sbin:$PATH" >> /root/.profile
|
|
72
|
+
echo "export PATH=/opt/csw/bin:/opt/csw/sbin:$PATH" >> /export/home/vagrant/.profile
|
|
73
|
+
|
|
74
|
+
echo "Note: validation of this box wil fail, as it's not linux based, working on that"
|
|
75
|
+
|
|
76
|
+
exit
|
|
77
|
+
|
|
78
|
+
#Inspiration for ruby enterprise
|
|
79
|
+
|
|
80
|
+
PATH=$PATH:/opt/csw/bin
|
|
81
|
+
wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
|
|
82
|
+
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz
|
|
83
|
+
./ruby-enterprise-1.8.7-2010.02/installer -a /opt/ruby --no-dev-docs --dont-install-useful-gems
|
|
84
|
+
|
|
85
|
+
# http://www.darkaslight.com/blog/entry/38-Compiling-Ruby-Enterprise-Edition-on-Solaris-10
|
|
86
|
+
* To install C compiler:
|
|
87
|
+
* To install C++ compiler:
|
|
88
|
+
* To install Zlib development headers:
|
|
89
|
+
* To install OpenSSL development headers:
|
|
90
|
+
* To install GNU Readline development headers:
|
|
91
|
+
|
|
92
|
+
bash-3.00# wget http://rubyforge.org/frs/download.php/38084/ruby-enterprise-1.8.6-20080507.tar.gz
|
|
93
|
+
bash-3.00# gtar xvf ruby-enterprise-1.8.6-20080507.tar.gz
|
|
94
|
+
bash-3.00# cd ruby-enterprise-1.8.6-20080507/source
|
|
95
|
+
bash-3.00# ./configure --with-openssl-dir=/opt/csw --with-readline-dir=/opt/csw \
|
|
96
|
+
--with-iconv-dir=/opt/csw --prefix=/opt/rubyenterprise
|
|
97
|
+
bash-3.00# make
|
|
98
|
+
bash-3.00# make install
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
require 'digest/md5'
|
|
2
|
+
CURRENT_DIR = File.dirname(__FILE__)
|
|
3
|
+
PRESEED_MD5 = "#{Digest::MD5.file("#{CURRENT_DIR}/preseed.cfg").hexdigest}"
|
|
4
|
+
|
|
5
|
+
Veewee::Session.declare( {
|
|
6
|
+
:boot_cmd_sequence => [
|
|
7
|
+
"<Esc><Esc><Enter>",
|
|
8
|
+
"/install/vmlinuz ",
|
|
9
|
+
"noapic ",
|
|
10
|
+
"auto-install/enable",
|
|
11
|
+
"console-setup/ask_detect=false ",
|
|
12
|
+
"console-setup/modelcode=pc105 ",
|
|
13
|
+
"console-setup/layoutcode=us ",
|
|
14
|
+
"debconf/priority=critical ",
|
|
15
|
+
"debconf/frontend=noninteractive ",
|
|
16
|
+
"debian-installer=en_US ",
|
|
17
|
+
"debian-installer/locale=en_US ",
|
|
18
|
+
"debian-installer/framebuffer=false ",
|
|
19
|
+
"initrd=/install/initrd.gz ",
|
|
20
|
+
"kbd-chooser/method=us ",
|
|
21
|
+
"netcfg/get_hostname=%NAME% ",
|
|
22
|
+
"netcfg/dhcp_timeout=60 ",
|
|
23
|
+
"netcfg/choose_interface=auto ",
|
|
24
|
+
"preseed/interactive=false ",
|
|
25
|
+
"preseed/url=http://%IP%:%PORT%/preseed.cfg ",
|
|
26
|
+
"preseed/url/checksum=#{PRESEED_MD5} ",
|
|
27
|
+
"DEBCONF_DEBUG=5 ",
|
|
28
|
+
"-- <Enter>"
|
|
29
|
+
],
|
|
30
|
+
:boot_wait => "10",
|
|
31
|
+
:cpu_count => '1',
|
|
32
|
+
:disk_size => '10140',
|
|
33
|
+
:disk_format => 'VMDK',
|
|
34
|
+
:hostiocache => 'on',
|
|
35
|
+
:iso_download_timeout => "60",
|
|
36
|
+
:iso_file => "ubuntu-10.04.3-server-amd64.iso",
|
|
37
|
+
:iso_src => "http://releases.ubuntu.com/10.04.3/ubuntu-10.04.3-server-amd64.iso",
|
|
38
|
+
:iso_md5 => "84b43b7bbee85d0af8e11b778c8d1290",
|
|
39
|
+
:kickstart_file => "preseed.cfg",
|
|
40
|
+
:kickstart_port => "7122",
|
|
41
|
+
:kickstart_timeout => "60",
|
|
42
|
+
:memory_size => '384',
|
|
43
|
+
:os_type_id => 'Ubuntu_64',
|
|
44
|
+
:postinstall_files => [ "postinstall.sh" ],
|
|
45
|
+
:postinstall_timeout => "10000",
|
|
46
|
+
:ssh_login_timeout => "60",
|
|
47
|
+
:ssh_user => "vagrant",
|
|
48
|
+
:ssh_password => "vagrant",
|
|
49
|
+
:ssh_key => "",
|
|
50
|
+
:ssh_host_port => "7222",
|
|
51
|
+
:ssh_guest_port => "22",
|
|
52
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
|
53
|
+
:shutdown_cmd => "shutdown -h now",
|
|
54
|
+
})
|
|
@@ -0,0 +1,90 @@
|
|
|
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 libreadline5-dev
|
|
11
|
+
apt-get clean
|
|
12
|
+
|
|
13
|
+
# Setup sudo to allow no-password sudo for "admin"
|
|
14
|
+
cp /etc/sudoers /etc/sudoers.orig
|
|
15
|
+
sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
|
|
16
|
+
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
|
17
|
+
|
|
18
|
+
# Install NFS client
|
|
19
|
+
apt-get -y install nfs-common
|
|
20
|
+
|
|
21
|
+
# Install Ruby from source in /opt so that users of Vagrant
|
|
22
|
+
# can install their own Rubies using packages or however.
|
|
23
|
+
# We must install the 1.8.x series since Puppet doesn't support
|
|
24
|
+
# Ruby 1.9 yet.
|
|
25
|
+
wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p334.tar.gz
|
|
26
|
+
tar xvzf ruby-1.8.7-p334.tar.gz
|
|
27
|
+
cd ruby-1.8.7-p334
|
|
28
|
+
./configure --prefix=/opt/ruby
|
|
29
|
+
make
|
|
30
|
+
make install
|
|
31
|
+
cd ..
|
|
32
|
+
rm -rf ruby-1.8.7-p334*
|
|
33
|
+
|
|
34
|
+
# Install RubyGems 1.7.2
|
|
35
|
+
wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz
|
|
36
|
+
tar xzf rubygems-1.7.2.tgz
|
|
37
|
+
cd rubygems-1.7.2
|
|
38
|
+
/opt/ruby/bin/ruby setup.rb
|
|
39
|
+
cd ..
|
|
40
|
+
rm -rf rubygems-1.7.2*
|
|
41
|
+
|
|
42
|
+
# Installing chef & Puppet
|
|
43
|
+
/opt/ruby/bin/gem install chef --no-ri --no-rdoc
|
|
44
|
+
/opt/ruby/bin/gem install puppet --no-ri --no-rdoc
|
|
45
|
+
|
|
46
|
+
# Add /opt/ruby/bin to the global path as the last resort so
|
|
47
|
+
# Ruby, RubyGems, and Chef/Puppet are visible
|
|
48
|
+
echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
|
|
49
|
+
|
|
50
|
+
# Installing vagrant keys
|
|
51
|
+
mkdir /home/vagrant/.ssh
|
|
52
|
+
chmod 700 /home/vagrant/.ssh
|
|
53
|
+
cd /home/vagrant/.ssh
|
|
54
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
|
|
55
|
+
chmod 600 /home/vagrant/.ssh/authorized_keys
|
|
56
|
+
chown -R vagrant /home/vagrant/.ssh
|
|
57
|
+
|
|
58
|
+
# Installing the virtualbox guest additions
|
|
59
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
|
60
|
+
cd /tmp
|
|
61
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
|
62
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
|
63
|
+
sh /mnt/VBoxLinuxAdditions.run
|
|
64
|
+
umount /mnt
|
|
65
|
+
|
|
66
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
|
67
|
+
|
|
68
|
+
# Remove items used for building, since they aren't needed anymore
|
|
69
|
+
apt-get -y remove linux-headers-$(uname -r) build-essential
|
|
70
|
+
apt-get -y autoremove
|
|
71
|
+
|
|
72
|
+
# Zero out the free space to save space in the final image:
|
|
73
|
+
dd if=/dev/zero of=/EMPTY bs=1M
|
|
74
|
+
rm -f /EMPTY
|
|
75
|
+
|
|
76
|
+
# Removing leftover leases and persistent rules
|
|
77
|
+
echo "cleaning up dhcp leases"
|
|
78
|
+
rm /var/lib/dhcp3/*
|
|
79
|
+
|
|
80
|
+
# Make sure Udev doesn't block our network
|
|
81
|
+
# http://6.ptmc.org/?p=164
|
|
82
|
+
echo "cleaning up udev rules"
|
|
83
|
+
rm /etc/udev/rules.d/70-persistent-net.rules
|
|
84
|
+
mkdir /etc/udev/rules.d/70-persistent-net.rules
|
|
85
|
+
rm -rf /dev/.udev/
|
|
86
|
+
rm /lib/udev/rules.d/75-persistent-net-generator.rules
|
|
87
|
+
|
|
88
|
+
echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
|
|
89
|
+
echo "pre-up sleep 2" >> /etc/network/interfaces
|
|
90
|
+
exit
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
## Options to set on the command line
|
|
2
|
+
d-i debian-installer/locale string en_US
|
|
3
|
+
d-i console-setup/ask_detect boolean false
|
|
4
|
+
d-i console-setup/layout string Belgium
|
|
5
|
+
|
|
6
|
+
#d-i netcfg/get_hostname string dummy
|
|
7
|
+
d-i netcfg/get_hostname string unassigned-hostname
|
|
8
|
+
d-i netcfg/get_domain string unassigned-domain
|
|
9
|
+
|
|
10
|
+
# Continue without a default route
|
|
11
|
+
# Not working , specify a dummy in the DHCP
|
|
12
|
+
#d-i netcfg/no_default_route boolean
|
|
13
|
+
|
|
14
|
+
d-i time/zone string Europe/Brussels
|
|
15
|
+
d-i clock-setup/utc-auto boolean true
|
|
16
|
+
d-i clock-setup/utc boolean true
|
|
17
|
+
|
|
18
|
+
d-i kbd-chooser/method select Belgian
|
|
19
|
+
|
|
20
|
+
d-i netcfg/wireless_wep string
|
|
21
|
+
|
|
22
|
+
d-i base-installer/kernel/override-image string linux-server
|
|
23
|
+
#d-i base-installer/kernel/override-image string linux-image-2.6.32-21-generic
|
|
24
|
+
|
|
25
|
+
# Choices: Dialog, Readline, Gnome, Kde, Editor, Noninteractive
|
|
26
|
+
d-i debconf debconf/frontend select Noninteractive
|
|
27
|
+
|
|
28
|
+
d-i pkgsel/install-language-support boolean false
|
|
29
|
+
tasksel tasksel/first multiselect standard, ubuntu-server
|
|
30
|
+
|
|
31
|
+
#d-i partman-auto/method string regular
|
|
32
|
+
d-i partman-auto/method string lvm
|
|
33
|
+
#d-i partman-auto/purge_lvm_from_device boolean true
|
|
34
|
+
|
|
35
|
+
d-i partman-lvm/confirm boolean true
|
|
36
|
+
d-i partman-lvm/device_remove_lvm boolean true
|
|
37
|
+
d-i partman-auto/choose_recipe select atomic
|
|
38
|
+
|
|
39
|
+
d-i partman/confirm_write_new_label boolean true
|
|
40
|
+
d-i partman/confirm_nooverwrite boolean true
|
|
41
|
+
d-i partman/choose_partition select finish
|
|
42
|
+
d-i partman/confirm boolean true
|
|
43
|
+
|
|
44
|
+
#http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=9626883
|
|
45
|
+
#Message: "write the changes to disk and configure lvm preseed"
|
|
46
|
+
#http://serverfault.com/questions/189328/ubuntu-kickstart-installation-using-lvm-waits-for-input
|
|
47
|
+
#preseed partman-lvm/confirm_nooverwrite boolean true
|
|
48
|
+
|
|
49
|
+
# Write the changes to disks and configure LVM?
|
|
50
|
+
d-i partman-lvm/confirm boolean true
|
|
51
|
+
d-i partman-lvm/confirm_nooverwrite boolean true
|
|
52
|
+
d-i partman-auto-lvm/guided_size string max
|
|
53
|
+
|
|
54
|
+
## Default user, we can get away with a recipe to change this
|
|
55
|
+
d-i passwd/user-fullname string vagrant
|
|
56
|
+
d-i passwd/username string vagrant
|
|
57
|
+
d-i passwd/user-password password vagrant
|
|
58
|
+
d-i passwd/user-password-again password vagrant
|
|
59
|
+
d-i user-setup/encrypt-home boolean false
|
|
60
|
+
d-i user-setup/allow-password-weak boolean true
|
|
61
|
+
|
|
62
|
+
## minimum is puppet and ssh and ntp
|
|
63
|
+
# Individual additional packages to install
|
|
64
|
+
d-i pkgsel/include string openssh-server ntp acpid
|
|
65
|
+
|
|
66
|
+
# Whether to upgrade packages after debootstrap.
|
|
67
|
+
# Allowed values: none, safe-upgrade, full-upgrade
|
|
68
|
+
d-i pkgsel/upgrade select full-upgrade
|
|
69
|
+
|
|
70
|
+
d-i grub-installer/only_debian boolean true
|
|
71
|
+
d-i grub-installer/with_other_os boolean true
|
|
72
|
+
d-i finish-install/reboot_in_progress note
|
|
73
|
+
|
|
74
|
+
#For the update
|
|
75
|
+
d-i pkgsel/update-policy select none
|
|
76
|
+
|
|
77
|
+
# debconf-get-selections --install
|
|
78
|
+
#Use mirror
|
|
79
|
+
#d-i apt-setup/use_mirror boolean true
|
|
80
|
+
#d-i mirror/country string manual
|
|
81
|
+
#choose-mirror-bin mirror/protocol string http
|
|
82
|
+
#choose-mirror-bin mirror/http/hostname string 192.168.4.150
|
|
83
|
+
#choose-mirror-bin mirror/http/directory string /ubuntu
|
|
84
|
+
#choose-mirror-bin mirror/suite select maverick
|
|
85
|
+
#d-i debian-installer/allow_unauthenticated string true
|
|
86
|
+
|
|
87
|
+
choose-mirror-bin mirror/http/proxy string
|