Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Financials development requires a standalone Rice instance.  Here are instructions to setup a standalone rice instance and database to use for development.

Setup Database

These procedures will create 3 databases in MySql:

  • kfsonly - This database contains Financials tables and no Rice tables.  It is used by Financials when running with standalone Rice.
  • rice - This database contains Rice tables only.  It is used by the standalone rice instance.
  • kfs - This database contains both Financials and Rice tables.  It is used for the unit tests.

Steps

  1. Login to Mysql as the root user.  Run these commands to create the databases, users and permissions.

    create database kfs default character set 'utf8' default collate 'utf8_bin';
    create database kfsonly default character set 'utf8' default collate 'utf8_bin';
    create database rice default character set 'utf8' default collate 'utf8_bin';
    
    create user kfs@localhost identified by 'kfs';
    create user kfs@'%' identified by 'kfs';
    
    create user kfsonly@localhost identified by 'kfsonly';
    create user kfsonly@'%' identified by 'kfsonly';
    
    create user rice@localhost identified by 'rice';
    create user rice@'%' identified by 'rice';
    
    grant all on kfs.* to kfs@localhost;
    grant all on kfs.* to kfs@'%';
    
    grant all on kfsonly.* to kfsonly@localhost;
    grant all on kfsonly.* to kfsonly@'%';
    
    grant all on rice.* to rice@localhost;
    grant all on rice.* to rice@'%';
  2. Create a properties file for LiquiRelational to populate the kfsonly and rice databases.  Name the file lr-kfsonly.properties.  Here are the contents:

    datasource.driver=com.mysql.jdbc.Driver
    
    kfs.datasource.ddl.username=kfsonly
    kfs.datasource.ddl.password=kfsonly
    kfs.datasource.ddl.url=jdbc:mysql://localhost/kfsonly
    
    rice.datasource.ddl.url=jdbc:mysql://localhost/rice
    rice.datasource.ddl.username=rice
    rice.datasource.ddl.password=rice
    
    updateDatabaseFullRebuild=true
    updateDatabaseContext=demo
  3. Create a properties file for LiquiRelational to populate the kfs database.  Name the file lr-kfs.properties.  Here are the contents:

    datasource.driver=com.mysql.jdbc.Driver
    
    kfs.datasource.ddl.username=kfs
    kfs.datasource.ddl.password=kfs
    kfs.datasource.ddl.url=jdbc:mysql://localhost/kfs
    
    rice.datasource.ddl.url=jdbc:mysql://localhost/kfs
    rice.datasource.ddl.username=kfs
    rice.datasource.ddl.password=kfs
    
    updateDatabaseFullRebuild=true
    updateDatabaseContext=unit
  4. Run LiquiRelational for kfsonly and rice.  Make sure to adjust the paths appropriately.  You must be in the root of the financials project when running this.

    mvn -DskipTests clean package
    java -classpath ./kfs-web/target/kfs-web/WEB-INF/lib/*:/Users/user/java/drivers/mysql-connector-java-5.1.36.jar -Dadditional.kfs.config.locations=/Path/lr-kfsonly.properties co.kuali.financials.datatools.liquirelational.LiquiRelational
  5. Run LiquiRelational for kfs  Make sure to adjust the paths appropriately.  You must be in the root of the financials project when running this.

    mvn -DskipTests clean package (you do not need to run this again if you ran it in step 4 without making code changes)
    java -classpath ./kfs-web/target/kfs-web/WEB-INF/lib/*:/Users/user/java/drivers/mysql-connector-java-5.1.36.jar -Dadditional.kfs.config.locations=/Path/lr-kfs.properties co.kuali.financials.datatools.liquirelational.LiquiRelational

Setup Standalone Rice

Steps

  1. Download the newest Tomcat 7 core.  Unzip that to the folder where you would like to run rice.
  2. Download spring-instrument-tomcat-3.2.12.RELEASE.jar and put it in the tomcat lib folder.
  3. Copy the mysql driver to the tomcat lib folder.
  4. Delete everything under the webapps folder.
  5. Download the newest rice standalone distribution from the http://kuali.org web site.  Unzip the file and copy the kr-dev.war file to the webapps folder inside the tomcat folder.
  6. Edit the server.xml file in the tomcat conf folder.  Change port 8005 to 8006 and port 8080 to port 8081.
  7. Create a folder inside tomcat named rice.  Under this folder make the folders pluginskew_attachmentsxml.
  8. Copy the rice-config.xml, log4j.properties and rice.keystore files into the rice folder.  Edit the rice-config.xml and make sure paths are correct.
  9. If you are on Windows, edit the file bin/setclasspath.bat, otherwise bin/setclasspath.sh.  Add a line after the comment.  Adjust the path as necessary:

     

    export JAVA_OPTS=-Dadditional.config.locations=/Users/user/rice/apache-tomcat-7.0.65/rice/rice-config.xml

Running Standalone Rice

Run catalina.bat run on Windows or catalina.sh run if not.

Configuring Financials

Financials will need to know about your Rice instance.  You will need to create a properties file and pass the name of that file to Financials using the additional.config.locations system property.  Here is an example of that properties file:

base.url=http://localhost:8080

rice.server.url=http://localhost:8081/kr-dev
rice.url=http://localhost:8081/kr-dev
rice.ksb.registry.serviceUrl=${rice.url}/remoting/soap/ksb/v2_0/serviceRegistry

keystore.file=/Users/user/git/financials/kfs-core/src/main/config/demo/rice.keystore
log4j.settings.file=/Users/user/kfs/log4j.properties

kfs.datasource.username=kfsonly
kfs.datasource.password=${kfs.datasource.username}
kfs.datasource.url=jdbc:mysql://localhost/${kfs.datasource.username}
kfs.datasource.validating.query=select 1
kfs.datasource.pool.maxActive=50
kfs.datasource.pool.minIdle=5
kfs.datasource.pool.initialSize=5

kfs.datasource.ddl.url=${kfs.datasource.url}
kfs.datasource.ddl.username=${kfs.datasource.username}
kfs.datasource.ddl.password=${kfs.datasource.password}

rice.datasource.validating.query=select 1
rice.datasource.pool.maxSize=50
rice.datasource.pool.minSize=5
rice.datasource.url=jdbc:mysql://localhost/rice
rice.datasource.username=rice
rice.datasource.password=rice

rice.datasource.ddl.url=${rice.datasource.url}
rice.datasource.ddl.username=${rice.datasource.username}
rice.datasource.ddl.password=${rice.datasource.password}

updateWorkflowOnStartup=true
updateDatabaseOnStartup=true
updateDocumentstoreOnStartup=true
  • No labels