| 1 |
#/bin/sh |
| 2 |
# |
| 3 |
# freemoe-build-node-setup |
| 4 |
# Boot up Debian Lenny (in this case Amazon EC2 image ami-dcf615b5) |
| 5 |
# |
| 6 |
# wget http://gitorious.org/freemoe/freemoe/blobs/raw/master/bin/freemoe-build-node-setup |
| 7 |
# |
| 8 |
# sh ./freemoe-build-node-setup |
| 9 |
|
| 10 |
set -x |
| 11 |
|
| 12 |
apt-get update |
| 13 |
|
| 14 |
apt-get -y install git-core |
| 15 |
git clone git://gitorious.org/freemoe/freemoe.git |
| 16 |
cp freemoe/servers/fog/obra-node-gitconfig /root/.gitconfig |
| 17 |
cp freemoe/servers/fog/gitignore /etc/.gitignore |
| 18 |
cd /etc/ |
| 19 |
git init |
| 20 |
chmod og-rwx .git |
| 21 |
git add . |
| 22 |
git commit -a -m "obra node initial commit" |
| 23 |
apt-get update && apt-get -y dist-upgrade |
| 24 |
git add . |
| 25 |
git commit -a -m "obra node apt-get dist-upgrade" |
| 26 |
apt-get -y install build-essential debian-keyring autoconf automake1.9 libtool flex bison autoconf2.13 ncftp libncurses5-dev vim exuberant-ctags vim-scripts fakeroot debhelper python-central python-setuptools sudo python-m2crypto python-boto reprepro apt-mirror |
| 27 |
git add . |
| 28 |
git commit -a -m "obra node install build utils" |
| 29 |
|
| 30 |
echo "vm.vdso_enabled = 0" >> /etc/sysctl.conf |
| 31 |
sysctl -p |
| 32 |
git add . |
| 33 |
git commit -a -m "vm.vdso_enabled = 0 in sysctl.conf for /scratchbox" |
| 34 |
|
| 35 |
cd |
| 36 |
wget http://repository.maemo.org/stable/fremantle/maemo-scratchbox-install_5.0.sh http://repository.maemo.org/stable/fremantle/maemo-sdk-install_5.0.sh |
| 37 |
sh maemo-scratchbox-install_5.0.sh |
| 38 |
|
| 39 |
mkdir /root/DEBS |
| 40 |
cd /root/DEBS |
| 41 |
|
| 42 |
wget \ |
| 43 |
http://obra.freemoe.org/toolz/euca2ools_1.1-3_all.deb \ |
| 44 |
http://obra.freemoe.org/toolz/python-minideblib_0.6.21.29_all.deb \ |
| 45 |
http://obra.freemoe.org/toolz/sbdmock_0.4.4_all.deb \ |
| 46 |
http://obra.freemoe.org/toolz/python-boto_1.9b-2_all.deb \ |
| 47 |
http://obra.freemoe.org/toolz/python-m2crypto_0.20.1-1_i386.deb |
| 48 |
|
| 49 |
dpkg -i python-minideblib_0.6.21.29_all.deb \ |
| 50 |
sbdmock_0.4.4_all.deb \ |
| 51 |
python-boto_1.9b-2_all.deb python-m2crypto_0.20.1-1_i386.deb \ |
| 52 |
sbdmock_0.4.4_all.deb \ |
| 53 |
euca2ools_1.1-3_all.deb |
| 54 |
|
| 55 |
useradd -m --groups sbox builder |
| 56 |
|
| 57 |
/scratchbox/sbin/sbox_adduser builder |
| 58 |
|
| 59 |
wget http://gitorious.org/freemoe/freemoe/blobs/raw/master/LATEST-DEB |
| 60 |
wget `cat LATEST-DEB` |
| 61 |
dpkg -i freemoe*.deb |
| 62 |
|
| 63 |
cp maemo-sdk-install_5.0.sh /home/builder/ |
| 64 |
mkdir ~builder/.sbdmock/ |
| 65 |
cp freemoe/servers/obra/sbdmock/* ~builder/.sbdmock/ |
| 66 |
chown -R builder:builder ~builder/.sbdmock |
| 67 |
|
| 68 |
cd /home/builder/ |
| 69 |
su builder -c "sh maemo-sdk-install_5.0.sh -d" |
| 70 |
|
| 71 |
exit 0 |