Changes between Initial Version and Version 1 of DevEnvBuildNotes


Ignore:
Timestamp:
12/27/10 16:52:35 (14 years ago)
Author:
rik goldman
Comment:

Completed; ready for proofing

Legend:

Unmodified
Added
Removed
Modified
  • DevEnvBuildNotes

    v1 v1  
     1[[TOC]]
     2
     3= Build Notes =
     4
     5== Configure Virtual Machine ==
     6Create a new virtual machine; configure for 1 processor, 512GB RAM, 20GB monolithic elastic hard drive. Install [http://sourceforge.net/projects/turnkeylinux/files/turnkey-core/ 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.
     9
     10{{{
     11#!/bin/bash -ex
     12#set hostname
     13HOSTNAME=eden-dev
     14echo "$HOSTNAME" > /etc/hostname
     15sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts
     16#install
     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 http://ppa.launchpad.net/chris-lea/python-tweepy/ubuntu lucid main \n
     24deb-src http://ppa.launchpad.net/chris-lea/python-tweepy/ubuntu lucid main" >> /etc/apt/sources.list.d/sources.list
     25apt-key adv --keyserver keyserver.ubuntu.com --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/web2py.ubuntu.sh /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/000_config.py /home/web2py/applications/eden/models/000_config.py
     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
     50}}}
     51
     52The rest could be scripted using sed; it has not been.
     53
     54== Set Web2py as Service ==
     55
     56Change daemon directory to /home/$name and change user to root in /etc/init.d/web2py; add -i 0 127.0.0.1 to arguments.
     57
     58{{{
     59vim /etc/init.d/web2py
     60}}}
     61
     62== Customize Configuration Console ==
     63Add web2py, http://$ipaddr:8000 and add Eden, http://$ipaddr:8000/eden to the services list:
     64
     65{{{
     66vim /etc/confconsole/services.txt
     67}}}
     68
     69== Configure 000_config.py ==
     70Set edited to True (case sensitive):
     71
     72{{{
     73vim /home/web2py/applications/eden/models/000_config.py
     74}}}
     75
     76== Configure the Dev Env ==
     77
     78
     79{{{
     80shutdown -r now
     81}}}
     82
     83Login as dev (password eden)
     84
     85{{{
     86startx
     87}}}
     88
     89=== Configure Firefox ===
     90Start Firefox. Check http://localhost:8000/eden to ensure Eden works.
     91
     92In Firefox, set Eden as homepage.
     93
     94Set bookmarks.
     95
     96=== Configure irssi ===
     97
     98
     99Open terminal. Start irssi
     100
     101In irssi, enter the following (docs [http://irssi.org/documentation/startup#c3 here]):
     102
     103{{{
     104/SERVER ADD -auto freenode irc.freenode.net 6667
     105/NETWORK ADD freenode
     106/CHANNEL ADD -auto #sahana-eden freenode
     107}}}
     108
     109=== Configure Eclipse ===
     110Configure Eclipse according to docs [http://eden.sahanafoundation.org/wiki/DeveloperGuidelinesEclipse here].