6.1 Configuring the Create Environment Form

Viewpoint comes bundled with a default configuration for creating environments. An Environment is a logical grouping of objects with a shared variable space and applied policies. Environments can hold virtual machines and physical machines. The Create Environment form appears to the end-user under Environments > Create Environment. This will show the create_vc.html page that is located in the {TOMCAT_HOME}/webapps/moab/html directory.

Note: As with all custom pages, it is recommended that you copy this original file to a location outside of the webapps directory, and create a symbolic link to a folder within the webapps directory. This way, site-specific customizations can take place and updating Viewpoint will not overwrite any customized changes.

The page create_vc.html is the first page that users see when navigating to create a new environment. Linked to this file are various CSS files for styling, some Javascript files for logic, and create_vc2.html for the second page in the creation process.

The default page uses the JQuery library for the date picker widget, as well as some page loading code. It also uses Viewpoint's queue framework for adding items to the queue, getting queue items, and showing the request table. See Custom HTML pages for details on how to integrate with the queue framework.

After users have completed filling out the form, pressing the Submit button uses JQuery to perform a HTTP POST method to "CreateVc.groovy". You can customize how the server interacts with the request (including submitting VCs and jobs in Moab) using this script. Please review the Viewpoint Server Methods documentation for a list of methods this script may call.

By default, the "CreateVc.groovy" script will first create an environment in Moab, and then submit jobs to that environment. Each job submitted is submitted to the template called "new" and the job script called is "/dev/null". It is expected that submitting a job to this template will create a new virtual machine.

Inputs in create_vc can be customized with certain client-side functions. These functions are documented in virtual container functions.