Installation

This section provides a short overview on how to download, install and run the TAC Energy demo client and the TAC Energy server on your local machine.

Installation of TAC Energy demo client

Download and install software dependencies

TAC Energy Server and Demo Client are built upon the http://grails.org java web development framework. This is why you have to install the latest version of Java Development Kit (>= v1.6) as well as grails Framework v1.2.2 on your local machine. Follow the respective installation instructions and make sure that everything is up and running correctly before you proceed to the next step.

In particular make sure that the environment variables GRAILS_HOME and JAVA_HOME are set correctly and that the directory GRAILS_HOME/bin is on your PATH variable.

Optionally, if you want to check out the source code from the version control system you need to install Bazaar VCS Client on your machine. Bazaar is a distributed version control system (similar to but at the same time much more sophisticated than svn).

To check that your grails framework is installed correctly simply type grails help anywhere into you command line. If you see a list of possible grails commands as a result, everything is up and running correctly.

Download and Install Demo Client Source Code

Download the source code from launchpad at http://code.launchpad.net/tacenergydemo

mkdir /some/path/mytacenergydemoclient
cd /some/path/mytacenergydemoclient
bzr branch lp:tacenergydemo .

Alternatively you can download and unzip the latest snapshot of the sources from the CI Server (CI = Continuous Integration) and unzip it to a local folder. This folder should not contain white spaces in its directory path.

Test run the Demo Client

Open a command line window and cd to the directory where you unzipped the demo client source code. Type

grails run-app

and the demo client should start automatically as a small web server on your local machine. After some seconds you should see the following line in your command window:

Server running. Browse to http://localhost:8080/tacenergydemo

Point your web browser to http://localhost:8080/tacenergydemo and you should be able to see the welcome page of the TAC Energy demo client. If you now try to connect to the server this will fail as by default the client tries to connect to an instance of TAC Energy server running on localhost too. For the time being stop the client (Ctrl-C) and head over to the next section where the installation of the TAC Energy server is described.

Start your client with grails -Dserver.port=8090 if you run both server and client on your machine to avoid port conflicts.

Installation of TAC Energy Server

Installation of the latest binary version of the TAC Energy Server

Download the latest binary tacenergy-XX.war version of TAC Energy server from the CI Server where the XX stands for the version of the TAC Energy server.

The war file is a specially formatted zip file that is executable without any further actions required by any standard compliant Java Servlet API 2.5 contrainer such as Apache Tomcat 6. Consequently the TAC Energy server should run on all modern servlet containers including the latest versions of Jetty, Glassfish, JBoss, or WebSphere but is tested and verified to run on Apache Tomcat 6 only. If you haven't done so already, download and install the latest version of Tomcat on your local machine. Make sure that Tomcat starts correctly and that you can see its default welcome page in your web browser at http://localhost:8080. Afterwards just copy the downloaded tacenergy-XX.war file to TOMCAT_HOME/webapp while tomcat is running and that's it!

The tacenergy-XX.war is automatically unpacked and the TAC Energy server will be automatically started by Tomcat without any further actions required. After a short while you should be able to see the TAC Energy server welcome page at http://localhost:8080/tacenergy. If this is not the case check the tomcat log file for possible errors. By default they are located at TOMCAT_HOME/logs

The default login for TAC Energy server is user: admin and password: testit

Installation of the latest source version of the TAC Energy Server

Download the source code from launchpad

mkdir /some/path/mytacenergyserver
cd /some/path/mytacenergyserver
bzr branch lp:tacenergy .

Alternatively you can download and unzip the latest snapshot of the sources from the CI Server and unzip it to a local folder. This folder should not contain white spaces in its directory path.

Test run the TAC Energy Server

Open a command line window and cd to the directory where you downloaded the TAC Energy server source code. Type

grails run-app

and the server should start automatically as a small web server on your local machine. After some seconds you should see the following line in your command window:

Server running. Browse to http://localhost:8080/tacenergy

Point your web browser to http://localhost:8080/tacenergy and you should be able to see the welcome page of the TAC Energy server. Also try to point your web browser to http://localhost:61616. You should see some cryptic signs in your browser window. This is the default JMS endpoint of the server. No worries - the TAC Energy demo agent will be able to interpret this cryptic text correctly. ;-)