diff --git a/build-docs.sh b/build-docs.sh index e7c1a5fb1d9ac0fa5646cf6a4d4a345536947001..11e71f819edb71ca3ec033ecc9bda9f65d80cc14 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -1,4 +1,4 @@ -pip install sphinx_rtd_theme myst-parser +pip install sphinx_rtd_theme myst-parser sphinxcontrib-jquery cd docs || exit 1 sphinx-build source build diff --git a/docs/source/quickstart.md b/docs/source/quickstart.md deleted file mode 100644 index 75921374869c27bd07ec2363ac4609eddf64bba7..0000000000000000000000000000000000000000 --- a/docs/source/quickstart.md +++ /dev/null @@ -1,62 +0,0 @@ -# Quickstart - -## Development 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 previous link. -- Create a virtual environment: - - ``source /usr/share/virtualenvwrapper/virtualenvwrapper.sh`` - - ``mkvirtualenv --python python3.10 gso`` -- To use the virtual environment: - - `source /usr/share/virtualenvwrapper/virtualenvwrapper.sh` - - `workon gso` - -## Installation - -Do all this inside the virtual environment. -- Clone this repository 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 - -- Start the workflow orchestrator core with ``uvicorn --host 0.0.0.0 --port 8080 main:app`` from inside the ``gso`` directory of this repository. -- Start the GUI with ``yarn start``. - - -## Useful workflow orchestrator resources - -- WFO API (Swagger): <https://workfloworchestrator.org/orchestrator-core/architecture/application/api/> -- WFO API (repository): <https://github.com/workfloworchestrator/orchestrator-core/tree/main/orchestrator/api/api_v1/endpoints> -- Carolina's notes: <https://wiki.geant.org/pages/viewpage.action?pageId=562921625> - -### API examples - -*Note: update IP address in the request to your own where you're running WFO.* - -**Creating subscriptions** (look at the `initial_input_form_generator` method of the workflow to find what properties need to be in the body 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) - -To do this, you first have to delete the processes first: - -``curl -X 'DELETE' 'http://10.98.1.62:8080/api/processes/7447a3e9-7c58-4ae7-8804-c0a75c39c924'`` - -Delete a subscription: - -``curl -X 'DELETE' 'http://10.98.1.62:8080/api/subscriptions/3f16532b-0a48-4fe3-802a-36b3f54eed0e'`` diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst new file mode 100644 index 0000000000000000000000000000000000000000..5b6c8ac2d9c996876ab0bf5aa6723450b2d7e0b1 --- /dev/null +++ b/docs/source/quickstart.rst @@ -0,0 +1,47 @@ +Quickstart +========== + +Development 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 previous link. +- Create a virtual environment: + - ``source /usr/share/virtualenvwrapper/virtualenvwrapper.sh`` + - ``mkvirtualenv --python python3.10 gso`` +- To use the virtual environment: + - ``source /usr/share/virtualenvwrapper/virtualenvwrapper.sh`` + - ``workon gso`` + +Installation +------------ + +Do all this inside the virtual environment. + +- Clone this repository +- ``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 an ``oss-params.json`` based on the ``oss-params-example.json`` file inside ``/gso``. +- 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 +--- + +- Start the workflow orchestrator core with ``uvicorn --host 0.0.0.0 --port 8080 main:app`` from inside the ``gso`` + directory of this repository. +- Start the GUI with ``yarn start``. + + +Useful workflow orchestrator resources +-------------------------------------- + +- WFO API (Swagger): `<https://workfloworchestrator.org/orchestrator-core/architecture/application/api/>`_ +- WFO API (repository): + `<https://github.com/workfloworchestrator/orchestrator-core/tree/main/orchestrator/api/api_v1/endpoints>`_