Salome HOME
PR: add resources/Plugin in Install
[modules/kernel.git] / doc / SALOME_Application.txt
1
2 ======================================================================
3 SALOME Application Concept. Configuration for one or more computers
4 ======================================================================
5
6 *html version of this document is produced with docutils*::
7
8   rst2html doc.txt > doc.html
9
10 This document corresponds to SALOME2 3.1. (alpha version)
11
12 +-------------------------------------------+
13 | **WORK in PROGRESS, INCOMPLETE DOCUMENT** |
14 +-------------------------------------------+
15
16 The following explains how to configure your own application with your list of
17 modules, how to define and run this application on one or more computers.
18
19 .. contents::
20 .. sectnum::
21
22
23 General principles
24 ------------------
25
26 A SALOME application is defined by a set of modules (GEOM, SMESH, ASTER...).
27
28 A SALOME User can define several SALOME Applications. These applications are
29 runnable from the same user account. These applications may share the same 
30 KERNEL and modules. Thus, the application configuration is independant of
31 KERNEL and must not be put in KERNEL_ROOT_DIR.
32
33 Furthermore, prerequisites may not be the same on all the applications.
34
35 A SALOME Session can run on a several computers.
36
37 Binary modules and prerequisites are installed on the different computers.
38 There is no need to have all the modules on each computer (the minimum is
39 KERNEL).
40
41 There is no need of standardization or centralised information on the details
42 of configuration on each computer (PATH, LD_LIBRARY_PATH, environment
43 variables) provided the application modules are version - compatible. Details
44 of configuration stay private to the computer, and are held by scripts on each
45 computer.
46
47 There is no hierarchy between the computers (for example only one master
48 computer used to launch application).
49
50 The SALOME user has an account on all the computers. Access between
51 account@computer is via rsh or ssh and must be configured for use without
52 password (key exchange for ssh). Account may be different on each
53 computer.
54
55 Application Directory
56 ---------------------
57
58 The script createAppli.sh in ${KERNEL_ROOT_DIR}/bin/salome creates an
59 application directory with the given path in parameter. ${APPLI} is a path 
60 relative to ${HOME}.
61
62 The directory is only a skeleton, the user has to edit several files to
63 configure his own application. These files are described after, the list is:
64
65 - env.d/atFirst.sh
66 - env.d/envProducts.sh
67 - env.d/envSalome.sh
68 - CatalogResources.xml
69 - SalomeApp.xml
70
71 Directory ${APPLI} must be created on each computer of the application.
72 The easiest way is to use the same relative path (to ${HOME}) on each computer.
73 (Sometimes it is not possible to use the same path everywhere, for instance
74 when ${HOME} is shared with NFS, so it is possible to define different path
75 following the computers).
76
77 The ${APPLI} directory contains scripts for environment and runs. Environment
78 scripts must be configured (by the user) on each computer. All the environment
79 scripts are in the ${APPLI}/env.d directory. 
80
81 The script  ${APPLI}/envd sources **all** the files in ${APPLI}/env.d in
82 alphanumeric order (after edition, think to remove backup files). the envd
83 script is used by run scripts.
84
85
86 Proposal for env.d scripts
87 ~~~~~~~~~~~~~~~~~~~~~~~~~~
88 Each user **must define** his own configuration for these scripts, following
89 the above rules. **The following is only an example not working as it is**.
90
91 atFirst.sh
92     Sets the computer configuration not directly related to SALOME,
93     like useful tools, default PATH.
94
95 envProducts.sh
96     Sets the SALOME prerequisites.
97
98 envSALOME.sh
99     Sets all the MODULE_ROOT_DIR that can be used in the SALOME application.
100
101     SalomeAppConfig is also defined by::
102
103       export SalomeAppConfig=${HOME}/${APPLI}
104
105     where SalomeAppConfig designates the directory containing SalomeApp.xml. 
106     Note that ${APPLI} is already defined by the calling scripts when 
107     env.d/envSalome.sh is sourced.
108
109 User run scripts
110 ~~~~~~~~~~~~~~~~
111
112 The SALOME user can use 4 scripts:
113
114 runAppli
115    Launches a SALOME Session
116    (similar to ${KERNEL_ROOT_DIR}/bin/salome/runSalome but with a different
117    name to avoid confusions).
118
119 runSession
120    Launches a shell script in the SALOME application environment, with access
121    to the current SALOME session (naming service), if any.
122    Without arguments, the script is interactive. With arguments, the script
123    executes the command in the SALOME application environment.
124
125 runConsole
126    Gives a python console connected to the current SALOME Session.
127    It is also possible to use runSession, then python.
128
129 runTests
130    Similar to runSession, used for unit testing. runSession tries to use an
131    already existing naming service definition from a running session (hostname
132    and port number), runTests defines a new configuration for naming service
133    (new port number).
134
135 SALOME internal run scripts
136 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
137
138 envd
139    Sets SALOME application environment, envd is sourced by other scripts.
140
141 For remote calls, SALOME uses one script.
142
143 runRemote.sh
144    This script is mainly used to launch containers. The first 2 arguments
145    define the hostname and port userd for naming service, the remaining
146    arguments define the command to execute.
147
148 Other configuration files
149 ~~~~~~~~~~~~~~~~~~~~~~~~~
150
151 SalomeApp.xml
152    This file is similar to the default given
153    in ${GUI_ROOT_DIR}/share/salome/resources
154
155 CatalogRessources.xml
156    This files describes all the computer the application can use. The given
157    example is minimal and suppose ${APPLI} is the same relative path
158    to ${HOME}, on all the computers. A different directory can be set on a
159    particular computer with a line::
160
161        appliPath="my/specific/path/on/this/computer"
162
163
164