Changes between Initial Version and Version 1 of DevEnvBuildNotes

12/27/10 16:52:35 (11 years ago)
rik goldman

Completed; ready for proofing


  • DevEnvBuildNotes

    v1 v1  
     3= Build Notes =
     5== Configure Virtual Machine ==
     6Create a new virtual machine; configure for 1 processor, 512GB RAM, 20GB monolithic elastic hard drive. Install [ TurnKey Core Lucid 11.0].
     7== Initial bash Script ==
     8Automate as much as possible with a bash script called install-dev-env. Use sftp client and upload to new machine; login to the machine and chmod +x install-dev-env. Execute the script with ./install-dev-env, for example.
     11#!/bin/bash -ex
     12#set hostname
     14echo "$HOSTNAME" > /etc/hostname
     15sed -i "s| \(.*\)| $HOSTNAME|" /etc/hosts
     17apt-get update
     18DEBIAN_FRONTEND=noninteractive apt-get -y \
     19    -o DPkg::Options::=--force-confdef \
     20    -o DPkg::Options::=--force-confold \
     21    install lxde irssi sudo python-lxml python-reportlab python-xlwt python-shapely bzr libgeos-3.1.0 eclipse xorg firefox firebug
     22#install python-tweepy
     23echo -e "deb lucid main \n
     24deb-src lucid main" >> /etc/apt/sources.list.d/sources.list
     25apt-key adv --keyserver --recv-keys C7917B12
     26apt-get update
     27apt-get install python-tweepy -y
     28#addusers and groups
     29useradd web2py
     30addgroup admin
     31useradd -G web2py,admin -m -p eden dev
     32#bzr web2py and eden
     33bzr branch -r 2717 lp:~mdipierro/web2py/devel /home/web2py/
     34bzr branch -r 1585 lp:sahana-eden /home/web2py/applications/eden
     35#Set up web2py service
     36cp /home/web2py/scripts/ /etc/init.d/web2py
     37chmod +x /etc/init.d/web2py
     38update-rc.d web2py defaults
     39#Copy Deployment-Templates
     40cp /home/web2py/applications/eden/deployment-templates/models/ /home/web2py/applications/eden/models/
     41cp /home/web2py/applications/eden/deployment-templates/cron/crontab /home/web2py/applications/eden/cron/crontab
     42#Change ownership for web2py
     43chown -R web2py:web2py /home/web2py
     44#Setup BZR Pull Script for web2py
     45echo "#! /bin/bash -ex \n cd /home/web2py \n if [ -z "$1" ]; then \n bzr pull \n else bzr pull $1 \N fi" > /home/dev/update_web2py
     46chmod +x /home/dev/update_web2py
     47#setup BZR Pull Script for Eden
     48echo "#! /bin/bash -ex \n cd /home/web2py/applications/eden \n if [ -z "$1" ]; then \n bzr pull \n else bzr pull $1 \N fi" > /home/dev/update_eden
     49chmod +x /home/dev/update_eden
     52The rest could be scripted using sed; it has not been.
     54== Set Web2py as Service ==
     56Change daemon directory to /home/$name and change user to root in /etc/init.d/web2py; add -i 0 to arguments.
     59vim /etc/init.d/web2py
     62== Customize Configuration Console ==
     63Add web2py, http://$ipaddr:8000 and add Eden, http://$ipaddr:8000/eden to the services list:
     66vim /etc/confconsole/services.txt
     69== Configure ==
     70Set edited to True (case sensitive):
     73vim /home/web2py/applications/eden/models/
     76== Configure the Dev Env ==
     80shutdown -r now
     83Login as dev (password eden)
     89=== Configure Firefox ===
     90Start Firefox. Check http://localhost:8000/eden to ensure Eden works.
     92In Firefox, set Eden as homepage.
     94Set bookmarks.
     96=== Configure irssi ===
     99Open terminal. Start irssi
     101In irssi, enter the following (docs [ here]):
     104/SERVER ADD -auto freenode 6667
     105/NETWORK ADD freenode
     106/CHANNEL ADD -auto #sahana-eden freenode
     109=== Configure Eclipse ===
     110Configure Eclipse according to docs [ here].