Create WeBWorK Virtual Machine (.OVA) File

From WeBWorK_wiki
Jump to navigation Jump to search

Instructions for creating a WeBWorK Virtual Machine (.OVA) Image[edit]

Note that the resulting .ova image can be used to create a virtual machine

Build the server on VMWare Workstation Player

  1. 12 GBk disk (single file)
  2. 1 GB memory
  3. 1 cpu

The above resources are very minimal and (except for disk space) correspond to a AWS t2-micro level machine which is free.


  1. Download the ubuntu live CD (server version)
  1. Install following the standard directions with the following options
  1. Don't partition disks separately
  2. User name: wwadmin
  3. login: wwadmin
  4. password: wwadmin
  5. Computer name: wwserver


Workstation Player[edit]

When you see REBOOT, reboot and login (wwadmin/wwadmin)

Do not accept any updates (save disk space)

Check if tools are installed

vmware-toolbox-cmd -v

(they should be) and if so, remove them

sudo  apt remove open-vm-tools
sudo apt autoremove


After system boots check that openssh-server is installed run

sudo lsof -i -P -n | grep LISTEN

to check if it is listening on port 22 If not install openssh-server

sudo apt install openssh-server

Find the ip address of your guest The Guest IP is the IP address your guest WeBWorK server is using. You can find it (after you login) by entering the command

$ ip address show

and looking at the output, something like

   link/ether 00:0c:29:4f:2c:1d brd ff:ff:ff:ff:ff:ff
   inet 192.168.204.128/24 brd 192.168.204.255 scope global dynamic ens33

Login from Terminal program[edit]

At this point you can login to your server from your host machine using SSH (non secure telnet and FTP are not allowed but secure SSH and SFTP are) using your favourite terminal emulator program. E.g. set your terminal to connect to 192.168.204.128


You can do all of the remaining installation from a terminal emulator on your host. The advantage of doing this is that you can copy commands from these instructions (with copy from the Edit menu or ^C) and paste them into a terminal window (with paste from the Edit menu list or <Shift> <Ctrl> <V> or <Shift> <Insert> depending on your application).

Follow the standard instructions[edit]

site.conf and localoverrides.conf[edit]

  1. use the ip address (e.g. 192.168.201.128) everywhere. Do not use localhost
  2. set password for webworkWrite (wwadmin)

set up MyTestCourse[edit]

  1. add practice users and jsmith/jsmith to myTestCourse
  2. add the standard sets to myTestCourse

Implement all options A-E except C (run WW through SSL)[edit]

Clean up the system=[edit]

  • rm apache's error.log's in /var/log/apache2/
  • rm apache's access.log's in /var/log/apache2/
  • rm webwork's timing.log's in /opt/webwork/webwork2/logs/
  • Remove unneeded backup's in /opt/webwork/webwork2/conf/
  • Remove contents of /var/www/html/wwtmp/

Remove openssh-server[edit]

sudo apt remove openssh-sftp-server
sudo apt autoremove

Reset CPU's amd Memory[edit]

Set the memory to 1 GB and processors to 1


Export to an .ova file[edit]

Workstation Player[edit]

Find the path to your VM Open a command prompt as administrator

cd D:\program files\vmware\vmware OVF_Tool

Enter

ovftool “C:\the path to your VM\your VMname.vmx”  c:\new directory\name.ova