Skip to content
kraxner edited this page Jan 30, 2013 · 63 revisions

Prepare the Database

Install and setup MySQL server

  1. Install MySQL 5 Server (tested with version 5.1.54)
  2. Set UTF8 as a default encoding/collation. Check appropriate MySQL 5.X reference manual for instruction on how to do this. There were some changes so it might not be the same for all versions.
  3. Configuration Make the following changes in your MySQL config file (on Linux it is my.cnf and on Windows my.ini)
      #in the Server Section [mysqld] 
      max_allowed_packet = 128M
      max_sp_recursion_depth = 255
      thread_stack = 512K
     
  4. Restart MySQL server

Setup Database for Planning Suite

If you run Planning Suite and IDP on the same domain, you can use a predefined script:

  1. Switch to the tools directory, there you will find the script setup-database.sh. It creates DB users and databases for IDP and Plato, and prepares a config file for your JBoss AS 7 server.
  2. Run it via ./setup-database.sh <MySQL root password> <Plato DB password> <IDP DB password>
  3. You will find two new files in this directory: standalone.xml for your production environment, adjust it to your needs, and additionally standalone-test.xml - the configuration for your test server.

Install and setup JBoss AS 7

  1. Download and install JBoss AS 7.1.0.Final. You can use JBoss AS 7.1.1.Final, but there are [issues with the included JSF implementation] (https://issues.jboss.org/browse/AS7-4366), so you have to replace the corresponding modules yourself.
  2. Copy the file standalone.xml you have generated during database setup to [JBOSS_HOME]/standalone/configuration/standalone.xml

Install MySQL Drivers

  1. Download [MySQL Connector/J] (http://dev.mysql.com/downloads/connector/j)
  2. Create a driver module as described in [Installing a JDBC driver as a module] (https://community.jboss.org/wiki/DataSourceConfigurationInAS7#Installing_a_JDBC_driver_as_a_module)

Install and setup PicketLink

  1. Go to the modules/org/picketlink/main directory and delete all jar files in it.
  2. Download Picketlink 2.1.4 jars for JBoss AS 7.1.x here: picketlink-core-2.1.4.Final.jar and picketlink-jbas7-2.1.4.Final.jar
  3. Copy both Picketlink 2.1.4 jars into modules/org/picketlink/main directory
  4. In modules/org/picketlink/main do the following changes to the module.xml file :
     
    

<module xmlns="urn:jboss:module:1.1" name="org.picketlink"> <resources> <resource-root path="picketlink-core-2.1.4.Final.jar"/> <resource-root path="picketlink-jbas7-2.1.4.Final.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.security.auth.message.api"/> <module name="javax.security.jacc.api"/> <module name="javax.transaction.api"/> <module name="javax.xml.bind.api"/> <module name="javax.xml.stream.api"/> <module name="javax.servlet.api"/> <module name="org.jboss.common-core"/> <module name="org.jboss.logging"/> <module name="org.jboss.as.web"/> <module name="org.jboss.security.xacml"/> <module name="org.picketbox"/> <module name="javax.xml.ws.api"/> <module name="org.apache.log4j"/> <module name="org.apache.santuario.xmlsec"/> </dependencies> </module>


Install required programs

FITS

Optional: Minimee

Only necessary if you want to use Minimee services

  1. Install all tools you want to use on your server.
  2. Configure tool and services in the files tool-configs.xml and actions-config.xml. You can find examples in minimee/src/main/resources/data/services/

Configure Plato

Some aspects of Plato can be configured using configuration files. See Plato configuration for further information.


Development

Setup Test Server

To setup the test server make a copy of the already configured main instance, replace the standalone.xml with the generated standalone-test.xml, and rename it to standalone.xml.

Build and Deploy

  1. Install maven version 3 .
  2. Install git client
  3. Clone Plato source from the Github:
    git clone git@github.com:openplanets/plato.git
  4. Go into the folder plato and start the build process:
    mvn clean install -Dsp.domain=your.planningsuite.domain.org -Didp.domain=your.idp.domain.org -DjbossHomeTest=<JBOSS_HOME_TEST>

Parameters:

  • sp.domain: the domain where Planning Suite will be available (defaults to localhost)
  • idp.domain: the domain where your identity provider will be available(defaults to localhost)
  • jbossHomeTest: the path to your local JBoss server used for testing Note: you can skip this parameter if you also skip all tests via -DskipTests The generated artifacts are in the target sub-folders of planningsuite-ear and idp You have to use the war and ear files. (you cannot deploy the exploded archives, because there is a bug in the maven-war plugin)
  1. Copy planningsuite-ear/target/planningsuite-ear.ear to your JBoss deployments folder
  2. Copy idp/target/idp.war to your JBoss deployments folder.

NOTE: If your database is set up for the first time, you have to:

  1. Edit the file planningsuite-ear/src/main/application/META-INF/persistence.xml and set hibernate.hbm2dll.auto to create
  2. Generate plannginsuite-ear.ear and deploy it to JBoss (like described above)
  3. Change hibernate.hbm2dll.auto back to update This is important, otherwise the database gets re-created with each start - and your data gets lost
  4. Generate and deploy once again plannginsuite-ear.ear