Changes between Version 3 and Version 4 of InstallationGuidelines/VirtualMachine


Ignore:
Timestamp:
11/06/11 14:20:22 (13 years ago)
Author:
Pat Tressel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/VirtualMachine

    v3 v4  
    77 * Bazaar (bzr) -- revision control system used on Launchpad, where Sahana eden sources are hosted.
    88 * Firefox with Firebug for viewing HTTP messages sent to and from the browser.
    9  * Eclipse with PyDev for editing and debugging Python code.
     9 * Eclipse with PyDev for editing and debugging Python code.
     10 * Aliases for common commands.
    1011
    1112== Get the Sahana Eden development kit image ==
     
    4647 * Select NAT mode.
    4748
    48 == Configuration of the guest system ==
     49== Configure the guest system ==
    4950
     51=== Security and accounts ===
     52''root'' password is set through a dialog box on first boot.
    5053
    51 
    52 Configure the included !Eclipse/PyDev:
    53  * DeveloperGuidelinesEclipse#Configuration
    54 -----
    55 
    56 
    57 
    58 == Notes ==
    59 
    60 The virtual machine image is based on a [BluePrintlivecdinstaller blueprint] and are configured to use about 512MB of RAM. The virtual disk is configured to expand to 20GB. The virtual machine is built on [http://www.turnkeylinux.org/core TurnKey Linux's Core], which in turn is based on Ubuntu 10.04 (Lucid -- the most recent long-term support release). The machine runs [http://code.google.com/p/shellinabox/ Shellinabox], [http://www.webmin.com/ Webmin], and SSH/sftp as services from startup.
    61 
    62 The development environment is configured to launch [http://lxde.org LXDE], a lightweight desktop environment after the first boot. From LXDE, Eclipse with Pydev, Firefox with Firebug, iPython and irssi are accessible.
    63 
    64 
    65 
    66 === Getting Started ===
    67  1. [InstallationGuidelinesVirtualMachine#download Download] the Image
    68  2. Uncompress the image: [http://www.7-zip.org/download.html 7zip] is a very effective FOSS tool for systems running Microsoft OSs. In Linux distros, the following command should work:
    69 {{{
    70 tar xvzf eden-dev-env.tar.gz (for example) #extract to current working directory
    71 }}}
    72 To run the image, you need to install either !VirtualBox or VMWare:
    73 
    74 ==== !VirtualBox Installation ====
    75  3. Download [http://download.virtualbox.org/virtualbox/vboxdownload.html VirtualBox]
    76  4. Install !VirtualBox
    77  5. Import the Virtual Appliance:
    78  * File menu | Import Appliance
    79  * Click on the Choose button and navigate to and select the uncompressed image (the .ovf file)
    80  * Next
    81  * Accept the default appliance options unless you have a reason to make a specific change
    82  6. The VM will appear in the left window pane, and the settings will appear in the right. Scroll down on the right side until you see "Network." Click network to specify the NIC (e.g. switch to wireless) and choose between bridged and NAT mode.
    83  7. Start the Virtual Appliance by double-clicking the icon on the left.
    84 
    85 ===== Troubleshooting !VirtualBox =====
    86 It's been reported that VMs derived from patched ISOs, as these have, may have network problems. Read [http://www.turnkeylinux.org/docs/virtualization/udev-persistent-net-generation this] article to work the solution. Contact us if you still have problems. There's no way for us to test whether there will be problems in your case.
    87 
    88 ''Network Configuration''
    89 
    90 Solutions will be here.
    91 
    92 ''Import Fails''
    93 
    94 '''Scenario'''
    95 
    96 After first step of import, !VirtualBox OSE 3.1.6 reports the following:
    97 "Failed to import appliance /path/to/appliance/!NewDev.ofg. Too many IDE controllers in OVF; import facility only supports one."
    98 
    99 '''First Solution''':
    100  1. File | Virtual Machine Manager: Select the hard disks tab and press add disk icon. Browse to and select !NewDev.vmdk. Click OK.
    101  2. Click the New icon. Click next. Name: !NewDev; Operating System: Linux; Version: Ubuntu. Click next.
    102  3. Base Memory Size: 384MB. Click Next.
    103  4. Select "Use Existing Hard Disk"; choose !NewDev.vmdk. Click Next. Click finish.
    104  5. Selct !NewDev on the left; scroll down to network on the right. Ensure the appropriate network adapter and settings for your circumstances are selected.
    105 
    106 ''Boot Process Halts''
    107 
    108 '''Scenario'''
    109 
    110 When started in !VirtualBox OSE 3.1.6, !NewDev boot process halts at "Starting Initialization Hooks".
    111 
    112 '''Solution'''
    113 
    114 Coming soon.
    115 
    116 ==== VMWare Installation ====
    117 ''Import''
    118 
    119 To import the download VM into VMware (e.g. Fusion), use the following steps.
    120  3. File > New
    121  4. Click Continue without disc
    122  5. Select Use an existing virtual disk
    123  6. Select !NewDev.vmdk
    124  7. Select Make a separate copy of the virtual disk
    125  8. Click Choose
    126  9. Click Continue
    127  10. OS=Linux and Version=Ubuntu should be selected, click Continue, Click Finish
    128  11. Enter name for new VMware image e.g. Eden in the Virtual Machines directory
    129  12. Click Save
    130  13. Press the green play icon to start the virtual machine.
    131 
    132 Remember to install the Linux VMware Tools after starting up the Eden machine using Virtual Machine > Install VMware Tools
    133 {{{
    134 sudo su -
    135 ./vmware-install.pl
    136 }}}
    137 And accept all the default options
    138 
    139 ''VMWware Converter''
    140 Version 4.0.1: "Cannot be deployed on the target hardware"
    141 
    142 ''VMware Player 3.1.1 (Ubuntu)''
    143 
    144 No File|Import option. Nor can one build a VM with a preexisting VMDK.
    145 
    146 ''VMware Workstation 7.1.1''
    147 
    148  1. File | New | Virtual Machine
    149  2. Custom, click Next
    150  3. Workstation 7.x, click Next
    151  4. I will install the operating system later, click Next
    152  5. Name: !NewVM; Location: /path/to/virtualmachines/; click Next; click Next.
    153  6. 360 MP; click Next
    154  7. Select appropriate network connection for your scenario (bridged or NAT), click Next.
    155  8. LSI Logic, click Next.
    156  9. Use an existing virtual disk; click Next.
    157  10. Browse to !NewDev.vmdk; click Next.
    158  11. Finish; Close.
    159  12. Press the play icon or "Power on this virtual machine".
    160 
    161 ===== Troubleshooting VMware Tools Install =====
    162  * Open LXTerminal and browse to the folder containing vmware-install.pl.
    163 {{{
    164 pwd #displays the current location in the filesystem
    165 cd /absolut/path/to/folder # change directory to the one containing vmware-install.pl
    166 sudo ./vmware-install.pl #start installation script
    167 }}}
    168  * Download Build Tools
    169  *Option 1: Open Synaptic in the LXDE menu, update, then search for build-essential
    170  *Option 2: Open LXTerminal and install build-essential from the command line:
    171 {{{
    172 sudo apt-get update
    173 sudo apt-get install -y build-essential
    174 }}}
    175 
    176 === User Accounts ===
    177 Root password is set through a dialog box on first boot.
    178 
    179 The user named ''dev'' should have it's password set from the command line when first boot is complete with the command:
     54The user named ''dev'' should have it's password set from the command line, when first boot is complete, with the command:
    18055{{{
    18156passwd dev
    18257}}}
    18358
    184 You should then reboot & use the Graphical User Interface to login as the user 'dev'.
     59You should then reboot & use the GUI to login as the user 'dev'.
    18560
    186 Web2py administration password is set during the debugging process with either of the following commands and arguments, both of which would set the admin password to "admin":
     61Note: There is no practical reason to login in as ''root''.
     62If one needs root privileges, ''dev'' has sudo privileges. In a terminal window, to execute one command or a pipeline of commands as root:
    18763{{{
    188 /home/dev/web2py.py -a admin -i 127.0.0.1 -p 80
     64sudo command-to-execute-as-root
     65}}}
     66This will prompt for a password if sudo hasn't been run recently -- it is asking for the ''dev'' password.
    18967
    190 /home/dev/web2py.py --password admin -i 127.0.0.1 -p 80
     68To change passwords after first boot: log in as ''dev'', start a terminal window, and enter the following commands:
     69{{{
     70sudo passwd root #change root password
     71passwd #change dev password
    19172}}}
    19273
    193 Credentials for the previous version:
    194 ||Username: ''dev''||||Password: ''eden''||
    195 ||Username: ''root''||||Password: ''root''||
     74The Web2py administration password is set when Web2py is started. For starting Web2py from the command line:
     75{{{
     76/home/dev/web2py.py -a xxx -i 127.0.0.1 -p 80
     77}}}
     78Replace {{{xxx}}} with the password you want.
    19679
    197 ==== Root User ====
    198 There is no practical reason to login in as ''root''.
    199 
    200 If one needs root privileges, ''dev'' can have them. The following lines offer strategies for escalating ''dev''s privileges from the command line. Start LXTerminal and use one of the following strategies.
    201 {{{
    202 sudo command-to-execute-as-root #executes on command or pipeline of commands as root.
    203 su - root #Switch user to root
    204 command to execute #1 command executed as root
    205 command to execute #2nd command to execute as root
    206 command to excecute #3rd command to execute as root
    207 exit # Exit using root's account and shell
    208 }}}
    209 
    210 ==== Secure the System ====
    211 Change the default passwords to secure the system.
    212 Log in as ''dev'', start LXTerminal, and enter the following commands to change passwords:
    213 {{{
    214 sudo passwd root #interactive change root password
    215 passwd #Interactive change dev password
    216 }}}
    217 It's also important to keep get security updates from online; login as ''dev'' and execute the following:
     80Although it's usually good to get security updates for the operating system and applications, updating may lead to incompatibilities with other software, and has been known to render the system unusable. So do the following only if you know there is a security issue, and not when you're in the middle of something critical.[[br]]
     81Log in as ''dev'' and execute the following:
    21882{{{
    21983sudo apt-get update
     
    22185}}}
    22286
    223 === Filesystem ===
     87=== File locations ===
    22488Web2py is located in /home/web2py. Eden is located in /home/web2py/applications/eden. Eclipse and PyDev are preconfigured with this information.
    22589
     
    239103
    240104==== Web2Py shell ====
    241 launch a Web2py shell in the Eden environment
     105Launch a Web2py shell in the Eden environment (apologies for the oddly named script).
    242106{{{
    243107import_eden
    244108}}}
    245 NB Script seems oddly named
    246109
    247 == Troubleshooting older Releases ==
    248 Note: If you get a ticket when running the application for the 1st time with a message like "!OperationalError: Cannot add a UNIQUE column" then you need to stop the debugger, delete the contents of the databases folder & then start debugging again (there was an old database accidentally left on the system which cannot be auto-migrated - a new image without this issue has been uploaded):
    249 {{{
    250 rm -rf ~/Desktop/web2py/applications/eden/databases/*
    251 }}}
     110=== Eclipse ===
     111Configure the included !Eclipse/PyDev:
     112 * DeveloperGuidelinesEclipse#Configuration
    252113
    253 If you get an error like "!AttributeError: SQLCustomType instance has no attribute 'startswith'" then:
    254 {{{
    255 cd ~/Desktop/web2py/gluon
    256 rm sql.py
    257 wget http://eden.sahanafoundation.org/sql.py
    258 }}}
    259 Then can proceed as above: Stop Eclipse, empty databases folder & restart Eclipse
    260114
    261 A new image without this issue has now been uploaded.
     115
     116
     117== Notes ==
     118
     119The virtual machine image is based on a [BluePrintlivecdinstaller blueprint] and are configured to use about 512MB of RAM. The virtual disk is configured to expand to 20GB. The virtual machine is built on [http://www.turnkeylinux.org/core TurnKey Linux's Core], which in turn is based on Ubuntu 10.04 (Lucid -- the most recent long-term support release). The machine runs [http://code.google.com/p/shellinabox/ Shellinabox], [http://www.webmin.com/ Webmin], and SSH/sftp as services from startup.
     120
     121The development environment is configured to launch [http://lxde.org LXDE], a lightweight desktop environment after the first boot. From LXDE, Eclipse with Pydev, Firefox with Firebug, iPython and irssi are accessible.
     122
    262123
    263124----