Bare-Metal Deployment Guide
This guide provides instructions for deploying a bare-metal WEI workcell. It assumes that you are deploying an existing WEI-powered workcell. For resources on creating a new workcell, see How to develop a new WEI-powered Workcell.
Installing the WEI Python Package
Note on platforms: WEI is primarily developed for and tested on Linux. While we have tried to write it to be platform-agnostic, we do not target or test natively on Windows or Mac. If you are using Windows, one options is using the Windows Subsystem for Linux (WSL).
Installing from PyPi
The easiest way to install WEI is to use pip. You can install WEI by running the following command:
pip install ad_sdl.wei
This will install the latest version of WEI from the Python Package Index (PyPi). For more details or to see specific versions available, see the ad_sdl.wei page on PyPi.
Installing from Source
Alternatively, you can install WEI from source. To do so, consult the Install Instructions in the README.md.
Running the WEI Server
The WEI server provides the API for controlling and communicating with the workcell. To start the server, run the following command:
python -m wei.server --workcell <path/to/workcell.yaml>
This will start the server and load the workcell configuration from the specified YAML file. The server will listen for incoming connections on port 8000 by default.
Running the WEI Engine
Note
As of version 0.6.3, the WEI engine is automatically started as part of the WEI server by default. If you do still want to start the engine separately, you can do so using the following instructions.
The WEI engine is responsible for the scheduling and execution of workflows and other scheduled operations on the workcell. To start the engine, run the following command:
python -m wei.engine --workcell <path/to/workcell.yaml>
This will start the engine and load the workcell configuration from the specified YAML file. The engine will begin scheduling and executing workflows and other operations as they are queued via the WEI Server.
To run the engine separately, make sure you run the server with the --autostart_engine
flag set to False
:
python -m wei.server --workcell <path/to/workcell.yaml> --autostart_engine False
Running Redis
WEI uses Redis to store state and act as a message broker for communication from the server to the engine. You will need to have Redis installed and running in order to use WEI. You can install Redis by following the instructions on the Redis website.
Configuring the Workcell
There are two methods for configuring the WEI Engine and Server that work in tandem: the workcell YAML file, and command line arguments. The workcell YAML file is the primary method for configuring the workcell, and the command line arguments are used to override the configuration in the workcell YAML file or default values not set in the workcell configuration file.
The only required argument for the WEI Engine and Server is the path to the workcell YAML file.
For a complete breakdown of configuration options, see wei.types.workcell_types.WorkcellConfig
.