Skip to content
Snippets Groups Projects
Select Git revision
  • c1753a2fa7914234f13fef5e013f7324ecea4f1d
  • develop default protected
  • feature/NAT-1574-add-moodi-for-ixs
  • feature/update-prefix-list-validation
  • master protected
  • authorship-fix-from-develop
  • 1048-service-config-backfilling
  • feature/nat-1211-edgeport-lacp-xmit
  • fix/nat-1120-sdp-validation
  • NAT-1154-import-edge-port-update
  • fix/l3-imports
  • feature/10GGBS-NAT-980
  • fix/NAT-1009/fix-redeploy-base-config-if-there-is-a-vprn
  • 4.11
  • 4.10
  • 4.8
  • 4.5
  • 4.4
  • 4.3
  • 4.2
  • 4.1
  • 4.0
  • 3.12
  • 3.11
  • 3.10
  • 3.9
  • 3.8
  • 3.7
  • 3.6
  • 3.5
  • 3.4
  • 3.3
  • 3.2
33 results

geant-service-orchestrator

JORGE SASIAIN's avatar
JORGE SASIAIN authored
c1753a2f
History

Environment and dependencies

  • 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.
  • 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 .
  • 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.

Useful WFO Resources

API examples

Note: update IP address in the request to your own where you're running WFO.

Creating subscriptions (look at initial_input_form_generator method of the workflow to find what properties need to be passed in the data of the POST request)

Create process that produces a new subscription (CREATE workflow)

curl -X POST -H "Content-Type: application/json" http://10.98.1.62:8080/api/processes/create_trunk --data '[{"product": "321045fc-21ec-476b-b67b-5f211e47c3d7"},{"trunk_name": "mytrunkfromapi", "geant_s_sid": "a1b2c3"}]'

Create process that manipulates the state of a subscription (TERMINATE workflow)

curl -X POST -H "Content-Type: application/json" http://10.98.1.62:8080/api/processes/terminate_trunk --data '[{"subscription_id": "910e7044-c427-46d1-afc3-7817e221d45d"}, {"are_you_sure": "yes"}]'

Deleting subscriptions (not the same as running a TERMINATE workflow for a subscription, but to actually erase it from the WFO database)

Delete a subscription:

curl -X 'DELETE' 'http://10.98.1.62:8080/api/subscriptions/3f16532b-0a48-4fe3-802a-36b3f54eed0e'

To do the above, you first have to delete the processes first:

curl -X 'DELETE' 'http://10.98.1.62:8080/api/processes/7447a3e9-7c58-4ae7-8804-c0a75c39c924'