From dbcb53e5e96a75eaf8939e84a23f3905f82434f9 Mon Sep 17 00:00:00 2001 From: Michael Kaiser Date: Sun, 18 Feb 2024 13:49:24 +0100 Subject: [PATCH] updating installation documentation --- doc/Installation.md | 65 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/doc/Installation.md b/doc/Installation.md index 1883352..712c657 100644 --- a/doc/Installation.md +++ b/doc/Installation.md @@ -18,9 +18,9 @@ apt-get install -y pip pip install -r requirements.txt ``` # Backend -Running the gunicorn wsgi: +Running the backend API after Installtion of the package. ``` -gunicorn -w 4 codeGrader.backend.api.app:app +cgApiBackend ``` ## Python Packages ``` @@ -59,4 +59,63 @@ The installation of the lxc packages can be verified with the lxc-ls /etc/apt/sources.list.d/pgdg.list' +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - +apt-get update +apt-get install postgresql-15 +``` +``` +createuser --username=postgres --pwprompt codeGrader +createdb --username=postgres --owner=codeGrader codeGraderDB +psql --username=postgres --dbname=codeGraderDB --command='CREATE ROLE codeGrader' +psql --username=postgres --dbname=codeGraderDB --command='GRANT codegrader TO "codeGrader"' +psql --username=postgres --dbname=codeGraderDB --command='ALTER SCHEMA public OWNER TO codeGrader' +psql --username=postgres --dbname=codeGraderDB --command='GRANT SELECT ON pg_largeobject TO codeGrader' + +``` +Then proceed with to clone and install the software itself: + +``` +cd /opt +rm -r /opt/CodeGrader +git clone https://github.com/ooemperor/CodeGrader.git +cd CodeGrader +pip install -r ./codeGrader/frontend/requirements.txt +pip install -r ./codeGrader/backend/requirements.txt +cd /opt/CodeGrader +mv setup_full.py setup.py +pip install . +``` + +Then create a new admin User and an api key with: +``` +cgAddApiToken + +cgAddAdmin -u -fn -ln -e -p +``` + + + +After this part is done, please place the Config Files at "/etc/codeGrader" and adapt the values in it according to your installation (ApiToken, Database Credentials and IP Adresses). + + +When this is done you can then startup all the services with: +``` +nohup cgApiBackend & +nohup cgEvaluationService & +nohup cgExecutionService & +nohup cgUserFrontend & +nohup cgAdminFrontend & +```