Skip to content

Virtual Machine Builds

JMColl edited this page Mar 1, 2016 · 47 revisions

Build an OPS VM

The OPS is distributed on pre-built VM's. These must be built when changes are made.

Template VM

The OPS template VM is called ops.base.ova and is available here.

This VM has CentOS Linux installed, a few additional packages.

Create a new build from the template VM

  • Import and boot the template VM
  • Open a terminal and enter the following code:

sudo -i
yum update -y
mkdir -p /vagrant && cd /vagrant
git clone https://github.com/cresis/OPS.git .
reboot

  • After the VM is rebooted log in and open the terminal, enter the following code:

sudo -i
cd /vagrant
sh conf/provisions.sh
reboot

You will be prompted for a database user/password. Accept the defaults be entering admin and pubAdmin. At some point you will be asked to accept 2 JAVA licence agreements. A [MORE] prompt will appear. You can use your space bar to skip to the YES/NO (hit it until you see YES/NO). Type YES for both.

Next, you will be prompted to add django admins. There can be zero or more admins that will be emailed error information if/when django encounters errors. It is recommended that at least one person be on the admin list to receive and deal with such errors.

Finally, you will be asked if django should operate in debug mode. The answer to this question should always be 'no' in a production environment. If working in a development environment, however, activating django's debug mode may provide insight to errors encountered during development. This is the last time you need to give input to the process.

  • Should you want to preload a portion of the database (i.e. for a field deployment), start the process here instead.

  • If one wants to have the eclipse IDE pre-installed and configured for the build, follow these instructions.

  • After the VM is provisioned (30-40 minutes) one should run tests to ensure everything is working as expected. First, run the OPS tests using manage.py (see this for more info). Next, open MATLAB (cresis only) and run the following command: opsTests.

  • CURRENT ISSUE, a user with create permissions must manually be created. See: createUserExample.py. To start, create an anonymous user.

  • If all tests pass the OPS VM is provisioned and running. Finally you can make sure the GeoPortal is working by visiting 192.168.111.222 on your host machine (your computer, not the VM).

  • Secure the geoserver by:

    • Logging into the geoserver (192.168.111.222/geoserver/web/)
    • log in as the administrator (username: root password: pubMaster)
    • Navigate to the Passwords tab (left hand bar)
    • Click on Change password and change it to the standard CReSIS OPS password
  • To finish up the process enter the following commands in a new terminal (close all others):

sudo -i
yum clean all
history -c
exit
history -c
sudo -i
shutdown -h now

  • In Oracle VirtualBox VM Manager right-click on the bare VM and rename the VM (in settings).

ops.build.yyyy.mm.dd (eg. "ops.build.2014.05.15")

  • In Oracle VirtualBox VM Manager select File > Export Appliance and select the renamed VM. Select the /cresis/scratch1/projects/ops/builds/[ouputName].ova as the directory and OVF 1.0 as the format.