3. GDA Installation

3.1. Introduction

This section will outline the key components which make up a GDA installation.

3.2. Application Requirements

3.2.1. Java

The deployed GDA products contain a JRE within them. For development an appropriate JDK should be available. This is typically provided by loading a java module.

module load java/21

3.2.2. Message Bus

GDA requires a message bus to be available in order facilitate client/server communications.

ActiveMq is currently the primary choice of message bus however there is now an interest in using RabbitMQ.

For beamlines deployments this is managed as a service on the control machines by Science Computing. For dummy instances on local machines the service can be started manually by running the command (from the dasctools module):

activemq-for-dummy

3.3. GDA Configuration

See GDA Configuration.

3.3.1. Installation mode

There are two running modes used within GDA: live and dummy. Live mode is the mode used on the beamlines for active experiments whist dummy is primarily for testing on a developers desk machine. Below is a table summarising the key differences:

Live

Dummy

Default mode on a beamline machine (e.g. p45-ws001)

Default mode when not on a beamline machine

Send messages to real hardware

Uses dummy device classes or simulate versions

Writes data to /dls/$(BEAMLINE)/data

Writes data to gda_data_non_live in workspace parent folder

Writes logs to /dls_sw/$(BEAMLINE)/logs

Writes data to gda_logs_non_live in workspace parent folder

Also note that on beamline machines, the variable BEAMLINE is set automatically. Dummy or live startup is also controlled by an environment variable: GDA_MODE=live.

The p45 beamline corresponds to a test beamline located in one of the labs in Diamond House. The structure of its config is modern and concise (unlike some of the other beamline configurations).

3.4. Installation

For details on the processes behind the installation of GDA for development purposes and beamline deployment see the Build and Infrastructure section of this document.

3.4.1. Running GDA

Beamline Installation

On beamlines GDA is managed by the amygdala GDA launcher. When logged into a beamline workstation a gda command will be available which is used for starting the server and clients. See docs for further details.

Launching from the IDE

To run the server find the plugin called uk.ac.diamond.daq.server.feature (from the Package Explorer). In here there is a file called ‘How to launch the GDA Server from within Eclipse’. A summary of the instructions contained within this file are given below (using the p45 beamline as an example):

  • Open uk.ac.diamond.daq.server.product.

  • Click Synchronize (under Testing).

  • Click Launch an Eclipse Application.

  • Stop the launch (Red square on toolbar or on Console view).

  • Go to Run -> Run Configurations and ensure uk.ac.diamond.daq.server.product is selected.

  • Go to the environment tab and select New.

  • Set the variable to be: GDA_CONFIG with value: ${project_loc:p45-config} (where p45 should be replaced by the required beamline).

    • Alternatively an absolute path can be provided to a different configuration directory.

  • Run again by choosing the launch configuration under the green play arrow in the top toolbar.

Running the client follows a similar process but the client does not need any environment variables (assuming the config is set in the product file). The client project for p45 is uk.ac.diamond.daq.beamline.p45.feature.

To stop the client it should be sufficient to close the client window. To stop the servers you can use the red Stop button in Eclipse either in the top tool bar or in the Console view where the output of the application is displayed.