-
Notifications
You must be signed in to change notification settings - Fork 176
Dirac shared development
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:
Using a shared account (i.e., dirac) and the procedure described on the DIRAC documentation, you have to do the installation of a new DIRAC setup (in the following it is assume to be in /opt/dirac). It should include all the necessary services, agents and databases that are necessary for the functionalities that you want to develop. This is the reference installation shared by all developers.
To allow several the different developers to make use of this installation one fix is necessary. The private key of the host certificate has to be made read available for all developers. If developers and dirac users share the same group, this can be achieve by the following command:
chmod g+r /opt/dirac/etc/grid-security/hostkey.pem
For each developer a working directory must be created (i.e., /opt/[username]) , owned by the user and including a link to the shared etc directory (/opt/dirac/etc). On this 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 checkout from the repository. This is your private directory where the development will take place.
In order to replace a shared component (service or agent) by your private one, first it needs to be installed in your private area:
/opt/[username] > dirac-install-service [system] [service]
or:
/opt/[username] > dirac-install-agent [system] [agent]
Then you have to give dirac permission to access the runit directory structure. If dirac and the developer are sharing the same group:
/opt/[username] > find runit/ -type d -exec chmod g+rwx {} \;
The last step is to stop the shared component and replace it with your 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 runit:
/opt/dirac/startup > rm Configuration_Server /opt/dirac/startup > ln -s /opt/[username]/runit/Configuration/Server Configuration_Server
Once the development is done and the changes committed and the shared installation moved forward to the new release, the link can be set back the original location.