veewee 0.3.9 → 0.3.10
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/lib/veewee/version.rb +1 -1
- data/templates/gentoo-latest-amd64/{chef.sh → add_chef.sh} +0 -0
- data/templates/gentoo-latest-amd64/{puppet.sh → add_puppet.sh} +0 -0
- data/templates/gentoo-latest-amd64/add_vim.sh +22 -0
- data/templates/gentoo-latest-amd64/base.sh +72 -6
- data/templates/gentoo-latest-amd64/cleanup.sh +1 -1
- data/templates/gentoo-latest-amd64/definition.rb +6 -2
- data/templates/gentoo-latest-amd64/git.sh +21 -0
- data/templates/gentoo-latest-amd64/grub.sh +4 -3
- data/templates/gentoo-latest-amd64/kernel.sh +3 -3
- data/templates/gentoo-latest-amd64/ruby.sh +3 -3
- data/templates/gentoo-latest-amd64/settings.sh +8 -2
- data/templates/gentoo-latest-amd64/subversion.sh +5 -0
- data/templates/gentoo-latest-amd64/vagrant.sh +33 -4
- data/templates/gentoo-latest-amd64/virtualbox.sh +6 -5
- data/templates/gentoo-latest-amd64/wipe_sources.sh +10 -0
- data/templates/gentoo-latest-amd64/zerodisk.sh +1 -1
- data/templates/ubuntu-13.10-server-amd64/apt.sh +7 -0
- data/templates/ubuntu-13.10-server-amd64/build_time.sh +1 -0
- data/templates/ubuntu-13.10-server-amd64/chef.sh +3 -0
- data/templates/ubuntu-13.10-server-amd64/cleanup.sh +16 -0
- data/templates/ubuntu-13.10-server-amd64/definition.rb +46 -0
- data/templates/ubuntu-13.10-server-amd64/parallels.sh +9 -0
- data/templates/ubuntu-13.10-server-amd64/preseed.cfg +61 -0
- data/templates/ubuntu-13.10-server-amd64/puppet.sh +4 -0
- data/templates/ubuntu-13.10-server-amd64/ruby.sh +25 -0
- data/templates/ubuntu-13.10-server-amd64/sudo.sh +5 -0
- data/templates/ubuntu-13.10-server-amd64/vagrant.sh +6 -0
- data/templates/ubuntu-13.10-server-amd64/vbox.sh +18 -0
- metadata +20 -4
data/lib/veewee/version.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
source /etc/profile
|
|
3
|
+
|
|
4
|
+
# add required use flags and keywords
|
|
5
|
+
#cat <<DATAEOF >> "$chroot/etc/portage/package.use/vim"
|
|
6
|
+
#app-editors/vim minimal
|
|
7
|
+
#DATAEOF
|
|
8
|
+
|
|
9
|
+
cat <<DATAEOF >> "$chroot/etc/portage/package.accept_keywords/vim"
|
|
10
|
+
app-vim/bash-support ~x86 ~amd64
|
|
11
|
+
DATAEOF
|
|
12
|
+
|
|
13
|
+
# install vim
|
|
14
|
+
chroot "$chroot" emerge app-editors/vim
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# install vim plugins
|
|
18
|
+
chroot "$chroot" emerge app-vim/puppet-syntax app-vim/bash-support
|
|
19
|
+
|
|
20
|
+
# install spf13 (experimental)
|
|
21
|
+
#chroot "$chroot" emerge dev-vcs/git # be aware of huge dependency
|
|
22
|
+
#chroot "$chroot" wget --no-check-certificate -qO- http://j.mp/spf13-vim3
|
|
@@ -24,20 +24,33 @@ wget -nv --tries=5 "$stage3url"
|
|
|
24
24
|
tar xpf "$stage3file" && rm "$stage3file"
|
|
25
25
|
|
|
26
26
|
# prepeare chroot, update env
|
|
27
|
-
mount
|
|
28
|
-
mount --
|
|
27
|
+
mount -t proc none "$chroot/proc"
|
|
28
|
+
mount --rbind /dev "$chroot/dev"
|
|
29
29
|
|
|
30
30
|
# copy nameserver information, save build timestamp
|
|
31
31
|
cp /etc/resolv.conf "$chroot/etc/"
|
|
32
32
|
date -u > "$chroot/etc/vagrant_box_build_time"
|
|
33
|
+
|
|
34
|
+
# retrieve and extract latest portage tarball
|
|
35
|
+
chroot "$chroot" wget --tries=5 "${portageurl}"
|
|
36
|
+
chroot "$chroot" tar -xjpf portage-latest.tar.bz2 -C /usr
|
|
37
|
+
chroot "$chroot" rm -rf portage-latest.tar.bz2
|
|
33
38
|
chroot "$chroot" env-update
|
|
34
39
|
|
|
35
|
-
#
|
|
40
|
+
# bring up network interface and sshd on boot (Alt. for new systemd naming scheme, enp0s3)
|
|
41
|
+
#chroot "$chroot" /bin/bash <<DATAEOF
|
|
42
|
+
#cd /etc/conf.d
|
|
43
|
+
#sed -i "s/eth0/enp0s3/" /etc/udhcpd.conf
|
|
44
|
+
#echo 'config_enp0s3=( "dhcp" )' >> net
|
|
45
|
+
#ln -s net.lo /etc/init.d/net.enp0s3
|
|
46
|
+
#rc-update add net.enp0s3 default
|
|
47
|
+
#rc-update add sshd default
|
|
48
|
+
#DATAEOF
|
|
49
|
+
|
|
50
|
+
# bring up network interface and sshd on boot (for older systemd naming scheme, eth0)
|
|
36
51
|
chroot "$chroot" /bin/bash <<DATAEOF
|
|
37
52
|
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
|
|
38
53
|
DATAEOF
|
|
39
|
-
|
|
40
|
-
# bring up eth0 and sshd on boot
|
|
41
54
|
chroot "$chroot" /bin/bash <<DATAEOF
|
|
42
55
|
cd /etc/conf.d
|
|
43
56
|
echo 'config_eth0=( "dhcp" )' >> net
|
|
@@ -66,13 +79,62 @@ ACCEPT_KEYWORDS="$accept_keywords"
|
|
|
66
79
|
MAKEOPTS="-j$((1 + $nr_cpus)) -l$nr_cpus.5"
|
|
67
80
|
EMERGE_DEFAULT_OPTS="-j$nr_cpus --quiet-build=y"
|
|
68
81
|
FEATURES="\${FEATURES} parallel-fetch"
|
|
82
|
+
USE="nls cjk unicode"
|
|
83
|
+
|
|
84
|
+
PYTHON_TARGETS="python2_7 python3_2 python3_3"
|
|
85
|
+
USE_PYTHON="3.2 2.7"
|
|
69
86
|
|
|
70
87
|
# english only
|
|
71
|
-
LINGUAS=""
|
|
88
|
+
LINGUAS="en"
|
|
72
89
|
|
|
73
90
|
# for X support if needed
|
|
74
91
|
INPUT_DEVICES="evdev"
|
|
75
92
|
VIDEO_CARDS="virtualbox"
|
|
93
|
+
|
|
94
|
+
# Additional portage overlays (space char separated)
|
|
95
|
+
PORTDIR_OVERLAY="/usr/local/portage"
|
|
96
|
+
|
|
97
|
+
# Including /usr/local/portage overlay
|
|
98
|
+
source "/usr/local/portage/make.conf"
|
|
99
|
+
DATAEOF
|
|
100
|
+
|
|
101
|
+
# Create an empty portage overlay
|
|
102
|
+
mkdir -p "$chroot/usr/local/portage"
|
|
103
|
+
|
|
104
|
+
touch "$chroot/usr/local/portage/make.conf"
|
|
105
|
+
chown root:portage "$chroot/usr/local/portage/make.conf"
|
|
106
|
+
chmod g+s "$chroot/usr/local/portage/make.conf"
|
|
107
|
+
chmod 775 "$chroot/usr/local/portage/make.conf"
|
|
108
|
+
|
|
109
|
+
mkdir -p "$chroot/usr/local/portage/profiles"
|
|
110
|
+
echo "local_repo" >> "$chroot/usr/local/portage/profiles/repo_name"
|
|
111
|
+
chown root:portage "$chroot/usr/local/portage" "$chroot/usr/local/portage/profiles/repo_name"
|
|
112
|
+
chmod g+s "$chroot/usr/local/portage" "$chroot/usr/local/portage/profiles/repo_name"
|
|
113
|
+
chmod 775 "$chroot/usr/local/portage" "$chroot/usr/local/portage/profiles/repo_name"
|
|
114
|
+
|
|
115
|
+
mkdir -p "$chroot/usr/local/portage/metadata"
|
|
116
|
+
echo "masters = gentoo" >> "$chroot/usr/local/portage/metadata/layout.conf"
|
|
117
|
+
chown root:portage "$chroot/usr/local/portage/metadata/layout.conf"
|
|
118
|
+
chmod g+s "$chroot/usr/local/portage/metadata/layout.conf"
|
|
119
|
+
chmod 775 "$chroot/usr/local/portage/metadata/layout.conf"
|
|
120
|
+
|
|
121
|
+
# This distribution does not like flags described in single files
|
|
122
|
+
# all 'package.*', except 'package.keywords', should be directories.
|
|
123
|
+
mkdir -p "$chroot/etc/portage/package.license"
|
|
124
|
+
mkdir -p "$chroot/etc/portage/package.use"
|
|
125
|
+
mkdir -p "$chroot/etc/portage/package.accept_keywords"
|
|
126
|
+
mkdir -p "$chroot/etc/portage/package.mask"
|
|
127
|
+
mkdir -p "$chroot/etc/portage/package.unmask"
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
# Some forced updates for this system
|
|
131
|
+
cat <<DATAEOF >> "$chroot/etc/portage/package.unmask/python-2.7"
|
|
132
|
+
=dev-lang/python-2.7.5*
|
|
133
|
+
DATAEOF
|
|
134
|
+
|
|
135
|
+
cat <<DATAEOF >> "$chroot/etc/portage/package.unmask/pam"
|
|
136
|
+
=sys-libs/pam-1.1.6-r2
|
|
137
|
+
=sys-libs/pam-1.1.7
|
|
76
138
|
DATAEOF
|
|
77
139
|
|
|
78
140
|
# set localtime
|
|
@@ -81,9 +143,13 @@ chroot "$chroot" ln -sf "/usr/share/zoneinfo/$timezone" /etc/localtime
|
|
|
81
143
|
# set locale
|
|
82
144
|
chroot "$chroot" /bin/bash <<DATAEOF
|
|
83
145
|
echo LANG=\"$locale\" > /etc/env.d/02locale
|
|
146
|
+
echo LANG_ALL=\"$locale\" >> /etc/env.d/02locale
|
|
147
|
+
echo LANGUAGE=\"$locale\" >> /etc/env.d/02locale
|
|
84
148
|
env-update && source /etc/profile
|
|
85
149
|
DATAEOF
|
|
86
150
|
|
|
151
|
+
# NOTE: LC_ALL, LC_TYPE will be set in vagrant.sh
|
|
152
|
+
|
|
87
153
|
# update portage tree to most current state
|
|
88
154
|
# emerge-webrsync is recommended by Gentoo for first sync
|
|
89
155
|
chroot "$chroot" emerge-webrsync
|
|
@@ -42,15 +42,19 @@ Veewee::Definition.declare({
|
|
|
42
42
|
'settings.sh',
|
|
43
43
|
'base.sh',
|
|
44
44
|
'kernel.sh',
|
|
45
|
+
'git.sh',
|
|
46
|
+
'subversion.sh',
|
|
45
47
|
'virtualbox.sh',
|
|
46
48
|
'vagrant.sh',
|
|
47
49
|
'ruby.sh',
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
+
'add_chef.sh',
|
|
51
|
+
'add_puppet.sh',
|
|
52
|
+
'add_vim.sh',
|
|
50
53
|
'cron.sh',
|
|
51
54
|
'syslog.sh',
|
|
52
55
|
'nfs.sh',
|
|
53
56
|
'grub.sh',
|
|
57
|
+
'wipe_sources.sh',
|
|
54
58
|
'cleanup.sh',
|
|
55
59
|
'zerodisk.sh',
|
|
56
60
|
'reboot.sh'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
source /etc/profile
|
|
3
|
+
|
|
4
|
+
# remove git's dependency on 50+ perl modules.
|
|
5
|
+
cat <<DATAEOF >> "$chroot/etc/portage/package.use/git"
|
|
6
|
+
# git with no dependency
|
|
7
|
+
dev-vcs/git -curl -perl -gpg -webdav
|
|
8
|
+
|
|
9
|
+
# git with massive dependency with subversion support
|
|
10
|
+
#dev-vcs/git -gpg perl -webdav subversion
|
|
11
|
+
#>=dev-vcs/subversion-1.7.13 -dso perl
|
|
12
|
+
DATAEOF
|
|
13
|
+
|
|
14
|
+
# install git
|
|
15
|
+
chroot "$chroot" emerge dev-vcs/git
|
|
16
|
+
|
|
17
|
+
# for git-quiltimport
|
|
18
|
+
#chroot "$chroot" emerge dev-util/quilt
|
|
19
|
+
# for git-instaweb : || ( www-servers/lighttpd www-servers/apache)
|
|
20
|
+
#chroot "$chroot" emerge www-servers/lighttpd
|
|
21
|
+
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
source /etc/profile
|
|
3
3
|
|
|
4
4
|
# use grub2
|
|
5
|
-
cat <<DATAEOF >> "$chroot/etc/portage/package.
|
|
5
|
+
cat <<DATAEOF >> "$chroot/etc/portage/package.accept_keywords/grub"
|
|
6
6
|
sys-boot/grub:2
|
|
7
7
|
DATAEOF
|
|
8
8
|
|
|
@@ -17,7 +17,8 @@ chroot "$chroot" /bin/bash <<DATAEOF
|
|
|
17
17
|
source /etc/profile && \
|
|
18
18
|
env-update && \
|
|
19
19
|
grep -v rootfs /proc/mounts > /etc/mtab && \
|
|
20
|
-
mkdir /boot/grub2 && \
|
|
21
|
-
|
|
20
|
+
mkdir -p /boot/grub2 && \
|
|
21
|
+
ln -sf /boot/grub2 /boot/grub && \
|
|
22
|
+
grub2-mkconfig -o /boot/grub/grub.cfg && \
|
|
22
23
|
grub2-install --no-floppy /dev/sda
|
|
23
24
|
DATAEOF
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
source /etc/profile
|
|
3
3
|
|
|
4
4
|
# add required use flags and keywords
|
|
5
|
-
cat <<DATAEOF >> "$chroot/etc/portage/package.use"
|
|
5
|
+
cat <<DATAEOF >> "$chroot/etc/portage/package.use/kernel"
|
|
6
6
|
sys-kernel/gentoo-sources symlink
|
|
7
7
|
sys-kernel/genkernel -cryptsetup
|
|
8
8
|
DATAEOF
|
|
9
9
|
|
|
10
|
-
cat <<DATAEOF >> "$chroot/etc/portage/package.
|
|
11
|
-
dev-util/kbuild ~amd64
|
|
10
|
+
cat <<DATAEOF >> "$chroot/etc/portage/package.accept_keywords/kernel"
|
|
11
|
+
dev-util/kbuild ~x86 ~amd64
|
|
12
12
|
DATAEOF
|
|
13
13
|
|
|
14
14
|
# get, configure, compile and install the kernel and modules
|
|
@@ -6,12 +6,12 @@ cat <<DATAEOF >> "$chroot/etc/portage/make.conf"
|
|
|
6
6
|
RUBY_TARGETS="ruby19"
|
|
7
7
|
DATAEOF
|
|
8
8
|
|
|
9
|
-
cat <<DATAEOF >> "$chroot/etc/portage/package.
|
|
10
|
-
dev-util/ragel ~amd64
|
|
9
|
+
cat <<DATAEOF >> "$chroot/etc/portage/package.accept_keywords/ruby"
|
|
10
|
+
dev-util/ragel ~x86 ~amd64
|
|
11
11
|
DATAEOF
|
|
12
12
|
|
|
13
13
|
chroot "$chroot" /bin/bash <<DATAEOF
|
|
14
14
|
env-update && source /etc/profile
|
|
15
15
|
emerge --autounmask-write ruby:1.9
|
|
16
16
|
eselect ruby set ruby19
|
|
17
|
-
DATAEOF
|
|
17
|
+
DATAEOF
|
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
cat <<DATAEOF > "/etc/profile.d/veewee.sh"
|
|
4
4
|
# stage 3 filename and full url
|
|
5
5
|
# retrieve from Gentoo current autobuild txt - these change regularly
|
|
6
|
+
|
|
7
|
+
# distfiles source
|
|
8
|
+
distfiles_url=http://distfiles.gentoo.org
|
|
9
|
+
|
|
6
10
|
build_arch="amd64"
|
|
7
11
|
build_proc="amd64"
|
|
8
|
-
stage3current=\`curl -s
|
|
9
|
-
export stage3url="
|
|
12
|
+
stage3current=\`curl -s \${distfiles_url}/releases/\${build_arch}/autobuilds/latest-stage3-\${build_proc}.txt|grep -v "^#"\`
|
|
13
|
+
export stage3url="\${distfiles_url}/releases/\${build_arch}/autobuilds/\${stage3current}"
|
|
10
14
|
export stage3file=\${stage3current##*/}
|
|
15
|
+
export portageurl="\${distfiles_url}/snapshots/portage-latest.tar.bz2"
|
|
11
16
|
|
|
12
17
|
# these two (configuring the compiler) and the stage3 url can be changed to build a 32 bit system
|
|
13
18
|
export accept_keywords="amd64"
|
|
@@ -15,6 +20,7 @@ export chost="x86_64-pc-linux-gnu"
|
|
|
15
20
|
|
|
16
21
|
# kernel version to use
|
|
17
22
|
export kernel_version="3.10.7-r1"
|
|
23
|
+
export kernel_image_version="3.10.7-gentoo-r1"
|
|
18
24
|
|
|
19
25
|
# timezone (as a subdirectory of /usr/share/zoneinfo)
|
|
20
26
|
export timezone="UTC"
|
|
@@ -9,14 +9,12 @@ wget --no-check-certificate "$vagrant_ssh_key_url" -O "$chroot/home/vagrant/.ssh
|
|
|
9
9
|
chmod 600 "$chroot/home/vagrant/.ssh/authorized_keys"
|
|
10
10
|
cp -f /root/.vbox_version "$chroot/home/vagrant/.vbox_version"
|
|
11
11
|
|
|
12
|
-
# for passwordless logins
|
|
13
12
|
mkdir -p "$chroot/root/.ssh" 2> /dev/null
|
|
14
|
-
cat /tmp/ssh-root.pub >> "$chroot/root/.ssh/authorized_keys"
|
|
15
13
|
|
|
16
14
|
# add vagrant user
|
|
17
15
|
chroot $chroot /bin/bash <<DATAEOF
|
|
18
16
|
groupadd -r vagrant
|
|
19
|
-
useradd -m -r vagrant -g vagrant -G wheel,vboxsf,vboxguest -c '
|
|
17
|
+
useradd -m -r vagrant -g vagrant -G wheel,vboxsf,vboxguest -c 'Vagrant user'
|
|
20
18
|
|
|
21
19
|
# set passwords (for after reboot)
|
|
22
20
|
passwd<<EOF
|
|
@@ -42,6 +40,7 @@ DATAEOF
|
|
|
42
40
|
# configure ssh daemon
|
|
43
41
|
# veewee validate uses password authentication, so we have to enable it
|
|
44
42
|
cat <<DATAEOF > "$chroot/etc/ssh/sshd_config"
|
|
43
|
+
Protocol 2
|
|
45
44
|
HostBasedAuthentication no
|
|
46
45
|
IgnoreUserKnownHosts yes
|
|
47
46
|
PasswordAuthentication yes
|
|
@@ -54,4 +53,34 @@ Subsystem sftp internal-sftp
|
|
|
54
53
|
UseDNS no
|
|
55
54
|
UsePAM yes
|
|
56
55
|
UsePrivilegeSeparation sandbox
|
|
57
|
-
|
|
56
|
+
|
|
57
|
+
# X11 features need openssh emerged with USE flag "X"
|
|
58
|
+
X11Forwarding yes
|
|
59
|
+
X11DisplayOffset 10
|
|
60
|
+
X11UseLocalhost yes
|
|
61
|
+
DATAEOF
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# Set locale (glibc)
|
|
65
|
+
|
|
66
|
+
# generate locale
|
|
67
|
+
chroot "$chroot" /bin/bash <<DATAEOF
|
|
68
|
+
echo en_US.UTF-8 UTF-8 >> /etc/locale.gen
|
|
69
|
+
#echo ja_JP.UTF-8 UTF-8 >> /etc/locale.gen
|
|
70
|
+
#echo fa_IR UTF-8 >> /etc/locale.gen
|
|
71
|
+
locale-gen
|
|
72
|
+
DATAEOF
|
|
73
|
+
|
|
74
|
+
# set locale
|
|
75
|
+
chroot "$chroot" /bin/bash <<DATAEOF
|
|
76
|
+
echo LC_ALL=\"$locale\" >> /etc/env.d/02locale
|
|
77
|
+
echo LC_TYPE=\"$locale\" >> /etc/env.d/02locale
|
|
78
|
+
env-update && source /etc/profile
|
|
79
|
+
DATAEOF
|
|
80
|
+
|
|
81
|
+
# make hostname shorter
|
|
82
|
+
cat <<DATAEOF > "$chroot/etc/conf.d/hostname"
|
|
83
|
+
# Set to the hostname of this machine
|
|
84
|
+
hostname="local"
|
|
85
|
+
DATAEOF
|
|
86
|
+
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
source /etc/profile
|
|
3
3
|
|
|
4
4
|
# add package keywords
|
|
5
|
-
cat <<DATAEOF >> "$chroot/etc/portage/package.
|
|
6
|
-
app-emulation/virtualbox-guest-additions ~amd64
|
|
5
|
+
cat <<DATAEOF >> "$chroot/etc/portage/package.accept_keywords/virtualbox-guest-additions"
|
|
6
|
+
app-emulation/virtualbox-guest-additions ~x86 ~amd64
|
|
7
7
|
DATAEOF
|
|
8
8
|
|
|
9
9
|
# unmask
|
|
10
|
-
cat <<DATAEOF >> "$chroot/etc/portage/package.unmask"
|
|
11
|
-
>=app-emulation/virtualbox-guest-additions-4.
|
|
10
|
+
cat <<DATAEOF >> "$chroot/etc/portage/package.unmask/virtualbox-guest-additions"
|
|
11
|
+
>=app-emulation/virtualbox-guest-additions-4.3.0
|
|
12
12
|
DATAEOF
|
|
13
13
|
|
|
14
14
|
# install the virtualbox guest additions, add vagrant and root to group vboxguest
|
|
@@ -17,7 +17,8 @@ chroot "$chroot" /bin/bash <<DATAEOF
|
|
|
17
17
|
emerge sys-apps/dbus app-emulation/virtualbox-guest-additions
|
|
18
18
|
# we need this as gentoo doesn't do it on its own
|
|
19
19
|
groupadd -r vboxsf
|
|
20
|
-
mkdir /media && chgrp vboxsf /media
|
|
20
|
+
mkdir -p /media && chgrp vboxsf /media
|
|
21
21
|
rc-update add dbus default # required by virtualbox-guest-additions service
|
|
22
22
|
rc-update add virtualbox-guest-additions default
|
|
23
23
|
DATAEOF
|
|
24
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
date > /etc/vagrant_box_build_time
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
apt-get -y autoremove
|
|
2
|
+
|
|
3
|
+
dd if=/dev/zero of=/EMPTY bs=1M
|
|
4
|
+
rm -f /EMPTY
|
|
5
|
+
|
|
6
|
+
echo "cleaning up dhcp leases"
|
|
7
|
+
rm /var/lib/dhcp/*
|
|
8
|
+
|
|
9
|
+
echo "cleaning up udev rules"
|
|
10
|
+
rm /etc/udev/rules.d/70-persistent-net.rules
|
|
11
|
+
mkdir /etc/udev/rules.d/70-persistent-net.rules
|
|
12
|
+
rm -rf /dev/.udev/
|
|
13
|
+
rm /lib/udev/rules.d/75-persistent-net-generator.rules
|
|
14
|
+
|
|
15
|
+
echo "pre-up sleep 2" >> /etc/network/interfaces
|
|
16
|
+
exit
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Veewee::Session.declare({
|
|
2
|
+
:cpu_count => '1',
|
|
3
|
+
:memory_size => '512',
|
|
4
|
+
:disk_size => '65536',
|
|
5
|
+
:disk_format => 'VDI',
|
|
6
|
+
:hostiocache => 'off',
|
|
7
|
+
:os_type_id => 'Ubuntu_64',
|
|
8
|
+
:iso_file => "ubuntu-13.10-server-amd64.iso",
|
|
9
|
+
:iso_src => "http://releases.ubuntu.com/13.10/ubuntu-13.10-server-amd64.iso",
|
|
10
|
+
:iso_md5 => "4d1a8b720cdd14b76ed9410c63a00d0e",
|
|
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/modelcode=SKIP keyboard-configuration/layout=us keyboard-configuration/variant=us 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 => [
|
|
34
|
+
"build_time.sh",
|
|
35
|
+
"apt.sh",
|
|
36
|
+
"sudo.sh",
|
|
37
|
+
"vagrant.sh",
|
|
38
|
+
"ruby.sh",
|
|
39
|
+
"chef.sh",
|
|
40
|
+
"puppet.sh",
|
|
41
|
+
"vbox.sh",
|
|
42
|
+
# "parallels.sh",
|
|
43
|
+
"cleanup.sh"
|
|
44
|
+
],
|
|
45
|
+
:postinstall_timeout => "10000"
|
|
46
|
+
})
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
## Options to set on the command line
|
|
2
|
+
d-i debian-installer/locale string en_US.utf8
|
|
3
|
+
d-i console-setup/ask_detect boolean false
|
|
4
|
+
d-i console-setup/layout string us
|
|
5
|
+
|
|
6
|
+
d-i netcfg/get_hostname string unassigned-hostname
|
|
7
|
+
d-i netcfg/get_domain string unassigned-domain
|
|
8
|
+
|
|
9
|
+
d-i time/zone string UTC
|
|
10
|
+
d-i clock-setup/utc-auto boolean true
|
|
11
|
+
d-i clock-setup/utc boolean true
|
|
12
|
+
|
|
13
|
+
d-i kbd-chooser/method select American English
|
|
14
|
+
|
|
15
|
+
d-i netcfg/wireless_wep string
|
|
16
|
+
|
|
17
|
+
d-i base-installer/kernel/override-image string linux-server
|
|
18
|
+
|
|
19
|
+
d-i debconf debconf/frontend select Noninteractive
|
|
20
|
+
|
|
21
|
+
d-i pkgsel/install-language-support boolean false
|
|
22
|
+
tasksel tasksel/first multiselect standard, ubuntu-server
|
|
23
|
+
|
|
24
|
+
d-i partman-auto/method string lvm
|
|
25
|
+
|
|
26
|
+
d-i partman-lvm/confirm boolean true
|
|
27
|
+
d-i partman-lvm/device_remove_lvm boolean true
|
|
28
|
+
d-i partman-auto/choose_recipe select atomic
|
|
29
|
+
|
|
30
|
+
d-i partman/confirm_write_new_label boolean true
|
|
31
|
+
d-i partman/confirm_nooverwrite boolean true
|
|
32
|
+
d-i partman/choose_partition select finish
|
|
33
|
+
d-i partman/confirm boolean true
|
|
34
|
+
|
|
35
|
+
# Write the changes to disks and configure LVM?
|
|
36
|
+
d-i partman-lvm/confirm boolean true
|
|
37
|
+
d-i partman-lvm/confirm_nooverwrite boolean true
|
|
38
|
+
d-i partman-auto-lvm/guided_size string max
|
|
39
|
+
|
|
40
|
+
# Default user
|
|
41
|
+
d-i passwd/user-fullname string vagrant
|
|
42
|
+
d-i passwd/username string vagrant
|
|
43
|
+
d-i passwd/user-password password vagrant
|
|
44
|
+
d-i passwd/user-password-again password vagrant
|
|
45
|
+
d-i user-setup/encrypt-home boolean false
|
|
46
|
+
d-i user-setup/allow-password-weak boolean true
|
|
47
|
+
|
|
48
|
+
# Minimum packages (see postinstall.sh)
|
|
49
|
+
d-i pkgsel/include string openssh-server ntp
|
|
50
|
+
|
|
51
|
+
# Upgrade packages after debootstrap? (none, safe-upgrade, full-upgrade)
|
|
52
|
+
# (note: set to none for speed)
|
|
53
|
+
d-i pkgsel/upgrade select none
|
|
54
|
+
|
|
55
|
+
d-i grub-installer/only_debian boolean true
|
|
56
|
+
d-i grub-installer/with_other_os boolean true
|
|
57
|
+
d-i finish-install/reboot_in_progress note
|
|
58
|
+
|
|
59
|
+
d-i pkgsel/update-policy select none
|
|
60
|
+
|
|
61
|
+
choose-mirror-bin mirror/http/proxy string
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
apt-get -y install libyaml-0-2
|
|
2
|
+
RUBY_VERSION=2.0.0-p247
|
|
3
|
+
|
|
4
|
+
cd /tmp
|
|
5
|
+
|
|
6
|
+
wget http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-$RUBY_VERSION.tar.gz
|
|
7
|
+
tar xvzf ruby-$RUBY_VERSION.tar.gz
|
|
8
|
+
cd ruby-$RUBY_VERSION
|
|
9
|
+
./configure --prefix=/opt/ruby
|
|
10
|
+
make
|
|
11
|
+
make install
|
|
12
|
+
cd ..
|
|
13
|
+
rm -rf ruby-$RUBY_VERSION
|
|
14
|
+
rm ruby-$RUBY_VERSION.tar.gz
|
|
15
|
+
|
|
16
|
+
RUBYGEMS_VERSION=2.1.10
|
|
17
|
+
wget http://production.cf.rubygems.org/rubygems/rubygems-$RUBYGEMS_VERSION.tgz
|
|
18
|
+
tar xzf rubygems-$RUBYGEMS_VERSION.tgz
|
|
19
|
+
cd rubygems-$RUBYGEMS_VERSION
|
|
20
|
+
/opt/ruby/bin/ruby setup.rb
|
|
21
|
+
cd ..
|
|
22
|
+
rm -rf rubygems-$RUBYGEMS_VERSION
|
|
23
|
+
rm rubygems-$RUBYGEMS_VERSION.tgz
|
|
24
|
+
|
|
25
|
+
echo 'PATH=$PATH:/opt/ruby/bin/' > /etc/profile.d/vagrantruby.sh
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
mkdir /home/vagrant/.ssh
|
|
2
|
+
chmod 700 /home/vagrant/.ssh
|
|
3
|
+
cd /home/vagrant/.ssh
|
|
4
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
|
|
5
|
+
chmod 600 /home/vagrant/.ssh/authorized_keys
|
|
6
|
+
chown -R vagrant /home/vagrant/.ssh
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Without libdbus virtualbox would not start automatically after compile
|
|
2
|
+
apt-get -y install --no-install-recommends libdbus-1-3
|
|
3
|
+
|
|
4
|
+
# Remove existing VirtualBox guest additions
|
|
5
|
+
/etc/init.d/virtualbox-ose-guest-utils stop
|
|
6
|
+
rmmod vboxguest
|
|
7
|
+
aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils
|
|
8
|
+
aptitude -y install dkms
|
|
9
|
+
|
|
10
|
+
# Install the VirtualBox guest additions
|
|
11
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
|
12
|
+
VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso
|
|
13
|
+
mount -o loop $VBOX_ISO /mnt
|
|
14
|
+
yes|sh /mnt/VBoxLinuxAdditions.run
|
|
15
|
+
umount /mnt
|
|
16
|
+
|
|
17
|
+
# Cleanup
|
|
18
|
+
rm $VBOX_ISO
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: veewee
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.10
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -1208,21 +1208,25 @@ files:
|
|
|
1208
1208
|
- templates/funtoo-latest-generic_64-stable/postinstall2.sh
|
|
1209
1209
|
- templates/funtoo-latest-x86_64/definition.rb
|
|
1210
1210
|
- templates/funtoo-latest-x86_64/postinstall.sh
|
|
1211
|
+
- templates/gentoo-latest-amd64/add_chef.sh
|
|
1212
|
+
- templates/gentoo-latest-amd64/add_puppet.sh
|
|
1213
|
+
- templates/gentoo-latest-amd64/add_vim.sh
|
|
1211
1214
|
- templates/gentoo-latest-amd64/base.sh
|
|
1212
|
-
- templates/gentoo-latest-amd64/chef.sh
|
|
1213
1215
|
- templates/gentoo-latest-amd64/cleanup.sh
|
|
1214
1216
|
- templates/gentoo-latest-amd64/cron.sh
|
|
1215
1217
|
- templates/gentoo-latest-amd64/definition.rb
|
|
1218
|
+
- templates/gentoo-latest-amd64/git.sh
|
|
1216
1219
|
- templates/gentoo-latest-amd64/grub.sh
|
|
1217
1220
|
- templates/gentoo-latest-amd64/kernel.sh
|
|
1218
1221
|
- templates/gentoo-latest-amd64/nfs.sh
|
|
1219
|
-
- templates/gentoo-latest-amd64/puppet.sh
|
|
1220
1222
|
- templates/gentoo-latest-amd64/reboot.sh
|
|
1221
1223
|
- templates/gentoo-latest-amd64/ruby.sh
|
|
1222
1224
|
- templates/gentoo-latest-amd64/settings.sh
|
|
1225
|
+
- templates/gentoo-latest-amd64/subversion.sh
|
|
1223
1226
|
- templates/gentoo-latest-amd64/syslog.sh
|
|
1224
1227
|
- templates/gentoo-latest-amd64/vagrant.sh
|
|
1225
1228
|
- templates/gentoo-latest-amd64/virtualbox.sh
|
|
1229
|
+
- templates/gentoo-latest-amd64/wipe_sources.sh
|
|
1226
1230
|
- templates/gentoo-latest-amd64/zerodisk.sh
|
|
1227
1231
|
- templates/gentoo-latest-i686/base.sh
|
|
1228
1232
|
- templates/gentoo-latest-i686/chef.sh
|
|
@@ -1689,6 +1693,18 @@ files:
|
|
|
1689
1693
|
- templates/ubuntu-13.04-server-amd64/sudo.sh
|
|
1690
1694
|
- templates/ubuntu-13.04-server-amd64/vagrant.sh
|
|
1691
1695
|
- templates/ubuntu-13.04-server-amd64/vbox.sh
|
|
1696
|
+
- templates/ubuntu-13.10-server-amd64/apt.sh
|
|
1697
|
+
- templates/ubuntu-13.10-server-amd64/build_time.sh
|
|
1698
|
+
- templates/ubuntu-13.10-server-amd64/chef.sh
|
|
1699
|
+
- templates/ubuntu-13.10-server-amd64/cleanup.sh
|
|
1700
|
+
- templates/ubuntu-13.10-server-amd64/definition.rb
|
|
1701
|
+
- templates/ubuntu-13.10-server-amd64/parallels.sh
|
|
1702
|
+
- templates/ubuntu-13.10-server-amd64/preseed.cfg
|
|
1703
|
+
- templates/ubuntu-13.10-server-amd64/puppet.sh
|
|
1704
|
+
- templates/ubuntu-13.10-server-amd64/ruby.sh
|
|
1705
|
+
- templates/ubuntu-13.10-server-amd64/sudo.sh
|
|
1706
|
+
- templates/ubuntu-13.10-server-amd64/vagrant.sh
|
|
1707
|
+
- templates/ubuntu-13.10-server-amd64/vbox.sh
|
|
1692
1708
|
- templates/ubuntu-8.04.4-server-amd64/definition.rb
|
|
1693
1709
|
- templates/ubuntu-8.04.4-server-amd64/postinstall.sh
|
|
1694
1710
|
- templates/ubuntu-8.04.4-server-amd64/preseed.cfg
|
|
@@ -1901,7 +1917,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
1901
1917
|
version: '0'
|
|
1902
1918
|
segments:
|
|
1903
1919
|
- 0
|
|
1904
|
-
hash:
|
|
1920
|
+
hash: -1876719226549566323
|
|
1905
1921
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1906
1922
|
none: false
|
|
1907
1923
|
requirements:
|