# 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 `-admin.` on port 80. - You can start / enable `cms@.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 .`. ### 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.