From c1753a2fa7914234f13fef5e013f7324ecea4f1d Mon Sep 17 00:00:00 2001 From: JORGE SASIAIN <jorge.sasiain@ehu.eus> Date: Mon, 17 Apr 2023 08:48:18 +0000 Subject: [PATCH] Update README.md --- README.md | 79 ++++++++++++++++++------------------------------------- 1 file changed, 25 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index 909a22cd..af580f00 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,36 @@ -# Modeling of Trunk service in WFO +## Environment and dependencies -This is a dummy implementation of a trunk service in workflow orchestrator. The "pieces" of the trunk service are mapped to Products. The parameters of the trunk service are modelled as Resource Types. - -## Quickstart - -- Follow Steps 1 and 2 from here: https://workfloworchestrator.org/orchestrator-core/workshops/beginner/debian/ +- Install python 3.10 if you don't have it already: + - ``add-apt-repository ppa:deadsnakes/ppa`` + - ``apt install python3.10 python3.10-distutils`` +- Follow Steps 1 and 2 from here to install dependencies and setup DB: https://workfloworchestrator.org/orchestrator-core/workshops/beginner/debian/ - To install the orchestrator GUI, you can follow the steps 5 and 6 from the above link. -- Clone this repo: -- ``pip install -r requirements.txt`` -- from the top-level directory: +- Create a virtualenv: + - ``source /usr/share/virtualenvwrapper/virtualenvwrapper.sh`` + - ``mkvirtualenv --python python3.10 gso`` +- To use the virtualenv: + - `source /usr/share/virtualenvwrapper/virtualenvwrapper.sh` + - `workon gso` + +## Install + +Do all of this inside the virtualenv. +- Clone this repo and ``cd`` into it +- ``pip install -r requirements.txt`` + - If you get an error because you pip version is too old, run this: `curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10` - ``pip install -e .`` -- Create ``oss-params.json`` -- Export the oss-params file: ``export OSS_PARAMS_FILENAME="/path/to/file.json"`` +- `cd` into `gso` directory and create ``oss-params.json`` based on the ``oss-params-example.json`` file. +- Export the oss-params file: ``export OSS_PARAMS_FILENAME="/path/to/oss-params.json"`` +- Upgrade DB to latest revision: `PYTHONPATH=. python main.py db upgrade heads` + +## Run + - The core of workflow orchestrator can be started with ``uvicorn --host 0.0.0.0 --port 8080 main:app`` from inside the ``gso`` directory of this repo. - The GUI can be started with ``yarn start``. -## Structure description - -### Products & fixed inputs -- Trunk - - Reference to PB Trunk -- TrunkConfig - - Reference to PB TrunkConfig -- TrunkConfigCommon - - Reference to PB TrunkConfigCommon -- TrunkConfigSide - - Reference to PB TrunkConfigSide -### Product blocks & resource types -- Trunk - - Id - - GeantSSid - - Name -- TrunkConfig - - Id - - Reference to PB Trunk -- TrunkConfigCommon - - Id - - Speed - - IsLeasedLine - - IsIsMetric - - MinimumLinks - - Reference to PB TrunkConfig -- TrunkConfigSide - - Id - - Name - - AEName - - GeantASid - - IPv4Address - - IPv6Address - - Members - - Reference to PB TrunkConfig - -### Workflows -- Workflows included are CREATE and TERMINATE for: - - Trunk - - TrunkConfig - - TrunkConfigCommon - - TrunkConfigSide - ## Useful WFO Resources + - WFO API (Swagger): https://workfloworchestrator.org/orchestrator-core/architecture/application/api/ - WFO API (repo): https://github.com/workfloworchestrator/orchestrator-core/tree/main/orchestrator/api/api_v1/endpoints - Carolina notes: -- GitLab