Skip to content
Snippets Groups Projects
Commit 85f349ed authored by Mikhail Mineev's avatar Mikhail Mineev
Browse files

documentation updated

parent c3a9b9de
No related branches found
No related tags found
1 merge request!18Update v61
Pipeline #12298636 passed
......@@ -15,8 +15,6 @@ The command line tools are strongly linked with the CrestApi library, thus we su
git clone https://gitlab.cern.ch/crest-db/CrestApi.git
cd <CrestApi directory>
git fetch
git switch release-6.1-CR1
```
You should then install locally the CrestApi lib following the instructions in the readme.
......@@ -27,9 +25,10 @@ mkdir $HOME/installed
mkdir build ; cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/installed ..
make ; make install
make && make install
```
2. Clone CrestCmd package:
```shell
......@@ -37,27 +36,26 @@ cd ../../
git clone https://gitlab.cern.ch/crest-db/crest-cmd.git
cd <crest-cmd directory>
git fetch
git switch release-6.1-CR1
```
3. Compile the project:
```shell
mkdir ./build
cd build
cmake -DCMAKE_PREFIX_PATH=$HOME/installed -DCMAKE_INSTALL_PREFIX=$HOME/installed ..
make
cmake -DCMAKE_PREFIX_PATH=$HOME/local_lib -DCMAKE_INSTALL_PREFIX=$HOME/installed ..
make && make install
```
4. Path setup:
```shell
export PATH=$PATH:./
export PATH=$HOME/installed/bin:$PATH
export LD_LIBRARY_PATH=$HOME/installed/lib64:$LD_LIBRARY_PATH
```
5. Set the `CREST_API_URL` variable (CREST Server URL):
5. Set the `CREST_API_URL` variable (CREST Server URL) and switch off the CREST server version check:
```shell
export CREST_API_URL=http://atlaf-alma9-02.cern.ch:8080/api-v6.0
export CREST_API_URL=http://crest-j23.cern.ch:8081/api-v6.0
export CREST_VERSION_CHECK=OFF
# (Or use the setup script):
......@@ -92,7 +90,7 @@ If this variable set crestCmd add the CREST server response in the output, which
**jq Example**:
```bash
./crestCmd get tagList -n "%LAR%" | egrep "crestCmd:DATA :" | awk -F "crestCmd:DATA :" '{print $2}' | jq
crestCmd get tagList -n "%LAR%" | egrep "crestCmd:DATA :" | awk -F "crestCmd:DATA :" '{print $2}' | jq
```
Or you can use the command crestCLI. Example:
```bash
......
{
"description": "test",
"insertionTime": "2021-02-16T13:18:51.000+0000",
"name": "MvG_TEST_09",
"release": "1",
"scenario": "test",
"snapshotTime": "2021-02-16T13:18:51.000+0000",
"type": "t",
"validity": 0,
"workflow": "M"
}
{
"globalTagName": "mvg01",
"record": "rtest",
"label": "ltest",
"tagName": "test_MvG3"
}
{
"name":"test_MvG3",
"timeType":"time",
"synchronization":"none",
"description":"none",
"lastValidatedTime":0,
"endOfValidity":0,
"insertionTime":"2018-12-06T11:18:35.641+0000",
"modificationTime":"2018-12-06T11:18:35.641+0000",
"payloadSpec":"stave: Int32, eta: Int32, mag: Float, base: Float, free: Float"
}
{
"name":"test_MvG3c",
"timeType":"time",
"synchronization":"none",
"description":"none",
"lastValidatedTime":0,
"endOfValidity":0,
"insertionTime":"2018-12-06T11:18:35.641+0000",
"modificationTime":"2018-12-06T11:18:35.641+0000",
"payloadSpec":"stave: Int32, eta: Int32, mag: Float, base: Float, free: Float"
}
{
"tagName": "test_MvG3",
"description": "desc-01",
"tagInfo": "taginf-01",
"chansize": 0,
"colsize": 0
}
......@@ -72,11 +72,11 @@ Here is how you can build crest-cmd on your local machine.
### 3. Environment Setup
On lxplus without any previous setup you can compile and install CrestApi and then use that installation to compile this package.
Suppose you have been installing CrestApi in `$HOME/public/lib`, then you can do:
Suppose you have been installing CrestApi in `$HOME/installed`, then you can do:
```bash
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=$HOME/public/lib ..
cmake -DCMAKE_PREFIX_PATH=$HOME/installed ..
make
```
......@@ -87,8 +87,10 @@ PLEASE FILL THIS ONE
```
### 4. CREST Server URL Setup
To set up the `CREST_SERVER_PATH` environment variable, use:
To set up the `CREST_API_URL` environment variable, use:
```bash
export CREST_API_URL=http://crest-j23.cern.ch:8081/api-v6.0
## or
source ./scripts/crest-setup.sh
```
Please update that file to use a CREST server URL which is appropriate.
......@@ -122,6 +124,7 @@ Use `crestCmd get commands` to list available commands.
- `crestCmd get payloadMetaInfo [OPTIONS]`
- `crestCmd get payloadTagInfo [OPTIONS]`
- `crestCmd get tagSize [OPTIONS]`
- `crestCmd get streamerInfo [OPTIONS]`
3. **Create Methods**
- `crestCmd create tag [OPTIONS]`
- `crestCmd create tagMetaInfo [OPTIONS]`
......@@ -146,7 +149,7 @@ To get a short help for the each utility you can use the flag -h or --help. For
```bash
./copyGlobalTag -h
```
Below we use `CREST_SERVER` as an environment variable with the server URL, like `http://crest-04.cern.ch:80` for example.
Below we use `CREST_API_URL` as an environment variable with the server URL, like `=http://crest-j23.cern.ch:8081/api-v6.0` for example.
You should carefully select the server you are going to use.
### 1) crestCopy
......@@ -155,7 +158,7 @@ You can choose the time interval of IOVs which will be copied.
Example:
```bash
crestCopy -n test_MvG9a --server http://crest-j23.cern.ch:8080/api-v5.0 --target ./tmp -o test_MvG9b
crestCopy -n test_MvG9a --server http://crest-j23.cern.ch:8081/api-v6.0 --target ./tmp -o test_MvG9b
```
Here:
......@@ -176,7 +179,7 @@ copyGlobalTag is an utility to create a copy of a global tag with new name:
Example:
```bash
copyGlobalTag -g TEST_MVG_06 -o TEST_MVG_NEW --server http://crest-j23.cern.ch:8080/api-v5.0 --target http://crest-03.cern.ch:9090/api-v5.0
copyGlobalTag -g TEST_MVG_06 -o TEST_MVG_NEW --server http://crest-j23.cern.ch:8081/api-v6.0 --target http://atlaf-alma9-02.cern.ch:8080/api-v6.0
```
Here:
......@@ -194,7 +197,7 @@ the directory (or CREST server), where this tag will be created (parameter key -
Example:
```bash
tag_creation -n test_MvG9b --server http://crest-j23.cern.ch:8080/api-v5.0 --size 2
tag_creation -n test_MvG9b --server http://crest-j23.cern.ch:8081/api-v6.0 --size 2
tag_creation -n test_MvG9a --server /tmp/crest --size 3
```
......
......@@ -5,10 +5,12 @@
# export CREST_API_URL=http://crest-04.cern.ch
# export CREST_API_URL=http://crest-j23.cern.ch:8080/api-v5.0
# export CREST_API_URL=https://atlaf-alma9-01.cern.ch/api-v6.0
export CREST_API_URL=http://atlaf-alma9-02.cern.ch:8080/api-v6.0
# export CREST_API_URL=http://atlaf-alma9-02.cern.ch:8080/api-v6.0
export CREST_API_URL=http://crest-j23.cern.ch:8081/api-v6.0
export CREST_FOLDER_PATH=/tmp/$USER/crest_dump
# ON or OFF, Crest version check in the CrestClient creation.
export CREST_VERSION_CHECK=ON
# export CREST_VERSION_CHECK=ON
export CREST_VERSION_CHECK=OFF
# CREST logging level: NIL (disebled), VERBOSE, DEBUG, INFO, WARNING, ERROR, FATAL, ALWAYS
# export CREST_LOG_LEVEL=DEBUG
export CREST_LOG_LEVEL=ERROR
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment