Expand on Readme

This commit is contained in:
Dominik Werder
2022-02-21 11:28:29 +01:00
parent f5cd52e0d1
commit 88478f455d

153
Readme.md
View File

@@ -18,34 +18,161 @@ Then run in this directory:
cargo build --release
```
Binary is at: `./target/release/daqbuffer`
Executable will be placed by default at: `./target/release/daqbuffer`
# Download executable for AMD64 RHEL 7
The latest executable for RHEL 7 can be downloaded here from
<https://data-api.psi.ch/distri/daqbuffer-amd64-rhel7>
and also be found (e.g. via rsync) on host `data-api.psi.ch` at `/opt/distri/daqbuffer-amd64-rhel7`
# Deployment
## As Proxy
```bash
daqbuffer proxy --config <CONFIG.JSON>
```
Example config:
```json
{
"name": "data-api.psi.ch",
"listen": "0.0.0.0",
"port": 8371,
"backends": [
{
"name": "sls-archive",
"url": "http://sls-archiver-api.psi.ch:8380"
},
{
"name": "gls-archive",
"url": "https://gls-data-api.psi.ch"
}
],
"backends_search": [
{
"name": "sf-databuffer",
"url": "https://sf-data-api.psi.ch"
},
{
"name": "sls-archive",
"url": "http://sls-archiver-api.psi.ch:8380"
},
{
"name": "gls-archive",
"url": "https://gls-data-api.psi.ch"
},
{
"name": "hipa-archive",
"url": "https://hipa-data-api.psi.ch"
},
{
"name": "proscan-archive",
"url": "https://proscan-data-api.psi.ch"
}
],
"backends_pulse_map": [
{
"name": "sf-databuffer",
"url": "https://sf-data-api.psi.ch"
}
],
"backends_status": [
{
"name": "sf-databuffer",
"url": "https://sf-data-api.psi.ch"
},
{
"name": "sf-archive",
"url": "https://sf-archiver-api.psi.ch"
},
{
"name": "sls-archive",
"url": "http://sls-archiver-api.psi.ch:8380"
},
{
"name": "gls-archive",
"url": "https://gls-data-api.psi.ch"
},
{
"name": "hipa-archive",
"url": "https://hipa-data-api.psi.ch"
},
{
"name": "proscan-archive",
"url": "https://proscan-data-api.psi.ch"
}
]
}```
## As Retrieval
```bash
daqbuffer retrieval --config <CONFIG.JSON>
```
Example config:
```json
{
"name": "sf-daqbuf-21.psi.ch",
"cluster": {
"database": {
"host": "sf-daqbuf-33.psi.ch",
"name": "daqbuffer",
"user": "daqbuffer",
"pass": "daqbuffer"
},
"runMapPulse": true,
"nodes": [
{
"host": "sf-daqbuf-21.psi.ch",
"listen": "0.0.0.0",
"port": 8380,
"port_raw": 8390,
"backend": "sf-databuffer",
"cache_base_path": "{{databuffer_base_dir}}",
"sf_databuffer": {
"data_base_path": "{{databuffer_base_dir}}",
"ksprefix": "{{databuffer_ks_prefix}}"
}
},
"... more nodes here ..."
]
}
}
```
# HTTP API docs
The documentation of the currently running service version is served by the service itself:
<https://data-api.psi.ch/api/4/documentation/>
These docs are found in this repository in the directory:
<httpret/static/documentation/>
# Setup Toolchain
Install Rust toolchain.
Install the Rust toolchain.
Quoting from <https://www.rust-lang.org/tools/install> the official installation method:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
This specifically requires a verified TLS connection and then executes the installer.
This specifically requires a verified TLS connection for the download and then executes the installer.
Installation will by default be done only for your user. No superuser privileges required.
Installation will by default be done only for the current user.
No superuser privileges are required.
You should have the commands `cargo` and `rustup` now available in your terminal.
# HTTP API docs
The documentation of the currently running service is served by the service itself:
<https://data-api.psi.ch/api/4/documentation/>
The docs are found in this repository here: <httpret/static/documentation/>
# License
GNU General Public License version 3 or later.