Building FedOne

Posted by wave_admin
Printer-friendly versionPrinter-friendly version

Before we can start really exploring FedOne we need to install it. For the moment, there aren't any pre-packaged installations of the Server, and given the rapid nature of the ongoing development I believe it is best to work from the source.

Linux

Requirements:

Before we do anything else we need to create our development area. Simply create a directory called wave-devel in your home directory and use that as your base.

Before you build the server you're going to need the following packages:

Installing Requirements Under Ubuntu/Debian:

Installing Requirements Under Redhat/CentOS/Fedora:

Building FedOne:

Once you have the pre-requisites installed we can move onto building the server. Make sure that you are in the wave-devel directory and then import the FedOne source code:

$ hg clone https://io2010.wave-protocol.googlecode.com/hg/ wave-protocol-io2010

This will create a new directory called wave-protocol within your wave-devel directory and put the latest version of the source code in it. Enter the new directory and run the following command:

$ ant all (this is important, as just running ant will miss the web interface code)

Now if you have everything installed correctly you should see the output from the build process. Once everything has finished building you should have the following jar files in the dist directory of wave-protocol:

  • fedone-client-console-0.3.jar
  • fedone-0.3.jar
  • fedone-agent-echoey-0.3.jar
  • fedone-api-0.3.jar

Well, there we go, we're 90% of the way there. We're missing one component though. The WRS is not a standalone XMPP server (the Federation protocol itself is XMPP through and through). Instead it relies upon an external XMPP server to do the hard work. For this example we will be using the Openfire XMPP server, however if your XMPP server supports external components (XEP-0114 Components to be specific) then it should work.

Windows

Requirements:

Building the WRS under Windows is going to take a little bit more downloading and configuring than under Linux. Whereas Linux has tools such as Synaptic and Yum to manage software installation, Windows is sadly lacking in this. So this means lots of manual downloading.

Suns Java SDK

You will need Suns Java SDK to build the WRS on Windows. To get this visit the following page:

http://java.sun.com/javase/downloads/index.jsp

And select the most up to date version of the Java SE Development Kit. Go through the process of downloading and installing the SDK.

Ant

While the SDK is vital it does not include a vital tool required in the building of the WRS, the Apache Ant Build Tool. There are a number of ways to get Ant for Windows, however I found the following project the easiest to use:

http://code.google.com/p/winant

OpenSSL For Windows

Windows, unlike most other Operating Systems does not come with a built in ability to generate SSL Certificates. In order for us to build the certificates required by the Wave Reference Server we need to do the following:

Download and install the following packages:

http://www.slproweb.com/download/Win32OpenSSL_Light-0_9_8k.exe

and

http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF

Mercurial

Now that you have the Java tools ready to go, you need to get the source for the WRS itself. This means that you will need mercurial. For Windows I recommend the TortoisHG project. It integrates with Explorer and is pretty easy to use. To get TortoisHG visit the following site:

http://bitbucket.org/tortoisehg/stable/wiki/Home

Openfire XMPP Server

The Openfire XMPP Server is available across Windows, Linux and Mac. To grab the Windows version go to the following page:

http://www.igniterealtime.org/downloads/index.jsp

Building FedOne

Now that you have all of the requirements we need to get the sourcecode and build it. The following describes the process of pulling down the sourcecode and building it under windows using the tools we aquired above.

Step 1:

Create a directory called Wave-Devel

Step 2:

In that directory right click on a piece of blank space, click on TortoisHG and then select "Clone a Repository".

Step 3:

In the screen that pops up fill out the following:

Source Path = https://io2010.wave-protocol.googlecode.com/hg/

Destination Path = [CURRENT_DIRECTORY]/wave-protocol-io2010

and then click on Clone. This will take a little while but once it's finished you should have a wave-protocol directory with a big green tick.

Once you have the source and all of the tools installed, open up a Command shell and to the following:

set JAVA_HOME=c:\Program Files\Java\jdk[YOUR_VERSION]

set ANT=c:\Program Files\winant\bin\ant

cd [THE_FULL_PATH_TO]wave-protocol
ANT all

This should commence the build process. At the end of this process, you should have the following jar files:

  • fedone-client-console-0.3.jar
  • fedone-0.3.jar
  • fedone-agent-echoey-0.3.jar
  • fedone-api-0.3.jar