OGCE Gadget Portal Configuration

From Ogce

Contents

Overview

Maven 3 is used to manage and build OGCE gadget portal project. We currently recommend you build the gadget container using the OGCE All download. The top level pom.xml file sets many properties for the gadget container. These should be edited as appropriate.

Configurations are centralized to make users' life easier. The configuration file is "config/ishindig.properties".

Note: in all of the following configurations, leading and trailing white spaces and slashes are significant.

Some property setting sin config/ishindig.properties will be inherited from the top level pom in the OGCE All build. The values of these properties will be set to variables in ishindig.properties (that is, surrounded by ${}). These values are inherited from the top level POM and should be modified there.

Database

We are now supporting two databases: H2 and MySQL. By default, H2 is used.

H2

H2 is a embedded database. It is built in OGCE portal build. In other words, the user does not need to install additional H2 software. To enable H2, use following setting

   hibernate.database=h2

Then following three properties include information that makes Portal able to connect to your H2 database successfullly.

   hibernate.h2.username=portal_admin
   hibernate.h2.password=admin_pass
   hibernate.h2.localdir=~/ogce-h2-data/hibernate

MySQL

  1. You must install and run MySQL before using Portal.
  2. Database table creation
    Then you need to create necessary tables used by OGCE portal. A MySQL SQL script file is included already in OGCE build directory which is UserDB.sql. You just need to execute it in your MySQL.
    Note: you need to execute the SQL script file using root.
    The MySQL script does following things:
    1. tries to create a database called "hibernate"
    2. creates a user with user name being "portal_admin" and password being "admin_pass"
    3. creates necessary tables used by gadget container
  3. Portal Configuration
    Using following configuration to enable mysql
       hibernate.database=mysql
The following three properties include information needed by portal to connect to your MySQL instance successfullly.
       hibernate.mysql.username=portal_admin
       hibernate.mysql.password=admin_pass
       hibernate.mysql.url=jdbc:mysql://localhost:3307/hibernate?autoReconnect=true

Detailed MySQL Installation Instructions

The following instructions don't attempt to cover all possibilities. In particular, we set the installation up to run as the root user, which you may not want to do. See the MYSQL manual for the terrible details, particularly on setting the root password.

  1. Download MySQL 5.x
  2. As root, unpack the release in /usr/local/
  3. Link your mysql distribution to /usr/local/mysql: ln -sn mysql-xxx-yyyy mysql
  4. Install the database: cd /usr/local/mysql; ./scripts/mysql_install_db --user=root
  5. Start the database: ./bin/mysqld_safe --user=root&

Go back to your portal download directory, check UserDB.sql, and run the command

 mysql -u root < UserDB.sql

Server

Gadget Layout manager

Following three properties specify address of the gadget layout manager.

   site.protocol=https
   site.port=7443
   site.host=your_host_and_port

Shindig server

Following three properties specify address of shindig server. A shindig server is built in. Also it is quite easy to switch to a different shindig server if you wish. You just need to change following properties.

   gadget.server.protocol=https
   gadget.server.port=7443
   gadget.server.host=${site.host}

Gadget repository

Gadget repository server serves gadget xml files which are used by gadget layout manager and shindig server. Related properties include

   gadget.repo.baseurl=${site.baseurl}
   gadget.repo.contextpath=/gadgets-repo

Configure Friend Connect Gadgets

Friend connect gadgets are used to save the social data and user collaborations. Step to configure pre-installed friend connect gadgets are.

  1. Register with FriendConnect. Click "Get Started" and check the agreement.
  2. Register your URL. If you are just testing things on localhost, there is no need to do this. The OGCE gadget container comes with a site ID for localhost. This gives you a social network of 1.
  3. After registering, you will be redirected to your FriendConnect management dashboard. It will have a URL similar to http://www.google.com/friendconnect/admin/site/overview?id=02963187904381158078
  4. The number 02963187904381158078 in this example is your site ID.
  5. Go to the OGCE Gadget Container's config/ishindig.properties file and change the value of site.friendconnectID to your new site ID.
  6. If you have already built the OGCE Gadget Container before, you will need to redeploy the gadgets. Use the command mvn clean install -f third_party_gadgets/pom.xml.
  7. You will also need to reload your browser to see the changes if you were logged into the portal.

How to change port number

If you want to change port numbers used by Tomcat, you need to take following two steps before running 'mvn clean install'

  1. Change corresponding configuration property in file config/ishindig.properties
  2. Change tomcat configuration file tomcat-config/server.xml
Web site tools