From cdfd32a12037e6bbb0ce636d44ec89e605ee0b66 Mon Sep 17 00:00:00 2001 From: dsc Date: Tue, 28 Feb 2012 14:23:06 -0800 Subject: [PATCH] Adds labs setup notes. --- msc/labs-notes.md | 62 +++++++++++++++++++++++++++++++++++++++ msc/reportcard.wmflabs.org.conf | 46 +++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 0 deletions(-) create mode 100644 msc/labs-notes.md create mode 100644 msc/reportcard.wmflabs.org.conf diff --git a/msc/labs-notes.md b/msc/labs-notes.md new file mode 100644 index 0000000..ec25078 --- /dev/null +++ b/msc/labs-notes.md @@ -0,0 +1,62 @@ +# labs notes + +Just random stuff you might be interested in, as I work. + + +## sudoers NOPASSWD + +My LDAP password is a jangly string of random characters. To avoid memorizing it (I use a password safe), I think we should add NOPASSWD to ourselves in `/etc/sudoers` under "# User privilege specification": + + dsc ALL=(ALL) NOPASSWD: ALL + otto ALL=(ALL) NOPASSWD: ALL + +These instances are disposable and our keys are secure enough imo, so I vote convenience > security. + + +## Installing node.js & other deps + +I'd prefer to do it via package manager (https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager) but the latest in the repo is 0.4.x and we need >=0.6.x. So source it is. + + sudo su - + aptitude install build-essential libev-dev libssl-dev + mkdir sources; cd sources + + # node.js + wget http://nodejs.org/dist/v0.6.11/node-v0.6.11.tar.gz + tar -xvf node-v0.6.11.tar.gz + cd node-v0.6.11 + ./configure && make && make install && make doc + cd .. + + # npm + curl http://npmjs.org/install.sh > npm-install.sh + sh ./npm-install.sh + + # git + aptitude install git-core gitdoc + + # coco, coffee (global) + npm install -g coco coffee-script + + + + +## Kraken + + # reminder -- your user's publickey needs to be in my gitosis repo for this to work + cd /srv + git clone git@less.ly:kraken-ui.git + cd kraken-ui + + sudo su - + cp -f /srv/kraken-ui/msc/reportcard.wmflabs.org.conf /etc/apache2/sites-available/reportcard + cd /etc/apache2/sites-enabled + ln -sf ../sites-available/reportcard ./ + exit + + mkdir logs + npm install + coke setup + ./lib/server/server.co + # ./lib/server/server.co >> logs/kraken.log & + diff --git a/msc/reportcard.wmflabs.org.conf b/msc/reportcard.wmflabs.org.conf new file mode 100644 index 0000000..0977756 --- /dev/null +++ b/msc/reportcard.wmflabs.org.conf @@ -0,0 +1,46 @@ + + DocumentRoot /var/www + ServerName reportcard.wmflabs.org + ServerAdmin noc@wikimedia.org + + ProxyRequests On + ProxyPreserveHost On + + Order allow,deny + Allow from all + # Order deny,allow + # Deny from all + # Allow from 127.0.0.1:8081 + + + RewriteEngine On + # RewriteCond %{REQUEST_FILENAME} !^/(reportCard|beta|wiki) + RewriteRule ^(.*) http://127.0.0.1:8081$1 [P] + + + Options FollowSymLinks + AllowOverride None + + + Options Indexes FollowSymLinks MultiViews + AllowOverride None + Order allow,deny + allow from all + + + Alias /reportCard /srv/reportcard/production/webapp + Alias /beta /srv/reportcard/staging/webapp/frontend/proof_of_concept + Alias /wiki /srv/mediawiki-1.18.0 + + DirectoryIndex reportcardModules.html + + + + DirectoryIndex reportcardModules.html + + + ErrorLog /var/log/apache2/error.log + LogLevel warn + CustomLog /var/log/apache2/access.log combined + ServerSignature Off + -- 1.7.0.4