Initial commit
All checks were successful
Ansible Playbook lint / ansible-lint (push) Successful in 35s

This commit is contained in:
2024-12-19 10:25:37 +08:00
commit bf6ac11888
28 changed files with 742 additions and 0 deletions

View File

@@ -0,0 +1,193 @@
{
"_help": "There is no way to put comments in a JSON file; the",
"_help": "fields starting with '_' are meant to be comments.",
"_section": "System-wide configuration",
"temp_dir": "/tmp",
"_help": "Whether to have a backdoor (see doc for the risks).",
"backdoor": false,
"_help": "The user/group that CMS will be run as.",
"cmsuser": "cmsuser",
"_section": "AsyncLibrary",
"core_services":
{
"LogService": [["localhost", 29000]],
"ResourceService": [["localhost", 28000]],
"ScoringService": [["localhost", 28500]],
"Checker": [["localhost", 22000]],
"EvaluationService": [["localhost", 25000]],
"Worker": [["localhost", 26000],
["localhost", 26001],
["localhost", 26002],
["localhost", 26003],
["localhost", 26004],
["localhost", 26005],
["localhost", 26006],
["localhost", 26007],
["localhost", 26008],
["localhost", 26009],
["localhost", 26010],
["localhost", 26011],
["localhost", 26012],
["localhost", 26013],
["localhost", 26014],
["localhost", 26015]],
"ContestWebServer": [["localhost", 21000]],
"AdminWebServer": [["localhost", 21100]],
"ProxyService": [["localhost", 28600]],
"PrintingService": [["localhost", 25123]]
},
"other_services":
{
"TestFileCacher": [["localhost", 27501]]
},
"_section": "Database",
"_help": "Connection string for the database.",
"database": "postgresql+psycopg2://cmsuser:{{ password }}@localhost:5432/cmsdb",
"_help": "Whether SQLAlchemy prints DB queries on stdout.",
"database_debug": false,
"_help": "Whether to use two-phase commit.",
"twophase_commit": false,
"_section": "Worker",
"_help": "Don't delete the sandbox directory under /tmp/ when they",
"_help": "are not needed anymore. Warning: this can easily eat GB",
"_help": "of space very soon.",
"keep_sandbox": false,
"_section": "Sandbox",
"_help": "Do not allow contestants' solutions to write files bigger",
"_help": "than this size (expressed in KB; defaults to 1 GB).",
"max_file_size": 1048576,
"_section": "WebServers",
"_help": "This key is used to encode information that can be seen",
"_help": "by the user, namely cookies and auto-incremented",
"_help": "numbers. It should be changed for each",
"_help": "contest. Particularly, you should not use this example",
"_help": "for other than testing. It must be a 16 bytes long",
"_help": "hexadecimal number. You can easily create a key calling:",
"_help": "python -c 'from cmscommon import crypto; print(crypto.get_hex_random_key())'",
"secret_key": "8e045a51e4b102ea803c06f92841a1fb",
"_help": "Whether Tornado prints debug information on stdout.",
"tornado_debug": false,
"_section": "ContestWebServer",
"_help": "Listening HTTP addresses and ports for the CWSs listed above",
"_help": "in core_services. If you access them through a proxy (acting",
"_help": "as a load balancer) running on the same host you could put",
"_help": "127.0.0.1 here for additional security.",
"contest_listen_address": [""],
"contest_listen_port": [8888],
"_help": "Login cookie duration in seconds. The duration is refreshed",
"_help": "on every manual request.",
"cookie_duration": 10800,
"_help": "If CWSs write submissions to disk before storing them in",
"_help": "the DB, and where to save them. %s = DATA_DIR.",
"submit_local_copy": true,
"submit_local_copy_path": "%s/submissions/",
"_help": "The number of proxies that will be crossed before CWSs get",
"_help": "the request. This is used to decide whether to assume that",
"_help": "the real source IP address is the one listed in the request",
"_help": "headers or not. For example, if you're using nginx as a load",
"_help": "balancer, you will likely want to set this value to 1.",
"num_proxies_used": 0,
"_help": "Maximum size of a submission in bytes. If you use a proxy",
"_help": "and set these sizes to large values remember to change",
"_help": "client_max_body_size in nginx.conf too.",
"max_submission_length": 100000,
"max_input_length": 5000000,
"_help": "STL documentation path in the system (exposed in CWS).",
"stl_path": "/usr/share/cppreference/doc/html/",
"_section": "AdminWebServer",
"_help": "Listening HTTP address and port for the AWS. If you access",
"_help": "it through a proxy running on the same host you could put",
"_help": "127.0.0.1 here for additional security.",
"admin_listen_address": "",
"admin_listen_port": 8889,
"_help": "Login cookie duration for admins in seconds.",
"_help": "The duration is refreshed on every manual request.",
"admin_cookie_duration": 36000,
"_help": "The number of proxies that will be crossed before AWS gets",
"_help": "the request. This is used to determine the request's real",
"_help": "source IP address. For example, if you're using nginx as",
"_help": "a proxy, you will likely want to set this value to 1.",
"admin_num_proxies_used": 0,
"_section": "ScoringService",
"_help": "List of URLs (with embedded username and password) of the",
"_help": "RWSs where the scores are to be sent. Don't include the",
"_help": "load balancing proxy (if any), just the backends. If any",
"_help": "of them uses HTTPS specify a file with the certificates",
"_help": "you trust.",
"rankings": ["http://{{ username }}:{{ password }}@localhost:8890/"],
"https_certfile": null,
"_section": "PrintingService",
"_help": "Maximum size of a print job in bytes.",
"max_print_length": 10000000,
"_help": "Printer name (can be found out using 'lpstat -p';",
"_help": "if null, printing is disabled)",
"printer": null,
"_help": "Output paper size (probably A4 or Letter)",
"paper_size": "A4",
"_help": "Maximum number of pages a user can print per print job",
"_help": "(excluding the title page). Text files are cropped to this",
"_help": "length. Too long pdf files are rejected.",
"max_pages_per_job": 10,
"max_jobs_per_user": 10,
"pdf_printing_allowed": false,
"_help": "This is the end of this file."
}

View File

@@ -0,0 +1,16 @@
{
"_help": "There is no way to put comments in a JSON file; the",
"_help": "fields starting with '_' are meant to be comments.",
"_help": "Listening address for RankingWebServer.",
"bind_address": "",
"_help": "Listening port for RankingWebServer.",
"http_port": 8890,
"_help": "Login information for adding and editing data.",
"username": "{{ username }}",
"password": "{{ password }}",
"_help": "This is the end of this file."
}