Changes between Initial Version and Version 1 of DevEnvUsageNotes


Ignore:
Timestamp:
12/27/10 15:23:24 (11 years ago)
Author:
rik goldman
Comment:

First draft of usage notes for Dev VM from Chelsea School

Legend:

Unmodified
Added
Removed
Modified
  • DevEnvUsageNotes

    v1 v1  
     1[[TOC]]
     2= Introduction =
     3The dev env virtual machines for Virtualbox and VMware are configured to use have about 512MB of RAM. The virtual disk is configured to expand to 20GB.
     4
     5The machines are built on [http://www.turnkeylinux.org/core TurnKey Linux's Core], which is based on Ubuntu Lucid (the most recent long-term support release).
     6
     7
     8The machines boot to a menu of running services, which include web2py, Eden, [http://code.google.com/p/shellinabox/ Shellinabox], [http://www.webmin.com/ Webmin], and SSH/sftp. Exit the confconsole for a shell prompt. Startx starts [http://lxde.org/ LXDE], the desktop manager used by the development environment. From LXDE, Eclipse and Firefox with [http://getfirebug.com/ Firebug] are available. Ecplipse is configured according to the documentation [http://eden.sahanafoundation.org/wiki/DeveloperGuidelinesEclipse here]. I am not confident in the Eclipse pre-configuration and am in need of feedback.
     9
     10
     11The IRC client irssi starts from a command prompt and is configured to log in to #sahana-eden on irc.freenode.net.
     12
     13== Getting Started ==
     14   1. Import VM with Virtualbox. Start the VM. Alternatively, start the VM in VMware player or compatible platform.
     15   2. The machine starts up to the confconsole, a list of services with IP address and ports.
     16   3. Navigate to the command line (advanced, quit the configuration console)
     17   4. Login as dev: username=dev, password=eden
     18   5. startx to start the GUI
     19
     20== Credentials and Security ==
     21
     22Two users can login to the appliance:
     23
     24Username: root, Password: root
     25
     26
     27Username: dev, Password: eden
     28
     29Web2py has an admin interface with a password. That password is currently admin.
     30
     31It would be wise to secure the appliance. Here's a way to do that:
     32
     33Login as root (password=root).
     34
     35To change the root password type the following:
     36
     37{{{
     38passwd
     39}}}
     40
     41Then enter the new password twice.
     42
     43To change the password of user dev, type the following:
     44
     45{{{
     46passwd dev
     47}}}
     48
     49Enter the new password.
     50
     51== Usage Notes ==
     52
     53In the GUI (called LXDE), you have access to Firefox w/ Firebug, Eclipse, and a terminal. I presume you'll need all of these.
     54
     55
     56Eclipse should be preconfigured to work with Web2py and Eden. If I understand correctly, you should know more about this than I do. If it's not configured correctly:
     57
     581.Contact us via email or let me know over IRC (look for ghoulmann on #sahana-eden) what you are seeing vs what you should be seeing.
     59
     60
     612. If you have the will, configure Eclipse the way it should be configured: the instructions we follow are [http://eden.sahanafoundation.org/wiki/DeveloperGuidelinesEclipse here].
     62
     63== Update web2py and Eden ==
     64
     65User dev's home directory has two scripts, one to update web2py and one to update eden. Use them as follows:
     66
     67Open the terminal in LXDE (under accessories, called LXterminal). That will put you in the user dev's home directory, assuming you logged in as the user dev with the password eden.
     68
     69If you're logged in as dev: To pull web2py, for example, you could enter any  of the following:
     70
     71
     72{{{
     73sudo ./update_web2py
     74
     75
     76sudo ./update_web2py 2717
     77
     78
     79sudo ~/update_web2py
     80
     81
     82sudo ~/update_web2py 2717
     83
     84
     85sudo /home/dev/update_web2py 2717
     86}}}
     87
     88
     89So, use the revision number as a parameter to the command update_web2py. To pull without specifying a revision, just execute the command update_web2py. Note that for the script to work, you must pretend to be the root user. Use sudo to escalate your privileges temporarily (to those of root user).
     90
     91Same guidelines for updating Eden:
     92
     93{{{
     94
     95sudo ./update_eden
     96
     97
     98sudo ./update_eden 2120
     99
     100
     101sudo ~/update_eden
     102
     103
     104sudo /home/dev/update_eden 2120
     105}}}
     106
     107
     108What's the ./ all about? That tells the shell to look in the current directory for the script. Here's the long way around (and how to do it if you're not in your home directory:
     109
     110{{{
     111sudo /home/dev/update_eden
     112
     113
     114sudo /home/dev/update_web2py
     115}}}
     116
     117
     118OK then, what's the ~ all about? ~ tells the shell to look in the home directory for the command to execute.
     119== IRC with irssi ==
     120
     121The VM comes with an IRC client preconfigured to connect to #sahana-eden on irc.freenode.net.
     122
     123To use it:
     124
     1251. Access the terminal from the GUI (LXDE) by looking in Accessories for LXterminal.
     126
     127
     1282. At the prompt, enter irssi -n nick, where nick=your nickname. It's my understanding that irssi will remember your nick.
     129
     130
     1313. Alternatively, start irssi with irssi. At the irssi prompt, enter the following, where nick=your nick:
     132
     133{{{
     134/nick nick
     135}}}
     136
     137== Shutting Down ==
     138
     139The GUI, LXDE, won't let you shutdown. The user dev does not have the privilieges. Don't forget and then get frustrated.
     140
     141To shutdown, get to the prompt with LXterminal and enter the following to escalate privileges and shutdown:
     142
     143{{{
     144sudo halt
     145}}}
     146
     147To restart do the same but enter the following:
     148
     149{{{
     150sudo shutdown -r now
     151}}}
     152
     153
     154If you power off the machine without shutting down in an appropriate way, you may feel shame as a result.