Changeset 0b00607 in flex_extract.git for for_developers/Sphinx/source/Documentation/Input/setup.rst
- Timestamp:
- Jul 29, 2019, 8:23:57 AM (5 years ago)
- Branches:
- master, ctbto, dev
- Children:
- bc27d19
- Parents:
- 41c9dbc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
for_developers/Sphinx/source/Documentation/Input/setup.rst
r41c9dbc r0b00607 3 3 ************************************** 4 4 5 .. _ref-setup: 6 7 8 The installation script ``setup.sh`` prepares the call of the Python 9 installation script (``install.py``) with its necessary command line arguments. 10 The ``setup.sh`` script is located in the root directory of ``flex_extract`` and has a 11 section labelled with "AVAILABLE COMMANDLINE ARGUMENTS TO SET" which 12 contains the available command line parameters for ``install.py``. The user has to adapt these 13 parameters for his personal use. The parameters are listed and described in the following table. 14 The script also does some checks to guarantee necessary parameters were set. 15 16 .. csv-table:: 17 :file: ../../_files/InstallationParameters.csv 18 :header-rows: 1 19 :widths: auto 20 21 After the installation some tests can be conducted. 22 They are described in section :ref:`ref-testinstallfe`. 5 6 The installation of ``flex_extract`` is done by the Shell script ``setup.sh`` which is located in the root directory of ``flex_extract``. 7 It calls the top-level Python script ``install.py`` which does all necessary operations to prepare the selected application environment. This includes: 8 9 - preparing the file ``ECMWF_ENV`` with the user credentials for member state access to ECMWF servers (in **remote** and **gateway** mode) 10 - preparation of a compilation Korn-shell script (in **remote** and **gateway** mode) 11 - preparation of a job template with user credentials (in **remote** and **gateway** mode) 12 - create a tar-ball of all necessary files 13 - copying tar-ball to target location (depending on application mode and installation path) 14 - submit compilation script to batch queue at ECMWF servers (in **remote** and **gateway** mode) or just untar tar-ball at target location (**local mode**) 15 - compilation of the FORTRAN90 program ``CONVERT2`` 16 17 18 The Python installation script ``install.py`` has a couple of command line arguments which are defined in ``setup.sh`` in the section labelled with "*AVAILABLE COMMANDLINE ARGUMENTS TO SET*". The user has to adapt these parameters for his personal use. The parameters are listed and described in :ref:`ref-instparams`. The script also does some checks to guarantee necessary parameters were set. 19 20 After the installation process, some tests can be conducted. They are described in section :ref:`ref-testinstallfe`. 21 22 The following diagram sketches the involved files and scripts in the installation process: 23 24 .. _ref-install-blockdiag: 25 26 .. blockdiag:: 27 28 blockdiag { 29 30 default_fontsize = 24; 31 32 // Set node metrix 33 node_width = 300; // default is 128 34 35 // Set span metrix 36 span_width = 80; // default value is 64 37 38 ECMWF_ENV.template [shape = flowchart.input]; 39 compilejob.template [shape = flowchart.input]; 40 job.template [shape = flowchart.input]; 41 42 compilejob.ksh [shape = roundedbox]; 43 // tarball 44 // ECMWF_ENV 45 // job.temp 46 47 "CONTROL file" [shape = flowchart.input]; 48 49 setup.sh [shape = roundedbox]; 50 install.py [shape = roundedbox]; 51 52 "ECMWF server" [shape = flowchart.terminator]; 53 54 //beginpoint [shape = beginpoint]; 55 56 orientation = landscape; 57 58 //beginpoint -> setup.sh; 59 setup.sh -> install.py; 60 61 install.py <- "CONTROL file"; 62 63 install.py -> ECMWF_ENV, job.temp, compilejob.ksh, tarball; 64 65 ECMWF_ENV.template, job.template, compilejob.template -> install.py; 66 67 tarball, compilejob.ksh -> "ECMWF server"; 68 69 70 group exec { 71 // set backgound color 72 color = "#FF6633"; 73 74 orientation = portrait; 75 setup.sh; 76 install.py; 77 } 78 79 group out { 80 color = "#FFFFFF"; 81 group output { 82 color = "#99FF99"; 83 ECMWF_ENV; 84 job.temp; 85 compilejob.ksh; 86 } 87 88 group ECMWF { 89 color = "#006600"; 90 tarball; 91 92 } 93 } 94 95 group input { 96 97 color = "#FFFFFF"; 98 99 group temps { 100 color = "#66CCFF"; 101 102 ECMWF_ENV.template; 103 job.template; 104 compilejob.template; 105 } 106 107 group in { 108 color = "#3366FF"; 109 "CONTROL file"; 110 } 111 } 112 113 } 114 115 116 .. blockdiag:: 117 :caption: Diagram of data flow during the installation process. The trapezoids are input files with the light blue area being the template files. The edge-rounded, orange boxes are the executable files which start the installation process and reads the input files. The rectangular, green boxes are the output files. The light green files are files which are only needed in the remota and gateway mode. 118 119 blockdiag { 120 121 group{ 122 orientation = portrait; 123 label = "Legend"; 124 fontsize = 28; 125 color = "#FFFFFF"; 126 'executable scripts' [shape = roundedbox]; 127 'input files' [shape = flowchart.input]; 128 'output files'; 129 server [shape = flowchart.terminator]; 130 } 131 } 132 133 .. _ref-instparams: 134 135 Installation Parameter 136 ---------------------- 137 138 .. exceltable:: Parameter for Installation 139 :file: ../../_files/InstallationParameter.xls 140 :header: 1 141 142 143 144 Content of ``setup.sh`` 145 ----------------------- 146 147 .. literalinclude:: ../../../../../setup.sh 148 :language: bash 149 :caption: setup.sh 150 151 152 .. _ref-install-script: 153 154 Usage of ``install.py`` (optional) 155 ---------------------------------- 156 157 It is also possible to start the installation process of ``flex_extract`` directly from command line by using the ``install.py`` script instead of the wrapping Shell script ``setup.sh``. This top-level script is located in 158 ``flex_extract_vX.X/source/python`` and is executable. With the ``help`` parameter we see again all possible 159 command line parameter. 160 161 .. code-block:: bash 162 163 install.py --help 164 165 usage: install.py [-h] [--target INSTALL_TARGET] [--makefile MAKEFILE] 166 [--ecuid ECUID] [--ecgid ECGID] [--gateway GATEWAY] 167 [--destination DESTINATION] [--installdir INSTALLDIR] 168 [--job_template JOB_TEMPLATE] [--controlfile CONTROLFILE] 169 170 Install flex_extract software locally or on ECMWF machines 171 172 optional arguments: 173 -h, --help show this help message and exit 174 --target INSTALL_TARGET 175 Valid targets: local | ecgate | cca , the latter two 176 are at ECMWF (default: None) 177 --makefile MAKEFILE Name of Makefile to use for compiling the Fortran 178 program (default: None) 179 --ecuid ECUID The user id at ECMWF. (default: None) 180 --ecgid ECGID The group id at ECMWF. (default: None) 181 --gateway GATEWAY The name of the local gateway server. (default: None) 182 --destination DESTINATION 183 The ecaccess association, e.g. myUser@genericSftp 184 (default: None) 185 --installdir INSTALLDIR 186 Root directory where flex_extract will be installed 187 to. (default: None) 188 --job_template JOB_TEMPLATE 189 The rudimentary template file to create a batch job 190 template for submission to ECMWF servers. (default: 191 job.template) 192 --controlfile CONTROLFILE 193 The file with all CONTROL parameters. (default: 194 CONTROL_EA5) 195 196 197 23 198 24 199
Note: See TracChangeset
for help on using the changeset viewer.