WorkshopDayTwo > Releasing the InterMine Web application

Once you have read access to a production database, you can build and release a web application against it. You must have all of the required software installed.

Configure

In the ~/.intermine/ directory, update your properties file with all the webapp related attributes. Update the superuser.account to be your email address.

Software

Install the webapp software. You can copy the files directly from the tutorial to your local directory, malariamine/webapp.

# in /malariamine
cp -R ../bio/tutorial/malariamine/webapp .

UserProfile

The userprofile database stores all user-related information such as username and password, tags, queries, lists and templates.

  1. Create
    createdb userprofile-malaria 
    
  1. Configure
    • Update your properties file with the location, username and password for this database.
  1. Build
    # in malariamine/webapp
    ant build-db-userprofile
    
    • This command creates the SuperUser account and loads the default-template-queries.xml file
    • NOTE: This command will delete any data in the userprofile database.
    • You only need to build the userprofile database once for every production database.
    • See UserProfile for more information.
  1. Get SuperUser password
    • The webapp admin account has been created with a random password. To retrieve that password, you can use the 'Forgot password' link on your webapp or just look in the database.
      # log into the database
      % psql userprofile-malaria
      
      # run a query to retrieve the superuser account
      userprofile-malaria=# select * from userprofile;
           username      |   id    | password |                    class                    
      -------------------+---------+----------+---------------------------------------------
       julie@flymine.org | 9000000 | abcd1234 | org.intermine.model.userprofile.UserProfile
      

Deploying the webapp

Tomcat

Tomcat is the webserver we use to launch InterMine webapps. Start Tomcat with this command:

# from ~/tomcat/
bin/startup.sh

Visit the Tomcat manager at http://localhost:8080/. The username and password required to access the manager are webapp.manager and webapp.password as specified in malariamine.properties.

See: Tomcat

Webapp

Run the following command to release your webapp:

# in malariamine/webapp
ant default remove-webapp release-webapp

This will fetch the model from the database and generate the model java code, remove and release the webapp. The default target forces a rebuild of the .war file. If you've made updates, you may want to add clean, which removes temporary directories.

See: AntTargets

Using the webapp

Navigate to http://localhost:8080/malariamine to view your webapp. The path to your webapp is the webapp.path value set in malariamine.properties.


Help!

Ant

Anytime you run ant and something bad happens, add the verbose tag:

ant -verbose default release-webapp

This will give you more detailed output and hopefully a more helpful error message.

Logs

If the error occurs while you are browsing your webapp, the error message will be located in the Tomcat logs: tomcat/logs.

The message will likely be in the log with the latest modified date.

See: TroubleshootingTips


Back: WorkshopDayTwo