Galaxy requires that the Java Runtime Environment (JRE) version 7 will be installed on your machine.
To build galaxy, simply cd to the Galaxy directory, then run:
If you don’t have gradle installed on your machine then run instead:
Galaxy will be available on Maven Central very soon!
The user manual explains, at length, how to configure Galaxy (see Configuring and Monitoring Galaxy). However, for your convenience, a number of pre-built configurations are included with the Galaxy distribution, and can be found in the config directory.
While normally you’d have one large XML file with Galaxy’s configuration, these sample configurations are divided into snippet XML files (those XML files starting with an underscore in the config directory) that you can mix and match.
Regular Galaxy cluster nodes are called “peers”, and to configure a peer, take a look at peer.xml in the config directory. It contains three or four XML import elements:
It is recommended that you configure your cluster to use a server node or a dumb server. See Should you use a server?.
In addition to this file, you’ll need to edit an additional .properties file. You must provide these properties (you can edit peer.properties in the config directory):
Properties 4 and 5 must be the same for all peer nodes. Properties 2 and 3 may be different for each node (this is especially useful when running several nodes on the same machine for testing). The nodeId property should be different for each node (but the same for nodes in the same backup group).
If you create several peer properties files with different ports, you can run several peers on a single machine!
If you heed our recommendation and want to use Galaxy with a server node (or more, though, currently, only a single server node is supported), you’re going to need to configure it. Just like with peers, you should start by looking at the server.xml file that’s in the config directory. It is comprised of three XML import elements:
_server.xml. This import is required for all peer configurations.
Cluster management product. Can be one of: * _jgroups.xml - to use JGroups.
Persistence layer. Can be one of:
_bdb.xml - to use Berkeley DB, Java Edition as the persistence engine. If you choose to use BDB JE, you might want to change the envHome property, defined in the _bdb.xml file, to point to the directory where you want to place the BDB files, and the truncate property (which can be true or false``) depending on whether or not you want the database truncated (cleared) upon server startup. See Using BerkeleyDB for more information about configuring BDB.
_sql.xml - to use a SQL database with a JDBC driver for persistence. If chosen, edit _sql.xml with your database connection information. See Using SQL for more information about configuring the RDBMS integration.
Because you’re using a server node and peers would need to access it over the network, it’s best that you run the server on the same machine running the DB to save the extra network hop. This should actually provide better performance than using the DB as a dumb server as explained above.
For the server, too, you’ll need to edit server.properties in the config directory. Leave galaxy.nodeId set to 0 - this is what identifies the node as the server. But set galaxy.port to the TCP port you want the peers to use when connecting to the server.
Galaxy is currently in ALPHA and considered experimental. Not all configurations have been thoroughly tested, and some configuration combinations haven’t been tested at all.
Please submit bug reports (and feature requests) to the issue tracker.
The Galaxy server runs as a standalone process. The peers are your application code that calls into the Galaxy library. Note that if you’re using ZooKeeper, you must start the ZooKeeper servers before starting any Galaxy nodes.
To run the server, simply run the executable Java class co.paralleluniverse.galaxy.Server, and pass it two command-line arguments: the XML configuration file and the properties file, like so:
java -classpath galaxy.jar co.paralleluniverse.galaxy.Server config/server.xml config/server.properties
In your application code, you need to get an instance of the Grid class (see :ref:man-api`), which is the entry point to Galaxy’s API. You do it by calling the getInstance static method, and passing it the location of the XML and properties files you have configured in the configuration step, like this:
Grid grid = Grid.getInstance("config/peer.xml", "config/peer1.properties");
(depending on your current directory you may need to provide a different path to the XML and properties files.)
Usually, your next statement would be to tell the node to go online:
Now you should read the API section of the manual to learn how to use the Galaxy API.