mirror of
https://github.com/ivan-usov-org/bec.git
synced 2025-04-22 02:20:02 +02:00
docs: update user guide for installation
This commit is contained in:
parent
456ae68f6b
commit
aa5a245b46
@ -1,34 +1,59 @@
|
||||
## Installation
|
||||
If you are using BEC at the beamline, there is a good chance that the client is already installed. Please contact your beamline responsible for further information.
|
||||
If you need to install the client yourself, you can create a Python (>= 3.8) environment using
|
||||
If you are using BEC at the beamline, there is a good chance that BEC is already installed. Please contact your beamline responsible for further information.
|
||||
If you need to install BEC yourself, the following section will guide you through this.
|
||||
|
||||
|
||||
**Requirements:**
|
||||
|
||||
---
|
||||
- python (>=3.8)
|
||||
- redis
|
||||
- tmux (=3.2)
|
||||
---
|
||||
|
||||
On a PSI-system, requirements are available via pmodules. If you run BEC on your own system, make sure to install the required packages.
|
||||
```{code-block} bash
|
||||
module add psi-python39/2021.11
|
||||
module add redis/7.0.12
|
||||
module add tmux/3.2
|
||||
```
|
||||
**Step-by-Step Guide**
|
||||
|
||||
1. Create a virtual environment and activate it afterwards
|
||||
|
||||
```{code-block} bash
|
||||
python -m venv ./bec_venv
|
||||
source ./bec_venv/bin/activate
|
||||
```
|
||||
|
||||
and install the BEC server using
|
||||
2. Install the BEC server
|
||||
|
||||
```{code-block} bash
|
||||
pip install bec-server
|
||||
```
|
||||
3. Start Redis in a new terminal
|
||||
|
||||
Once installed, you can start the server using
|
||||
|
||||
```{code-block} bash
|
||||
redis-server
|
||||
```
|
||||
BEC services are connected via Redis, a message broker sitting at the core of all BEC services.
|
||||
Thus, Redis needs to be started on your system.
|
||||
If the pmodule is loaded (or Redis installed on your system), open a new terminal and start a redis server.
|
||||
Redis will automatically dump data on disk into the file `dump.rdb`, up to a few GB, and should therefore be started in a location with sufficient storage.
|
||||
|
||||
|
||||
4. Start the BEC server
|
||||
|
||||
```{code-block} bash
|
||||
bec-server start
|
||||
```
|
||||
The BEC server will automatically start in a tmux session.
|
||||
More detailed information about Redis and the BEC server can be found in [architecture](#developer.architecture) and [developer install guide](#developer.install_developer_env)
|
||||
|
||||
To install the BEC client, run
|
||||
|
||||
```{code-block} bash
|
||||
pip install bec-ipython-client
|
||||
```
|
||||
|
||||
and start the client using
|
||||
5. Start BEC client
|
||||
|
||||
```{code-block} bash
|
||||
bec
|
||||
```
|
||||
|
||||
You are now ready to load your first device configuration. To this end, please follow the instructions given in the following section.
|
||||
BEC is running now and you would be ready to load your first device configuration.
|
||||
To this end, please follow the instructions given in the section [Device configuration](#user.device_configuration).
|
Loading…
x
Reference in New Issue
Block a user