Skip to content

Dirac shared development

acasajus edited this page May 6, 2011 · 3 revisions

DIRAC Shared Installation

This document describes how several developers can share a common DIRAC installation that it is shared while each of them does development on different components. The main idea is to have one shared installation that it is used for running most of the services and agents of a Setup, while each developer has its own private installation that is used to run the specific component being developed. This is achieved with the following Steps:

1. Standard Installation

Using a shared account (i.e., dirac) follow the procedure described on the DIRAC documentation to do an installation of a new DIRAC setup (in the following steps it is assumed to be installed in /opt/dirac). It should include all the necessary services, agents and databases that are necessary for the functionalities that developers require. This is the reference installation shared by all developers.

2. Fixes to the Standard Installation

To allow several developers to make use of this installation one modification is necessary. The private key of the host certificate has to be made read available for all developers. If the dirac user and developer's users share the same group, this can be achieved by the following command:

chmod g+r /opt/dirac/etc/grid-security/hostkey.pem

3. Preparation for Developer Installations

For each developer a working directory must be created (i.e., /opt/[username]) owned by the user. Inside this user directory a link to the shared etc directory (/opt/dirac/etc). On the user directory, each developer must do a private installation, i.e.:

/opt/[username] > /opt/dirac/pro/scripts/dirac-install -t server -r [same version as the shared installation] -v

The installed DIRAC (or the extension XXXDIRAC) directory must be replaced by a working copy connected to the source control system used. This is the user's private directory where the development will take place.

4. Installing a new Component

In order to replace a shared component (service or agent) by the developer's private one, first it needs to be installed in the private area:

/opt/[username] > dirac-install-service [system] [service]

or:

/opt/[username] > dirac-install-agent [system] [agent]

Then, access to the runit directory has to be given to the dirac user. If dirac and the developer are sharing the same group:

/opt/[username] > find runit/ -type d -exec chmod g+rwx {} \;

5.- Starting the new Component

The last step is to stop the shared component and replace it with the developer's own private component. As dirac go to /opt/dirac/startup, remove the link of the component to the runit directory and make a new link to the developer's runit:

/opt/dirac/startup > rm Configuration_Server
/opt/dirac/startup > ln -s /opt/[username]/runit/Configuration/Server Configuration_Server

Once the development is done, the changes have been committed and the shared installation has moved forward to the new release, the link can be set back the original location.

Clone this wiki locally