[contestms] Re: Using cmsPracticeWebServer

  • From: Luca Versari <veluca93@xxxxxxxxx>
  • To: contestms@xxxxxxxxxxxxx
  • Date: Sun, 8 Jan 2017 08:05:52 +0100

Now that I think about it, the instructions in the master branch forget to
mention to run make before running setup.py (as in the develop branch)...

On Jan 8, 2017 3:08 AM, "Agustín Santiago Gutiérrez" <elsantodel90@xxxxxxxxx>
wrote:

Thank you very much for your fast respose Luca!

Unfortunately, after trying for a while, this other project seems harder
to get running than the previous one oii-web.

I am using the master branch for now. All the steps that I have carried
out so far are:

pip install --upgrade pip
pip install -r requirements.txt [Both for the
https://github.com/algorithm-ninja/cmsocial project and the cms project
that it downloads from git when installing requirements|
python setup.py build
python setup.py install [This adds the cmsPracticeWebServer command]
Create a database as explained in http://cms.readthedocs.io/en/
v1.2/Running%20CMS.html:
    sudo su - postgres
    createuser oia-juez-user -P
    createdb -O oia-juez-user oia-juez-db
    psql oia-juez-db -c 'ALTER SCHEMA public OWNER TO "oia-juez-user"'
    psql oia-juez-db -c 'GRANT SELECT ON pg_largeobject TO "oia-juez-user"'
Initialize said database:
    cmsInitDB
    python2 -c "import cmsocial.db; from cms.db import metadata;
metadata.create_all()"
    psql oia-juez-user -h 127.0.0.1 -d oia-juez-db < create_triggers.sql
Create an admin:
    cmsAddAdmin -p password name

So far, it would seem like all of these steps worked.

All cms services seem to start allright when started individually, but the
cmsPracticeWebServer gives a completely generic 404 page, unlike when using
oii-web, which put the site up on the first try. Maybe it is not supposed
to just work like that like the previous version did?

Again, thanks a lot for your fast response.

Agustín


2017-01-07 20:38 GMT-03:00 Luca Versari <veluca93@xxxxxxxxx>:



2017-01-08 0:29 GMT+01:00 Agustín Santiago Gutiérrez <
elsantodel90@xxxxxxxxx>:

Hi,

I am not writing about the main CMS system per se, but instead I am
interested in the "oii-web" variant, as used in https://cms.di.unipi.it.
In the event that this is not the right mailing list, please let me know.

I wouldn't say this is the right mailing list, but as far as I know there
isn't a right one - I think the best way would be to create an issue on
github so far...
Anyway, "oii-web" is the legacy version of that project - you can find
the latest one here https://github.com/algorithm-ninja/cmsocial. There
is some (really minor) documentation in the readme file. In the branch
"develop" you can find the latest changes, with some extra documentation.


We are planning to use such a system for our national olympiad, since it
seems to already implement most of the features we are interested in and
relies heavily on cms, which is already our preferred contest manager. We
will probably translate to Spanish and possibly make very minor tweaks but
would otherwise use most of the project just as it is.

That's really good :)


Is there by any chance any installation and use documentation as there
is for the main cms at https://cms.readthedocs.io/en/v1.2/index.html? I
have not found any so far, apart from the paper which describes the system
from a fairly general perspective.

I have successfully created an empty database and started
cmsPracticeWebServer (it seems to use the ContestWebServer port from config
file, since that service is not used in an online judge), which seems to be
the service that implements this new nice online-judge functionality.
Operating on this empty database, things seem to work without errors, but I
am not able to sign up with a new user because the "Region" field cannot be
left blank, but the drop-down list is empty. I guess region data must be
entered somehow into the database by an administrator. How is that done?

You should use the new version, if I remember well it won't ask for a
region anymore.



That leads me to another question. Will contests (and problems) in the
database be used automatically and shown by cmsPracticeWebServer? For
example if I create new contests with adminWebServer, or if I import them
with importers.

In the master branch, all tasks from contest with id 1 will be used.
Branch develop supports multiple contests running on a /contest_name/
prefix.


Also: Which cms services must be up for the online judge to work
properly? I don't really know right now but I'm imagining they will be:

"Optionals"
LogService [just for logging]
ResourceService [just to start and keep services up, as usual]
Checker [just to ping services for resource service to restart them]
AdminWebServer [for an admin to operate directly on the database]
TestFileCacher [not sure exactly if optional or very important]

"Essentials"
ScoringService
EvaluationService
Worker
PracticeWebServer

Not necessary at all:
ProxyService
PrintingService
RankingWebServer

Should be about right. I don't remember ever using TestFileCacher, so I
don't know what it should do - it is surely not really important :)



Please correct me if this understanding is mistaken.

Also, while it is our last priority right now, any useful information or
tip on localization of this system will eventually be useful at a later
point.

Localization should be entirely doable in the cmsocial
<https://github.com/algorithm-ninja/cmsocial/tree/develop>/cmsocial-web
<https://github.com/algorithm-ninja/cmsocial/tree/develop/cmsocial-web>/
scripts
<https://github.com/algorithm-ninja/cmsocial/tree/develop/cmsocial-web/scripts>
/*l10n.js* file.


Thank you very much for providing all these useful tools to the
community.

Agustín

Luca




Other related posts: