All checks were successful
Ansible Playbook lint / ansible-lint (push) Successful in 16s
48 lines
1.2 KiB
Markdown
48 lines
1.2 KiB
Markdown
# Ansible Playbook for CMS - Contest Management System
|
|
|
|
## Installation
|
|
|
|
- Works on ArchLinux with systemd-boot.
|
|
- Just run `ansible-playbook playbooks/install.yml`.
|
|
|
|
## Configure CMS Contests
|
|
|
|
- Run `sudo -iu cmsuser` to login cmsuser.
|
|
- Run `cmsAddAdmin kcw` to create admin user.
|
|
- Run `cmsAdminWebServer` to open a temporary admin webserver.
|
|
- which opens on port 8889 or `<dns_prefix>-admin.<dns_suffix>` on port 80.
|
|
- You can start / enable `cms@<contest id>.service` after contest setup.
|
|
|
|
## Configure group vars secret
|
|
|
|
```yaml
|
|
# group_vars/cms/secret.yml
|
|
---
|
|
username: cmsuser
|
|
password: example_p4ssword
|
|
dns_prefix: cms-test
|
|
dns_suffix: example.com
|
|
```
|
|
|
|
## Import Users
|
|
|
|
- Create a username / password mapping in `/srv/cms/passwd`. \
|
|
e.g.
|
|
```
|
|
111550087 ThisIsARandomPassword
|
|
```
|
|
- Run `./users.bash` to generate `contest.yaml`.
|
|
- Run `cmsImportUser -A -c <contest id> .`.
|
|
|
|
### Delete all users from contest
|
|
|
|
Since you can't import users if they were already in the database. \
|
|
You'll need to delete them manually before import.
|
|
|
|
- Run `cut -d' ' -f1 passwd | xargs cmsRemoverUser`
|
|
|
|
## Import Tasks
|
|
|
|
- Put polygon zips in `/tmp/kcw*-.zip`.
|
|
- Run `./import.bash` and wait.
|