boxgrinder-build 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +165 -0
- data/README +4 -0
- data/appliances/jeos.appl +22 -0
- data/appliances/meta.appl +41 -0
- data/bin/boxgrinder +23 -0
- data/docs/examples/appliances/appliances-appliance/appliances-appliance.appl +6 -0
- data/docs/examples/appliances/appliances-appliance/appliances-appliance.pp +16 -0
- data/docs/examples/appliances/minimal-appliance/minimal-appliance.appl +2 -0
- data/docs/examples/appliances/minimal-appliance/minimal-appliance.pp +16 -0
- data/docs/examples/appliances/mix-appliance/mix-appliance.appl +9 -0
- data/docs/examples/appliances/mix-appliance/mix-appliance.pp +16 -0
- data/docs/examples/appliances/packages-appliance/packages-appliance.appl +6 -0
- data/docs/examples/appliances/packages-appliance/packages-appliance.pp +16 -0
- data/docs/node-info/pom.xml +31 -0
- data/docs/node-info/src/main/webapp/META-INF/MANIFEST.MF +3 -0
- data/docs/node-info/src/main/webapp/WEB-INF/web.xml +7 -0
- data/docs/node-info/src/main/webapp/index.jsp +70 -0
- data/extras/sign-rpms +12 -0
- data/lib/boxgrinder-build/appliance-kickstart.rb +159 -0
- data/lib/boxgrinder-build/appliance.rb +52 -0
- data/lib/boxgrinder-build/boxgrinder.rb +92 -0
- data/lib/boxgrinder-build/erb/appliance.ks.erb +44 -0
- data/lib/boxgrinder-build/helpers/appliance-customize-helper.rb +92 -0
- data/lib/boxgrinder-build/helpers/aws-helper.rb +75 -0
- data/lib/boxgrinder-build/helpers/guestfs-helper.rb +86 -0
- data/lib/boxgrinder-build/helpers/rake-helper.rb +71 -0
- data/lib/boxgrinder-build/helpers/release-helper.rb +135 -0
- data/lib/boxgrinder-build/helpers/ssh-helper.rb +140 -0
- data/lib/boxgrinder-build/images/ec2-image.rb +301 -0
- data/lib/boxgrinder-build/images/raw-image.rb +137 -0
- data/lib/boxgrinder-build/images/vmware-image.rb +214 -0
- data/lib/boxgrinder-build/models/ssh-config.rb +44 -0
- data/lib/boxgrinder-build/validators/appliance-config-parameter-validator.rb +37 -0
- data/lib/boxgrinder-build/validators/appliance-definition-validator.rb +89 -0
- data/lib/boxgrinder-build/validators/appliance-dependency-validator.rb +163 -0
- data/lib/boxgrinder-build/validators/appliance-validator.rb +84 -0
- data/lib/boxgrinder-build/validators/aws-validator.rb +58 -0
- data/lib/boxgrinder-build/validators/config-validator.rb +67 -0
- data/lib/boxgrinder-build/validators/ssh-validator.rb +35 -0
- data/lib/boxgrinder-build/validators/validator.rb +91 -0
- data/lib/boxgrinder-build.rb +48 -0
- data/lib/progressbar/progressbar.rb +236 -0
- data/src/README.vmware +38 -0
- data/src/base.repo +4 -0
- data/src/base.vmdk +19 -0
- data/src/base.vmx +45 -0
- data/src/ec2/fstab_32bit +8 -0
- data/src/ec2/fstab_64bit +8 -0
- data/src/ec2/ifcfg-eth0 +7 -0
- data/src/ec2/rc_local +32 -0
- data/src/f12/yum.conf +24 -0
- data/src/motd.init +21 -0
- data/src/oddthesis/RPM-GPG-KEY-oddthesis +30 -0
- data/src/oddthesis/oddthesis.repo +23 -0
- metadata +197 -0
data/src/ec2/rc_local
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
homes=`find /home/* -maxdepth 0 -type d | tr '\n' ' '`
|
3
|
+
|
4
|
+
curl http://169.254.169.254/2009-04-04/meta-data/public-keys/0/openssh-key 2>/dev/null >/tmp/my-key
|
5
|
+
|
6
|
+
if [ $? -eq 0 ] ; then
|
7
|
+
if [ ! -d /root/.ssh ] ; then
|
8
|
+
mkdir -p /root/.ssh
|
9
|
+
chmod 700 /root/.ssh
|
10
|
+
fi
|
11
|
+
|
12
|
+
dd if=/dev/urandom count=50 2>/dev/null|md5sum|awk '{ print $1 }'|passwd --stdin root >/dev/null
|
13
|
+
cat /tmp/my-key >> /root/.ssh/authorized_keys
|
14
|
+
chmod 600 /root/.ssh/authorized_keys
|
15
|
+
|
16
|
+
for home in $homes; do
|
17
|
+
user=`echo $home | awk -F '/' '{ print $3 }'`
|
18
|
+
|
19
|
+
if [ ! -d $home/.ssh ] ; then
|
20
|
+
mkdir -p $home/.ssh
|
21
|
+
chmod 700 $home/.ssh
|
22
|
+
chown $user $home/.ssh
|
23
|
+
fi
|
24
|
+
|
25
|
+
dd if=/dev/urandom count=50 2>/dev/null|md5sum|awk '{ print $1 }'|passwd --stdin $user >/dev/null
|
26
|
+
cat /tmp/my-key >> $home/.ssh/authorized_keys
|
27
|
+
chmod 600 $home/.ssh/authorized_keys
|
28
|
+
chown $user $home/.ssh/authorized_keys
|
29
|
+
|
30
|
+
done
|
31
|
+
rm /tmp/my-key
|
32
|
+
fi
|
data/src/f12/yum.conf
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
[main]
|
2
|
+
cachedir=/var/cache/yum/$basearch/$releasever
|
3
|
+
keepcache=0
|
4
|
+
debuglevel=2
|
5
|
+
logfile=/var/log/yum.log
|
6
|
+
exactarch=1
|
7
|
+
obsoletes=1
|
8
|
+
gpgcheck=1
|
9
|
+
plugins=1
|
10
|
+
installonly_limit=3
|
11
|
+
exclude=udev*
|
12
|
+
|
13
|
+
# This is the default, if you make this bigger yum won't see if the metadata
|
14
|
+
# is newer on the remote and so you'll "gain" the bandwidth of not having to
|
15
|
+
# download the new metadata and "pay" for it by yum not having correct
|
16
|
+
# information.
|
17
|
+
# It is esp. important, to have correct metadata, for distributions like
|
18
|
+
# Fedora which don't keep old packages around. If you don't like this checking
|
19
|
+
# interupting your command line usage, it's much better to have something
|
20
|
+
# manually check the metadata once an hour (yum-updatesd will do this).
|
21
|
+
# metadata_expire=90m
|
22
|
+
|
23
|
+
# PUT YOUR REPOS HERE OR IN separate files named file.repo
|
24
|
+
# in /etc/yum.repos.d
|
data/src/motd.init
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
# motd Prepares /etc/motd file
|
4
|
+
#
|
5
|
+
# chkconfig: 2345 99 05
|
6
|
+
# description: Prepares /etc/motd file
|
7
|
+
#
|
8
|
+
### BEGIN INIT INFO
|
9
|
+
# Provides: ec2
|
10
|
+
# Default-Start: 2345
|
11
|
+
# Default-Stop: 0 1 6
|
12
|
+
# Short-Description: Prepares /etc/motd file
|
13
|
+
# Description: Prepares /etc/motd file
|
14
|
+
### END INIT INFO
|
15
|
+
|
16
|
+
HOSTNAME=`/bin/uname -a | awk '{print $2}'`
|
17
|
+
IP_ADDRESS=`ip addr list eth0 | grep "inet " | cut -d' ' -f6 | cut -d/ -f1`
|
18
|
+
|
19
|
+
echo -e "\nAppliance:\t#APPLIANCE# #VERSION#\nHostname:\t$HOSTNAME\nIP Address:\t$IP_ADDRESS\n" > /etc/motd
|
20
|
+
|
21
|
+
exit 0
|
@@ -0,0 +1,30 @@
|
|
1
|
+
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
2
|
+
Version: GnuPG v1.4.9 (GNU/Linux)
|
3
|
+
|
4
|
+
mQGiBElvb1cRBADrcvfRckstSodFlMkJtf0BMQm8XJj/F75uolRo8lyZ9SSrjhzt
|
5
|
+
fapRKsyu+UGvK6O0v8ctb9A9lB9qMuEDtzIzlGDtYxaTHsFSPjHVszN4FQb1lS9I
|
6
|
+
V1AnqDAjO3Rdxe5pzXawEDCzdY1OyTAALDNmaQOMB2L/9A9V0bJuX+ilfwCghT9M
|
7
|
+
ZFSFjJtTiZh/scywM31aH7MD/A8ak+RRZDprAZzobS6UdKbpdLBX1y1GD4LXBlNE
|
8
|
+
ydztVbvL2WN86X7SWx6ABQswjnBX1mAPRWBMMh7KIywsY4crDxo6DJtxmtrC7z2J
|
9
|
+
DZzkIpQfQIJ3Efpdxw7oo4k7kOZ7+o1raUAP+Afuq96dA2y8k5C+ZoGoCWwdtHGV
|
10
|
+
0erbA/47vMsfk52nMT/WJhzICbdgdLbaq2tfECixnQ87tgMaceSW9aObCBBAxOWW
|
11
|
+
0h8ouragmbPCMXRRYP/CuX/Vlwdp2e8k/O6nt1iIEgcjigVF13aSJMkSFK0HwZQb
|
12
|
+
FN0DvIOrkGLtGWQ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kh/F7
|
27
|
+
f9L4Ft8ta2BuCa9oiEkEGBECAAkFAklvb1cCGwwACgkQIp90s0whxNWdPgCdEBC/
|
28
|
+
xjCOdNp/uF8fjAGWhD/Jy9QAnRpZ3CfqJxMn6N8F5xIhK2KKw+02
|
29
|
+
=rRwA
|
30
|
+
-----END PGP PUBLIC KEY BLOCK-----
|
@@ -0,0 +1,23 @@
|
|
1
|
+
[oddthesis-$basearch]
|
2
|
+
name=Odd Thesis $basearch
|
3
|
+
failovermethod=priority
|
4
|
+
baseurl=http://repo.oddthesis.org/packages/#OS_NAME#/#OS_VERSION#/RPMS/$basearch/
|
5
|
+
enabled=1
|
6
|
+
gpgcheck=0
|
7
|
+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oddthesis
|
8
|
+
|
9
|
+
[oddthesis-noarch]
|
10
|
+
name=Odd Thesis noarch
|
11
|
+
failovermethod=priority
|
12
|
+
baseurl=http://repo.oddthesis.org/packages/#OS_NAME#/#OS_VERSION#/RPMS/noarch/
|
13
|
+
enabled=1
|
14
|
+
gpgcheck=0
|
15
|
+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oddthesis
|
16
|
+
|
17
|
+
[oddthesis-source]
|
18
|
+
name=Odd Thesis Source
|
19
|
+
failovermethod=priority
|
20
|
+
baseurl=http://repo.oddthesis.org/packages/#OS_NAME#/#OS_VERSION#/SRPMS/
|
21
|
+
enabled=0
|
22
|
+
gpgcheck=1
|
23
|
+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oddthesis
|
metadata
ADDED
@@ -0,0 +1,197 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: boxgrinder-build
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- BoxGrinder Project
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-03-15 00:00:00 +01:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: boxgrinder-core
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 0
|
30
|
+
- 1
|
31
|
+
version: 0.0.1
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: aws-s3
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
- 6
|
44
|
+
- 2
|
45
|
+
version: 0.6.2
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: amazon-ec2
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 0
|
57
|
+
- 9
|
58
|
+
- 6
|
59
|
+
version: 0.9.6
|
60
|
+
type: :runtime
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: net-sftp
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
segments:
|
70
|
+
- 2
|
71
|
+
- 0
|
72
|
+
- 4
|
73
|
+
version: 2.0.4
|
74
|
+
type: :runtime
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: net-ssh
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
segments:
|
84
|
+
- 2
|
85
|
+
- 0
|
86
|
+
- 20
|
87
|
+
version: 2.0.20
|
88
|
+
type: :runtime
|
89
|
+
version_requirements: *id005
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: rake
|
92
|
+
prerelease: false
|
93
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
segments:
|
98
|
+
- 0
|
99
|
+
- 8
|
100
|
+
- 7
|
101
|
+
version: 0.8.7
|
102
|
+
type: :runtime
|
103
|
+
version_requirements: *id006
|
104
|
+
description:
|
105
|
+
email: info@boxgrinder.org
|
106
|
+
executables:
|
107
|
+
- boxgrinder
|
108
|
+
extensions: []
|
109
|
+
|
110
|
+
extra_rdoc_files: []
|
111
|
+
|
112
|
+
files:
|
113
|
+
- lib/progressbar/progressbar.rb
|
114
|
+
- lib/boxgrinder-build.rb
|
115
|
+
- lib/boxgrinder-build/models/ssh-config.rb
|
116
|
+
- lib/boxgrinder-build/appliance-kickstart.rb
|
117
|
+
- lib/boxgrinder-build/validators/appliance-dependency-validator.rb
|
118
|
+
- lib/boxgrinder-build/validators/appliance-validator.rb
|
119
|
+
- lib/boxgrinder-build/validators/appliance-config-parameter-validator.rb
|
120
|
+
- lib/boxgrinder-build/validators/ssh-validator.rb
|
121
|
+
- lib/boxgrinder-build/validators/validator.rb
|
122
|
+
- lib/boxgrinder-build/validators/config-validator.rb
|
123
|
+
- lib/boxgrinder-build/validators/appliance-definition-validator.rb
|
124
|
+
- lib/boxgrinder-build/validators/aws-validator.rb
|
125
|
+
- lib/boxgrinder-build/appliance.rb
|
126
|
+
- lib/boxgrinder-build/helpers/aws-helper.rb
|
127
|
+
- lib/boxgrinder-build/helpers/guestfs-helper.rb
|
128
|
+
- lib/boxgrinder-build/helpers/ssh-helper.rb
|
129
|
+
- lib/boxgrinder-build/helpers/rake-helper.rb
|
130
|
+
- lib/boxgrinder-build/helpers/release-helper.rb
|
131
|
+
- lib/boxgrinder-build/helpers/appliance-customize-helper.rb
|
132
|
+
- lib/boxgrinder-build/images/ec2-image.rb
|
133
|
+
- lib/boxgrinder-build/images/raw-image.rb
|
134
|
+
- lib/boxgrinder-build/images/vmware-image.rb
|
135
|
+
- lib/boxgrinder-build/boxgrinder.rb
|
136
|
+
- lib/boxgrinder-build/erb/appliance.ks.erb
|
137
|
+
- src/motd.init
|
138
|
+
- src/f12/yum.conf
|
139
|
+
- src/base.vmx
|
140
|
+
- src/oddthesis/oddthesis.repo
|
141
|
+
- src/oddthesis/RPM-GPG-KEY-oddthesis
|
142
|
+
- src/README.vmware
|
143
|
+
- src/base.vmdk
|
144
|
+
- src/base.repo
|
145
|
+
- src/ec2/fstab_64bit
|
146
|
+
- src/ec2/rc_local
|
147
|
+
- src/ec2/ifcfg-eth0
|
148
|
+
- src/ec2/fstab_32bit
|
149
|
+
- appliances/jeos.appl
|
150
|
+
- appliances/meta.appl
|
151
|
+
- docs/node-info/pom.xml
|
152
|
+
- docs/node-info/src/main/webapp/WEB-INF/web.xml
|
153
|
+
- docs/node-info/src/main/webapp/META-INF/MANIFEST.MF
|
154
|
+
- docs/node-info/src/main/webapp/index.jsp
|
155
|
+
- docs/examples/appliances/packages-appliance/packages-appliance.appl
|
156
|
+
- docs/examples/appliances/packages-appliance/packages-appliance.pp
|
157
|
+
- docs/examples/appliances/mix-appliance/mix-appliance.appl
|
158
|
+
- docs/examples/appliances/mix-appliance/mix-appliance.pp
|
159
|
+
- docs/examples/appliances/minimal-appliance/minimal-appliance.appl
|
160
|
+
- docs/examples/appliances/minimal-appliance/minimal-appliance.pp
|
161
|
+
- docs/examples/appliances/appliances-appliance/appliances-appliance.pp
|
162
|
+
- docs/examples/appliances/appliances-appliance/appliances-appliance.appl
|
163
|
+
- extras/sign-rpms
|
164
|
+
- README
|
165
|
+
- LICENSE
|
166
|
+
has_rdoc: true
|
167
|
+
homepage: http://www.jboss.org/stormgrind/projects/boxgrinder.html
|
168
|
+
licenses: []
|
169
|
+
|
170
|
+
post_install_message:
|
171
|
+
rdoc_options: []
|
172
|
+
|
173
|
+
require_paths:
|
174
|
+
- lib
|
175
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
segments:
|
180
|
+
- 0
|
181
|
+
version: "0"
|
182
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
segments:
|
187
|
+
- 0
|
188
|
+
version: "0"
|
189
|
+
requirements: []
|
190
|
+
|
191
|
+
rubyforge_project:
|
192
|
+
rubygems_version: 1.3.6
|
193
|
+
signing_key:
|
194
|
+
specification_version: 3
|
195
|
+
summary: BoxGrinder Build files
|
196
|
+
test_files: []
|
197
|
+
|