23 | | You can use [wiki:TracAdmin trac-admin] to configure |
24 | | [http://trac.edgewall.org/ Trac] to better fit your project, especially in |
25 | | regard to ''components'', ''versions'' and ''milestones''. |
| 12 | The only difference is that in this server, instead of java-based parties inside a jar file, you plug in python-based parties inside a tar.gz file. |
| 13 | |
| 14 | == Installation == |
| 15 | * Have python **3.8 or 3.9** installed on your machine, for use with the pythonpartiesserver. |
| 16 | * Install your apache-tomcat 8 installation https://tomcat.apache.org/download-80.cgi. You can re-use an existing installation. |
| 17 | * Download the parties server war file from [http://artifactory.ewi.tudelft.nl/artifactory/webapp/#/artifacts/browse/tree/General/libs-release-local/geniusweb/pypartiesserver the artifactory]. Go into the latest version of the pypartiesserver and download (right click) the war file. NOTICE: your browser must have cookies enabled to access the artifactory. |
| 18 | * Copy the downloaded war file into the tomcat webapps directory |
| 19 | * Set the environment variable PYTHON3EXE to point to python 3.8 or 3.9 (the python application you installed). |
| 20 | * (Re)start tomcat |
| 21 | |
| 22 | Now your local pypartiesserver should be up and running. |
| 23 | |
| 24 | == Upgrade |
| 25 | To upgrade, |
| 26 | * Stop tomcat |
| 27 | * remove the old war file plus the unzipped version (if exists) from the tomcat webapps directory |
| 28 | * repeat the installation as above |
40 | | For a complete list of local wiki pages, see TitleIndex. |
| 40 | To change a profile or add a new party, |
| 41 | |
| 42 | * Make sure the profiles server has been run (apache will unzip the war file) |
| 43 | * Locate the unzipped pypartiesserver folder inside your tomcat webapps directory |
| 44 | * locate the partiesrepo directory inside that folder. This folder contains all current parties |
| 45 | * Copy your new version of a party.tar.gz over an existing one. Or copy a new party.tar.gz into this folder. |
| 46 | * The parties should now show up in the "list of party files" on the server webpage. Make sure you force refresh the page as some browsers show only old cached data. |
| 47 | * If the file is visible in that list, but does not show up in list of "currently runnable parties" then the tar.gz does not contain a valid party. Check the apache tomcat logs to see why the tar.gz has been rejected. |
| 48 | |
| 49 | |
| 50 | |
| 51 | = Log file |
| 52 | The log file name can be set by the party in its constructor. If it uses the default (None), |
| 53 | then the party class name is used as log filename, and {{{.log}}} as extension. |
| 54 | |
| 55 | The {{{.log}}} file is in the directory where you start the server |
| 56 | If you run from tomcat, it often is in the Eclipse application directory, eg in {{{Eclipse2020EE.app/Contents/MacOS}}}; if you manually start it, in the directory where you executed the startup.sh command; etc. |
| 57 | |
| 58 | = Debugging |
| 59 | Debugging on the server is complicated because python programs are run as native processes, and thus are not directly controlled by your IDE. We recommend debugging directly in [https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPython#Debugging GeniusWebPython]. If you really need to debug on the server, you may try [https://coderwall.com/p/ttbtgq/python-remote-debugging-with-pdb remote debugging with pdb], |
| 60 | [http://charmyin.github.io/python/2014/11/09/debugger-python-remotely/ remote debugging eclipse] or [https://docs.microsoft.com/en-us/visualstudio/python/debugging-python-code-on-remote-linux-machines?view=vs-2019 remote debug visual studio]. |
| 61 | |
| 62 | = Communication protocol |
| 63 | For the communication protocol of partiesservers, please refer to [https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPartiesServer/wiki/WikiStart#Communicationprotocol GeniusWebPartiesServer documentation] |
| 64 | |
| 65 | = Source code |
| 66 | You can download the source repository of the implementation. Note that you don't need this if you just want to use the parties server to host your parties or to compile parties. |
| 67 | |
| 68 | {{{svn co https://tracinsy.ewi.tudelft.nl/pub/svn/GeniusWebPythonPartiesServer}}} |
| 69 | |
| 70 | Since this is a tomcat web application, you need Eclipse Enterprise edition if you want to run this from Eclipse. Also, to checkout from Eclipse, you need to prepare Eclipse for this. Check https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWeb/wiki/WikiStart |
| 71 | |
| 72 | It is maven based so you only need maven to compile the code. |
| 73 | |