Adds labs setup notes.
authordsc <dsc@less.ly>
Tue, 28 Feb 2012 22:23:06 +0000 (14:23 -0800)
committerdsc <dsc@less.ly>
Tue, 28 Feb 2012 22:23:06 +0000 (14:23 -0800)
msc/labs-notes.md [new file with mode: 0644]
msc/reportcard.wmflabs.org.conf [new file with mode: 0644]

diff --git a/msc/labs-notes.md b/msc/labs-notes.md
new file mode 100644 (file)
index 0000000..ec25078
--- /dev/null
@@ -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 (file)
index 0000000..0977756
--- /dev/null
@@ -0,0 +1,46 @@
+<VirtualHost *:80>
+    DocumentRoot /var/www
+    ServerName reportcard.wmflabs.org
+    ServerAdmin noc@wikimedia.org
+    
+    ProxyRequests On
+    ProxyPreserveHost On
+    <Proxy *>
+        Order allow,deny
+        Allow from all
+        # Order deny,allow
+        # Deny from all
+        # Allow from 127.0.0.1:8081
+    </Proxy>
+    
+    RewriteEngine On
+    # RewriteCond %{REQUEST_FILENAME} !^/(reportCard|beta|wiki)
+    RewriteRule ^(.*) http://127.0.0.1:8081$1 [P]
+    
+    <Directory />
+        Options FollowSymLinks
+        AllowOverride None
+    </Directory>
+    <Directory /var/www/>
+        Options Indexes FollowSymLinks MultiViews
+        AllowOverride None
+        Order allow,deny
+        allow from all
+    </Directory>
+    
+    Alias /reportCard /srv/reportcard/production/webapp
+    Alias /beta /srv/reportcard/staging/webapp/frontend/proof_of_concept
+    Alias /wiki /srv/mediawiki-1.18.0
+    <Location "/reportCard">
+        DirectoryIndex reportcardModules.html
+    </Location>
+    
+    <Location "/beta">
+        DirectoryIndex reportcardModules.html
+    </Location>
+    
+    ErrorLog /var/log/apache2/error.log
+    LogLevel warn
+    CustomLog /var/log/apache2/access.log combined
+    ServerSignature Off
+</VirtualHost>