-
Notifications
You must be signed in to change notification settings - Fork 176
COMDIRAC Configuration
The following assumes that the DIRAC client is already installed and configured in the user's environment
Second thing to do, is to configure your user's defaults. You can use dconfig command to fill a minimal configuration file:
$ dconfig --minimal
[global]
default_profile = dirac_user
[dirac_user]
group_name = dirac_user
home_dir = /
default_se = DIRAC-USER
The main idea behind this configuration file is that users can record several profiles, each with its own default settings. In many DIRAC instance, users belong to several groups/VOs. You may want to create at least one profile for your daily work. Here is an example [fg] profile one can add to its ~/.dirac/dcommnands.conf:
[fg]
group_name = fvo.france-grilles.fr
home_dir = /vo.france-grilles/user/p/pgay
[global]
default_profile = fg
dconfig --guess
New in v0r17: sometimes, section names configured by dconfig --guesss are not very handy. Renaming them is not always a perfect solution. You can now configure aliases for each section. For example, if you want to refer indifferently dirac or du for configured section dirac_user, you can write the following:
[dirac_user]
aliases = dirac,du
...
There are many options to configure in the dcommands.conf file. We will see some of them in the following.
Additionnally, you can easily see the content of your dcommands.conf with dconfig command.
With your configuration file set, you can now initialize a COMDIRAC session:
$ dinit
Enter Certificate password:
subject : /O=GRID-FR/C=FR/O=BORDEAUXI/OU=DRIMM/CN=Pierre Gay/CN=proxy
issuer : /O=GRID-FR/C=FR/O=BORDEAUXI/OU=DRIMM/CN=Pierre Gay
identity : /O=GRID-FR/C=FR/O=BORDEAUXI/OU=DRIMM/CN=Pierre Gay
timeleft : 23:59:59
DIRAC group : frangrilles_user
path : /tmp/x509up_u1000
username : pgay
properties : NormalUser
The COMDIRAC session are copied from dcommands.conf [global] section into your environment. Then, options from the profile you chose are in turn copied into your environment. This means that you can put in the [global] section a set options shared by all profiles (unless overriden in the profile section itself).
You can look what's stored in your current session with:
$ dgetenv
default_profile = fg
default_se=DIRAC-USER
cwd=/vo.france-grilles.fr/user/p/pgay
profile_name=frangrilles_user
home_dir=/vo.france-grilles.fr/user/p/pgay
group_name=frangrilles_user
You can see that a couple of options were added to the original profile options by dinit. * profile_name helps you to remember what profile is currently loaded. * cwd comes from home_dir and is your File Catalog current working directory (we will learn about this in the following). * default_profile comes from the [global] section.
At any moment after dinit you can see what's in your session options with dgetenv. You can also look for a specific option value. For example:
$ dgetenv profile_name
frangrilles_user
Using dsetenv, you can modify session options. For example, if we want to change the value of default_se, we can do:
$ dgetenv default_se
DIRAC-USER
$ dsetenv default_se=M3PEC-disk
$ dgetenv default_se
M3PEC-disk