Tuesday, November 03, 2009

Using the OGCE Gadget Container

The OGCE Gadget Container allows you to deploy and display Google and Open Social gadgets. To get the gadget container, check it out from SourceForge with SVN:

svn co https://ogce.svn.sourceforge.net/svnroot/ogce/ShindigOGCE/ishindig-trunk/ ogce-gadget-container

You can also download the tar through SF's source code browser: http://ogce.svn.sourceforge.net/viewvc/ogce/ShindigOGCE/ishindig-trunk.tar.gz?view=tar

Next, cd into the source directory and do the following:

* Unpack Apache Maven (included in the download):
tar -zxf apache-maven-2.2.1.tar.gz; export PATH=/path/to/ogce-gadget-container/apache-maven-2.2.1/bin:$PATH

This will make sure you have the correct version of Maven.

* Edit config/ishindig.properties. Edit site.host to be your server's IP address. You can use localhost if you want. For your first build, don't change the H2 database settings, but you can use MySQL in the future.

* Build and deploy everything by running mvn clean install from the top level directory (ogce-gadget container if you used the svn checkout command above).

* Start Tomcat with startup-tomcat.sh.

You should now point your browser to http://your.server.name:7070/ishindig-webapphttps://your.server.name:7443/ishindig-webap. You should see the screen below. Create an account and log in.

After logging in, you should see a tabbed layout like the one below:

You can move gadgets around by drag and drop. Click the skins layout (drop down on the upper right) to change colors. Click the layout drop down (also upper right) to switch between table and tree layouts. Add tabs by clicking the "add a tab" button. You can create a layout like so:


To add a gadget, click the "Add a gadget" link in the upper left tool bar area. Fill out the form by providing a nickname for the Gadget and the URL to its XML definition.

Gadgets can be loaded from anywhere, but we provide a selection that can run locally in the gadgets-repo directory. We render gadgets using Apache Shindig, which is included in the download and deployed by Maven. You can use Shindig to render most gadgets available from iGoogle.

To administer users, click the Admin interface link on the login page and log in as administrator (admin/admin are the defaults).


Finally, you can clean up your installation with the command mvn clean. This will return you to the original SVN check out state, EXCEPT it will not delete the database. If using the default H2 database, the directory for the database files is set in conf/ishindig.properties. By default the directory is located in $HOME/ogce-h2-data/. You must delete this manually.

No comments: