Managing WISTs at NGDC

From NGDCWiki

Jump to: navigation, search

Contents

Deployment

In the past, there have been numerous problems with keeping track of WIST jsps. Individuals would edit wists on their own machines and copy them out to production only to have them overwritten when the project was redeployed. Also, having multiple versions on development and production servers has led to confusion as to which version of a WIST JSP is actually up-to-date and functional.

As a result, I have creates a system that uses our local Subversion repository to both keep the WIST JSPs organized, and to provide a relatively simple process for deploying new WISTs to the production machine. It works as follows:

Getting the project from Subversion

When you want to work on a WIST, the first thing you need to do is check out the WIST project trunk from Subversion. The Subversion URL for this is [1]. The trunk contains all of the most recent development versions of the WIST JSP pages.

Adding a new WIST

Once you've checked out the trunk, you're free to make whatever changes you like to current WISTs, or to add a new WIST JSP to the trunk. The JSPs are in the directory src/main/webapp. If you create a new WIST in this directory, be sure to add it to the repository using "svn add".

Local testing with Tomcat

If you want to test the WIST on your local machine and have Tomcat and Maven 2.x installed, you can very easily create a warfile to test with by running "mvn package" from the root directory. Your warfile will be generated in a directory called "target" and you can then simply drop this file into the webapps directory of your local Tomcat instance to install the context.

Deployment to production

Once you've tested out your WIST and are ready to deploy it to the production server, you must __commit your changes to the trunk in Subversion__ and then use the "svn copy" command to __copy the JSP into the deployment branch__ for the project. An automatic process on the production server watches this branch for changes and rebuilds the web application whenever a new WIST appears or an existing WIST is altered.

The root of the WIST deployment branch is at [2]. If you are copying over a JSP, it should go to the subdirectory [3]. The job on the server checks for changes every few minutes, so your new page should be visible soon!

WIST High Level Snapshot

Prior to his departure, Kris shared key knowledge points with Dan Kowal:

  • SVN repository - see above url. Under "trunk/" you have:
    • lib/ - Tag library.
    • webapp/ - current WISTS (jsps).
      • trunk/src/main/webapp/
      • There are a number of dupes that need to be cleaned up.
      • All of the development is done here.
    • sample-webapp/ - sample "hello world" jsp.
  • Tag Usage. Tags do everything. There's not a separate controller piece (ModViewController).
  • Implementation and Usability.
    • Every WIST page submits to itself. All of the information is contained in the JSPs. If a custom XML schema were used, it would be more difficult for the WIST creator to implement. Having everything contained within the JSP offers more flexibility.
    • Future code developer will find the code self-describing.
  • WIST BEAN
    • This bean holds all of the information about the WIST.
    • Child Tags. These tags get current value from the request and writes it out - the "Text Tag" example. Each tag processes its own data. These tags communicate to the other tags through the WIST Bean. Information is passed up the tree, but does not pass anything back down.
  • Building the WIST. Done through Maven. So long as it says, "BUILD SUCCESSFUL" the WIST app should work fine.
  • Documentation - is found here in svn: [4]
  • Selection/Option Set tags were the last tags developed by Kris. He's not sure they were ever deployed in a WIST.
  • Deployments.
    • Development. Checking in a WIST to the trunk - see above - via svn update will allow the developer to see changes in the development area. The development url is: . Builds are done every 5 minutes.
    • Production. See above. Contrary to what it says above, Kris explained that the builds are done 1x/hour.
    • Bottom line. WIST check in to trunk for development and check in the branches for production.

WIST Home

Personal tools