Files
gitmine/bootstrap.sh
2011-03-24 08:10:13 +00:00

378 lines
14 KiB
Bash

#
# Automatically generated by blueprint(7). Edit at your own risk.
#
cd "$(dirname "$0")"
tar xf "3c2c34b659bfeba85250146246eeb20ac43e84e2.tar" -C "/usr/local"
mkdir -p "/etc/apache2/conf.d"
ln -s "/etc/javascript-common/javascript-common.conf" "/etc/apache2/conf.d/javascript-common.conf"
mkdir -p "/etc/apache2/sites-available"
cat >"/etc/apache2/sites-available/default" <<EOF
<VirtualHost *>
ServerAdmin webmaster@localhost
ServerName git.kennethreitz.com
DocumentRoot /usr/share/redmine/public
PassengerDefaultUser www-data
RailsEnv production
RailsBaseURI /
SetEnv X_DEBIAN_SITEID "default"
Alias "/redmine/plugin_assets/" /var/cache/redmine/default/plugin_assets/
# ProxyPass /ci http://localhost:8081/ci
# ProxyPassReverse /ci http://localhost:8081/ci
# ProxyRequests Off
# <Proxy http://localhost:8081/*>
# Order deny,allow
# Allow from all
# </Proxy>
<Directory "/usr/share/redmine/public">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
EOF
chmod 0644 "/etc/apache2/sites-available/default"
mkdir -p "/etc/apache2/sites-enabled"
ln -s "../sites-available/default" "/etc/apache2/sites-enabled/000-default"
mkdir -p "/etc/apt/sources.list.d"
cat >"/etc/apt/sources.list.d/devstructure.list" <<EOF
deb http://packages.devstructure.com/ maverick main
EOF
chmod 0644 "/etc/apt/sources.list.d/devstructure.list"
mkdir -p "/etc/cron.hourly"
cat >"/etc/cron.hourly/article_grabber.sh" <<EOF
#!/bin/sh
/usr/local/bin/notifo_cli.py -u kennethreitz -s x00286d7ac66c4792d95b19a8434c747c302ee3fa -n 'Winchester Star Ripper' -l 'Winchester Star Ripper' 'Ripping articles...'
/usr/local/bin/epio django --app winchestar -- import
EOF
chmod 0755 "/etc/cron.hourly/article_grabber.sh"
mkdir -p "/etc"
cat >"/etc/crontab" <<EOF
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
2 * * * * root cd / && run-parts --report /etc/cron.hourly
30 20 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
14 20 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
13 20 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
EOF
chmod 0644 "/etc/crontab"
mkdir -p "/etc/dbconfig-common"
cat >"/etc/dbconfig-common/config" <<EOF
# dbconfig-common system-wide configuration options
# dbc_remember_admin_pass: should we cache administrative passwords?
# set to "true" to keep admin passwords cached in debconf
dbc_remember_admin_pass='false'
# dbc_remote_questions_default: will we be likely to install on remote servers?
# set to "true" to raise the priority of debconf questions related to
# database installation on remote servers (for database types that support this)
dbc_remote_questions_default='false'
EOF
chmod 0600 "/etc/dbconfig-common/config"
mkdir -p "/etc/dbconfig-common/redmine/instances"
cat >"/etc/dbconfig-common/redmine/instances/default.conf" <<EOF
# automatically generated by the maintainer scripts of redmine/instances/default
# any changes you make will be preserved, though your comments
# will be lost! to change your settings you should edit this
# file and then run "dpkg-reconfigure redmine/instances/default"
# dbc_install: configure database with dbconfig-common?
# set to anything but "true" to opt out of assistance
dbc_install='true'
# dbc_upgrade: upgrade database with dbconfig-common?
# set to anything but "true" to opt out of assistance
dbc_upgrade='true'
# dbc_remove: deconfigure database with dbconfig-common?
# set to anything but "true" to opt out of assistance
dbc_remove=''
# dbc_dbtype: type of underlying database to use
# this exists primarily to let dbconfig-common know what database
# type to use when a package supports multiple database types.
# don't change this value unless you know for certain that this
# package supports multiple database types
dbc_dbtype='mysql'
# dbc_dbuser: database user
# the name of the user who we will use to connect to the database.
dbc_dbuser='redmine'
# dbc_dbpass: database user password
# the password to use with the above username when connecting
# to a database, if one is required
dbc_dbpass='7mdhDvjcY3'
# dbc_dbserver: database host.
# leave unset to use localhost (or a more efficient local method
# if it exists).
dbc_dbserver=''
# dbc_dbport: remote database port
# leave unset to use the default. only applicable if you are
# using a remote database.
dbc_dbport=''
# dbc_dbname: name of database
# this is the name of your application's database.
dbc_dbname='redmine_default'
# dbc_dbadmin: name of the administrative user
# this is the administrative user that is used to create all of the above
dbc_dbadmin='root'
# dbc_basepath: base directory to hold database files
# leave unset to use the default. only applicable if you are
# using a local (filesystem based) database.
dbc_basepath=''
##
## postgresql specific settings. if you don't use postgresql,
## you can safely ignore all of these
##
# dbc_ssl: should we require ssl?
# set to "true" to require that connections use ssl
dbc_ssl=''
# dbc_authmethod_admin: authentication method for admin
# dbc_authmethod_user: authentication method for dbuser
# see the section titled "AUTHENTICATION METHODS" in
# /usr/share/doc/dbconfig-common/README.pgsql for more info
dbc_authmethod_admin=''
dbc_authmethod_user=''
##
## end postgresql specific settings
##
EOF
chmod 0600 "/etc/dbconfig-common/redmine/instances/default.conf"
mkdir -p "/etc"
cat >"/etc/papersize" <<EOF
a4
EOF
chmod 0644 "/etc/papersize"
mkdir -p "/etc/redmine/default"
cat >"/etc/redmine/default/database.yml" <<EOF
production:
adapter: mysql
database: redmine_default
host: localhost
port:
username: redmine
password: 7mdhDvjcY3
encoding: utf8
EOF
chgrp www-data "/etc/redmine/default/database.yml"
chmod 0640 "/etc/redmine/default/database.yml"
mkdir -p "/etc/redmine/default"
cat >"/etc/redmine/default/session.yml" <<EOF
# This file was generated by 'rake generate_session_store',
# and should not be made visible to public.
# If you have a load-balancing Redmine cluster, you will need to use the
# same version of this file on each machine. And be sure to restart your
# server when you modify this file.
# Your secret key for verifying cookie session data integrity. If you
# change this key, all old sessions will become invalid! Make sure the
# secret is at least 30 characters and all random, no regular words or
# you'll be exposed to dictionary attacks.
production:
key: _redmine_default
secret: cf93656d6293babc11550bd676701c316360695153e12e6b65c2837f4fe70405d5925bde8b2bb5fe
development:
key: _redmine_default
secret: cf93656d6293babc11550bd676701c316360695153e12e6b65c2837f4fe70405d5925bde8b2bb5fe
test:
key: _redmine_default
secret: cf93656d6293babc11550bd676701c316360695153e12e6b65c2837f4fe70405d5925bde8b2bb5fe
EOF
chgrp www-data "/etc/redmine/default/session.yml"
chmod 0640 "/etc/redmine/default/session.yml"
mkdir -p "/etc/ssl/private"
cat >"/etc/ssl/private/ssl-cert-snakeoil.key" <<EOF
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDEbtBYtZ/X6WA+PIargDu3aJRYv1SH/CW5vluj8pN/0v9zMuvR
l/luhHOvdVHQSaq/HJfTfEcgYb2i1NGJz1RSS8QIhkjxSTy0ogAgSR//RtI8msAN
bGQTGiq45JDt59b/EEvikyyK+sFiRGer3iLdXf+DW1uUqvGujtoFnuVKCQIDAQAB
AoGBAL3s/xmmkqRqi5nhX7yWwiZ1wWmFpS/ORpOvUF/WfXMMCd3SkFwY+x02h7xQ
TQh9EdCyzsG22fafSoIUD32Vr0ooSlPcQs89c08UbxmA8gIZ0X5e7XqEQLsZwf4I
emd5Ok8075sqOoKb2IFnXYNfZzWWilYHMsyEnpYt9G0sgWV5AkEA76FWrK2IGj2/
2bDxI1kdmitjgHTKR2tL4QKLhbieifB30+GqJvNJqARoug7JxT/6eCdzwQPYVBHE
WM9uAOh7rwJBANHaCdK6bqL1XwD1MFwBB4Wkl8xQaVkTL7hyDczDm/FeyCNQpYtd
ji/sw19ROGePLl/gjxFE/81OtpoHiqD1a8cCQQCRbhtKRS7arisnFOnkCAudK0QC
C99PpOCyOHcwurENCjHPF5/Kb9B99d8RPDRcT83U6iyoMYsyym2dcJZUWsPlAkBC
KEASjC3W+A40ahgN2VE6w7ILeopLx62ys1pAZKakCKKF56XY8uyhlT3eredfVpdj
KJNR+XO/kQImOxxsNBL/AkAbWgLWRliIMJm/FeTk76lyjC/7Zmyi4dDNOgH78DTQ
WEFv5ke2JRloWcsKcbwzrRMPIbkFI8OH151QvNvqD6+o
-----END RSA PRIVATE KEY-----
EOF
chgrp ssl-cert "/etc/ssl/private/ssl-cert-snakeoil.key"
chmod 0640 "/etc/ssl/private/ssl-cert-snakeoil.key"
mkdir -p "/etc/sv/git-daemon"
cat >"/etc/sv/git-daemon/run" <<EOF
#!/bin/sh
exec 2>&1
echo 'git-daemon starting.'
exec chpst -ugitdaemon \
"$(git --exec-path)"/git-daemon --verbose --base-path=/srv/gitosis/repositories/
EOF
chmod 0755 "/etc/sv/git-daemon/run"
mkdir -p "/etc/sv/git-daemon"
cat >"/etc/sv/git-daemon/run.orig" <<EOF
#!/bin/sh
exec 2>&1
echo 'git-daemon starting.'
exec chpst -ugitdaemon \
"$(git --exec-path)"/git-daemon --verbose --base-path=/var/cache /var/cache/git
EOF
chmod 0755 "/etc/sv/git-daemon/run.orig"
apt-get -q update
apt-get -y install ack=1.39-12
apt-get -y install acl=2.2.49-3
apt-get -y install apache2-mpm-prefork=2.2.16-1ubuntu3
apt-get -y install apache2-utils=2.2.16-1ubuntu3
apt-get -y install apache2.2-bin=2.2.16-1ubuntu3
apt-get -y install apache2.2-common=2.2.16-1ubuntu3
apt-get -y install binutils=2.20.51.20100908-0ubuntu2
apt-get -y install blueprint=3.0.2-1
apt-get -y install ca-certificates=20090814
apt-get -y install curl=7.21.0-1ubuntu1
apt-get -y install dbconfig-common=1.8.46
apt-get -y install ethtool=1:2.6.34-2
apt-get -y install fgetty=0.6-5build1
apt-get -y install git=1:1.7.1-1.1
apt-get -y install git-daemon-run=1:1.7.1-1.1
apt-get -y install gitosis=0.2+20090917-7
apt-get -y install gnupg-curl=1.4.10-2ubuntu2
apt-get -y install javascript-common=7
apt-get -y install libactionmailer-ruby=2.3.5-1.1
apt-get -y install libactionmailer-ruby1.8=2.3.5-1.1
apt-get -y install libactionpack-ruby=2.3.5-1.1
apt-get -y install libactionpack-ruby1.8=2.3.5-1.1
apt-get -y install libactiverecord-ruby1.8=2.3.5-1.1
apt-get -y install libactiveresource-ruby=2.3.5-1.1
apt-get -y install libactiveresource-ruby1.8=2.3.5-1.1
apt-get -y install libactivesupport-ruby=2.3.5-1.1
apt-get -y install libactivesupport-ruby1.8=2.3.5-1.1
apt-get -y install libapache2-mod-passenger=2.2.11debian-1
apt-get -y install libapr1=1.4.2-3ubuntu1
apt-get -y install libaprutil1=1.3.9+dfsg-3build1
apt-get -y install libaprutil1-dbd-sqlite3=1.3.9+dfsg-3build1
apt-get -y install libaprutil1-ldap=1.3.9+dfsg-3build1
apt-get -y install libbreakpoint-ruby1.8=0.5.1-2
apt-get -y install libbuilder-ruby1.8=2.1.2-2
apt-get -y install libcmdparse2-ruby1.8=2.0.2-2
apt-get -y install libcurl3=7.21.0-1ubuntu1
apt-get -y install libcurl3-gnutls=7.21.0-1ubuntu1
apt-get -y install libdaemons-ruby1.8=1.0.10-2
apt-get -y install libdbd-mysql-perl=4.016-1
apt-get -y install libdbd-mysql-ruby=0.4.4-1
apt-get -y install libdbd-mysql-ruby1.8=0.4.4-1
apt-get -y install libdbi-perl=1.611-1
apt-get -y install libdbi-ruby1.8=0.4.3-2
apt-get -y install libdeprecated-ruby1.8=2.0.1-2
apt-get -y install libdigest-sha1-perl=2.13-1
apt-get -y install liberror-perl=0.17-1
apt-get -y install libfreetype6=2.4.2-2
apt-get -y install libhtml-template-perl=2.9-1
apt-get -y install libi18n-ruby1.8=0.3.6-1
apt-get -y install libjpeg62=6b-16.1
apt-get -y install libjs-jquery=1.4.2-2ubuntu1
apt-get -y install libjs-prototype=1.6.1-1
apt-get -y install libjs-scriptaculous=1.8.3-1
apt-get -y install liblcms1=1.18.dfsg-1ubuntu2
apt-get -y install liblog4r-ruby1.8=1.0.5-8
apt-get -y install liblua5.1-0=5.1.4-5
apt-get -y install libmemcache-client-ruby1.8=1.7.8-1
apt-get -y install libmmap-ruby1.8=0.2.6-3
apt-get -y install libmocha-ruby1.8=0.9.8-1
apt-get -y install libmysql-ruby1.8=2.8.2-1
apt-get -y install libmysqlclient16=5.1.49-1ubuntu8
apt-get -y install libncurses-ruby1.8=1.2.4-2
apt-get -y install libneon27-gnutls=0.29.3-2
apt-get -y install libnet-daemon-perl=0.43-1
apt-get -y install libpaper-utils=1.1.24
apt-get -y install libpaper1=1.1.24
apt-get -y install libpcap0.8=1.1.1-2
apt-get -y install libplrpc-perl=0.2020-2
apt-get -y install librack-ruby=1.1.0-3ubuntu1
apt-get -y install librack-ruby1.8=1.1.0-3ubuntu1
apt-get -y install libreadline5=5.2-7build1
apt-get -y install libredcloth-ruby1.8=4.2.2-1.1
apt-get -y install libruby1.8=1.8.7.299-2
apt-get -y install libruby1.8-extras=0.5
apt-get -y install libsqlite3-ruby1.8=1.2.4-2.1
apt-get -y install libsvn1=1.6.12dfsg-1ubuntu1
apt-get -y install libtext-format-ruby1.8=1.0.0-2
apt-get -y install libtmail-ruby1.8=1.2.3.1-1
apt-get -y install libtzinfo-ruby1.8=0.3.19-1
apt-get -y install libxslt1.1=1.1.26-6
apt-get -y install mysql-client-5.1=5.1.49-1ubuntu8
apt-get -y install mysql-client-core-5.1=5.1.49-1ubuntu8
apt-get -y install mysql-common=5.1.49-1ubuntu8
apt-get -y install mysql-server=5.1.49-1ubuntu8
apt-get -y install mysql-server-5.1=5.1.49-1ubuntu8
apt-get -y install mysql-server-core-5.1=5.1.49-1ubuntu8
apt-get -y install nmap=5.21-1~build1
apt-get -y install openssh-server=1:5.5p1-4ubuntu4
apt-get -y install openssl=0.9.8o-1ubuntu4.1
apt-get -y install python-docutils=0.6-5
apt-get -y install python-imaging=1.1.7-2
apt-get -y install python-lxml=2.2.6-1
apt-get -y install python-pkg-resources=0.6.14-3ubuntu1
apt-get -y install python-pygments=1.3.1+dfsg-1ubuntu1
apt-get -y install python-roman=0.6-5
apt-get -y install python-setuptools=0.6.14-3ubuntu1
apt-get -y install python2.6=2.6.6-5ubuntu1
apt-get -y install rails=2.3.5-1.1
apt-get -y install rails-ruby1.8=2.3.5-1.1
apt-get -y install rake=0.8.7-2
apt-get -y install redmine=1.0.0-4
apt-get -y install redmine-mysql=1.0.0-4
apt-get -y install rsync=3.0.7-2ubuntu1
apt-get -y install ruby=4.5
apt-get -y install ruby1.8=1.8.7.299-2
apt-get -y install rubygems=1.3.7-2
apt-get -y install rubygems1.8=1.3.7-2
apt-get -y install runit=2.1.1-4ubuntu1
apt-get -y install ssl-cert=1.0.26
apt-get -y install subversion=1.6.12dfsg-1ubuntu1
apt-get -y install unzip=6.0-4
apt-get -y install wwwconfig-common=0.2.1
apt-get -y install x11-common=1:7.5+6ubuntu3
apt-get -y install zip=3.0-3
easy_install-2.6 pip
pip install argparse
pip install blueprint
pip install epio
pip install httplib2
pip install notifo
pip install simplejson
gem1.8 install inifile -v0.3.0
gem1.8 install lockfile -v1.4.3
gem1.8 install net-ssh -v2.0.23
gem1.8 install rack -v1.2.2
gem1.8 install sinatra -v1.2.1
gem1.8 install tilt -v1.2.2