wiki:HowToInstallNewVersions

NOTE: These are instructions Garth sent to NM a while back. I have been trying to update them as I notice discrepancies. Please update as needed or let me know through the related IBIS CoP Forum thread when you find inaccuracies. Thanks, Lois H.


1. Admin DB

  1. Create the new ibisph database/schema (consistent with your current name so maybe like “ibisph_admin_owner_2”) and make sure all appropriate privs and other properties that have been setup for the existing app are granted etc. These settings and how done should be documented for other MS-SQLServer users and so it can be repeated an NM.
  2. Checkout the create tables script from the repository (http://www.ibisph.org/trac/browser/trunk/src/main/db/sqlserver/tab_c.sql) and apply to that new user/schema.
  3. Populate the new structure using your existing data The copy.sql script Garth created for New Mexico is in the repository, here: http://www.ibisph.org/trac/browser/trunk/src/main/db, and also attached below. Garth says, "If you’d like, you may use that as a starting point – note that some columns might not match so update as needed."

2. Admin App

Note: The IBIS-Admin application will not run without the database. It will not even come up in your browser. There have been changes to the Version2 database that will not work with early beta versions of the version 2 Admin app.

  1. Create a directory on app server like: tomcat/webapps/ibisph-admin-2.
  2. Download the code base into that directory. You'll find it here: http://www.ibisph.org/trac/browser/trunk/src/main/webapps. This is best done using Tortoise to populate your tomcat/webapps/ibisph-admin-2 directory.
  3. Edit the tomcat/conf/server.xml.
    • Before you start, create a copy/backup of the tomcat/conf/server.xml file.
    • Locate something like the following towards the top of that file (it won’t be exact but will be close).
       
       <Resource name="jdbc/doh_ibisph_admin" auth="Container" type="javax.sql.DataSource" 
           maxActive="10" maxIdle="30" maxWait="10000" 
           username="ibisph_owner" password="xxxxxx" driverClassName="com.mysql.jdbc.Driver" 
           url="jdbc:mysql://127.0.0.1:3306/ibisph" 
       /> 
      
    • Copy that block, paste directly below the copied <Resource></Resource> element and change the name attribute and the username/password attributes to match the values needed to connect to your db server and the new schema/user. It will look something like “_2” (but with SQL Server specific jdbc driver and connection info):
       
       <Resource name="jdbc/doh_ibisph_admin" auth="Container" type="javax.sql.DataSource" 
           maxActive="10" maxIdle="30" maxWait="10000" 
           username="ibisph_owner_2" password="xxxxxx" driverClassName="com.mysql.jdbc.Driver" 
           url="jdbc:mysql://127.0.0.1:3306/ibisph" 
       /> 
      
    • Locate something like the following towards the bottom of that file (it won’t be exact but will be close).
      <Context path="/ibisph-admin" docBase="D:/ibis/admin/webapp" debug="0" reloadable="false" 
            crossContext="true">
           <ResourceLink global="jdbc/doh_ibisph_admin" name="jdbc/doh_ibisph_admin" 
            type="javax.sql.Datasource"/>
      </Context>
      
      
    • Copy that block and paste directly after/below. Change the path and docBase attributes to match the relative tomcat directory where the war file’s contents were extracted. Next change the global attribute of the ResourceLink element so that its value matches <Resource name= defined in the previous step.
  4. Edit the WEB-INF/config/site_specific.properties file. Go through and change all references to Utah servers to your own servers (IP addresses, URLs, etc.)
  5. Make sure your app includes the latest ibis.jar file. Version 2.0.0 should be in the repository, in the "releases" folder. Put it in the WEB-INF/lib directory if it is not already there. (Note: pre-release versions are named rc for release candidate. Use the JAR file with the highest rc number if you are doing this before the official release of version 2.0.)
  6. Edit the WEB-INF/config/spring/common.xml file. Add [] around the USER table value so value=”[USER]”. (This is for SQL Server. You’ll want to refer to the notes in the common.xml file because each db is different.)
  7. Restart your app server.
  8. Test & debug.

To do security testing:

Populate the “USER” table with the appropriate user info. The ID column is the primary key and is the user’s “username” that will be used for their login. If you want to use their email address or if you simply want a normal login username then populate as needed. You’ll also need to fill in their FULL_NAME, PASSWORD, and set the ACTIVE_FLAG to “x”.

There is an illustrated example in the file repository.

Next populate the INDICATOR_EDITOR table. This is an intersection table which has a USER_ID and an INDICATOR_NAME. The USER_ID is the same value as entered in the USER table’s ID column. Both INDICATOR_NAME and USER_ID are case sensitive so they must match 100%. Each INDICATOR record as an OWNER_USER_ID column that must also be populated with an associated USER.ID value.

The last thing that is needed is to set up your admin users. This is done via the USER_TO_ROLE intersection table. The USER_ID column matches the USER.ID with the ROLE_NAME needing a value of “Admin”.


3. View App

You could do a similar thing for the view app as was done with the admin app – put in a different directory and setup a context to that app (although the view app could simply be deployed as is if your tomcat is setup to autodeploy).

To get the Version2 View app to work with the Version2 Admin app, you'll need to edit the WEB-INF/config/site_specific.properties files in BOTH applications so they match and reference each other. The Admin app needs to publish to the View app. It also needs to use files from the View app to allow indicator report authors to preview their indicator report pages. The View app needs to be 'told' what to expect from the Admin app. There aren't that many settings - you may need to experiment a little bit.

To test it, open your Admin app and create an indicator and try to preview it and then publish it. You'll want to test previewing from each of the left nav tabs. The preview in the "Indicator Main" tab does something different from the preview from the "Graph Values" tab, so make sure each works. If it doesn't work, then it could be that your site_specific.properites files are not correct, or it could also be that you have something amiss in your DB schema.


Last modified 8 years ago Last modified on 06/29/11 11:32:27

Attachments (1)

  • copy.sql (3.4 KB) - added by Lois Haggard 9 years ago. Script to populate new admin db tables with existing data.

Download all attachments as: .zip