| 1 | = Creating a Virtual Machine image for use at GEC Tutorials = |
| 2 | |
| 3 | Software for use by tutorial attendees is distributed as a !VirtualBox VM image running the Ubuntu OS. This page describes the procedure used to create this VM image. |
| 4 | |
| 5 | == Schedule == |
| 6 | Start this process at least two weeks before the scheduled tutorial. |
| 7 | |
| 8 | == Creating the VM == |
| 9 | * Use the latest version of !VirtualBox |
| 10 | * Use the default VM configuration provided by !VirtualBox. If the default base memory for the VM is less than 2048MB, up it to 2048MB. |
| 11 | |
| 12 | == Installing the OS == |
| 13 | * Check the exercises to verify what OS and version number is preferred for the used tools Ubuntu has been a safe choice. Latest version of the OS isn't necessarily a safe choice. |
| 14 | * After installing the OS, install !VirtualBox Guest Additions for the guest OS (e.g. Ubuntu). Be sure to set "Shared Clipboard" to "Bidirectional" to enable cut-and-paste between the host and guest OS (and vice versa). This can be found under "Devices" on the !VirtualBox menu. |
| 15 | * Create a user account (usually geni) with an easy to remember password. Change the User Account settings so "Automatic Login" is ON for this user. (Note: You must press "Unlock" on the User Account settings before trying to change the settings. It will prompt you for your password). |
| 16 | - Usually one user account on the VM is sufficient for the tutorial as tutorial organizers create multiple accounts at a GENI Slice Authority and install credentials for these accounts on the VM. Tutorial attendees log in to the one user account on the VM and are given a separate username (used to create an account with a slice authority) to access the credentials loaded on the VM. |
| 17 | - If multiple user accounts are necessary, make sure they are set up the same (same default shell, etc.) |
| 18 | * Make bash the default shell for the user account(s) (check the `/etc/passwd` file) |
| 19 | * Create a Tutorials subdirectory in the user home directory(-ies) and in it create subdirectories for each of the tutorials. Tutorial specific software (scripts, configuration files, etc.) go in these directories. |
| 20 | * Make sure vi and Emacs are installed. |
| 21 | * Set the default background image to be the GENI logo. |
| 22 | * Install Firefox and make it the default browser. |
| 23 | * Install the Firefox [https://addons.mozilla.org/en-us/firefox/addon/firessh/ firessh addon]. |
| 24 | * Install Flash; make sure it works with the default browser (and that you can load Flack at www.protogeni.net). |
| 25 | * Set browser bookmarks: http://www.protogeni.net; http://groups.geni.net/geni; etc. |
| 26 | * You might want to set the VM to use Google's DNS as its primary. We had trouble with slow DNS resolution at a GEC (the hotel's primary DNS was down and so all requests had to time out first before going to a secondary). Instructions at https://developers.google.com/speed/public-dns/docs/using. |
| 27 | * Set the security exceptions in the used browsers for the commonly used sites (www.protogeni.net, www.emulab.net, pgeni.gpolab.bbn.com, etc.) |
| 28 | |
| 29 | == Installing software for tutorials == |
| 30 | 1. Install all the software, tools and credentials you might need to be included in the VM |
| 31 | 2. Export the VM as an ova file |
| 32 | 3. Test the exercises from the VM (make sure to take a snap |
| 33 | 4. If needed fix problems |
| 34 | i. load a clean image from the saved ova |
| 35 | ii. fix problems |
| 36 | iii. go back to 2 |
| 37 | |
| 38 | == Clean up the image before exporting == |
| 39 | * Clear the bash history by running 'history -c' in all open terminals and removing ~/.bash_history |
| 40 | * Clear the browser cache [http://support.mozilla.org/en-US/kb/clear-cache-delete-temporary-files-fix-issues] |
| 41 | * Clear the flash cache separately [http://forums.adobe.com/message/4278569] |
| 42 | * Zero out the free space for better compression of the image (pick one of these two methods) |
| 43 | * option 1 |
| 44 | {{{ |
| 45 | $ apt-get install secure-delete |
| 46 | $ sfill -Ilz / |
| 47 | }}} |
| 48 | * option 2 |
| 49 | {{{ |
| 50 | $ dd if=/dev/zero of=/bigemptyfile |
| 51 | $ sudo rm -rf /bigemptyfile |
| 52 | }}} |
| 53 | |
| 54 | == Distributing the VM image == |
| 55 | * Publish the ''Gold Image'' for download by tutorial attendees. |
| 56 | * Email everybody signed up for tutorials asking them to download and install the VM image BEFORE the Tutorial |