=================== Running an Election =================== :Author: Toshio Kuratomi :Date: 20 Apr 2008 This is a bit more manual than I'd like it to be but it's not too hard. ---------- Setting up ---------- Information needed ================== * Title of election * Number of seats to fill. * Start and end dates (UTC) * FAS Groups that can vote in the election * FAS usernames for the candidates. Steps ===== 1) Checkout the fedora-vote module from cvs and edit newelection.py. 2) Fill in the electionName variable with the title of the election. 3) Fill in the seats variable with the number of seats to fill. 4) Fill the start variable with the timestamp for the starting date. 5) Fill the end variable with the timestamp for the ending date. 6) Fill in the votingGroups tuple with the FAS groups that can vote in the election. 7) Fill the candidates tuple with the FAS usernames that are up for election. I usually put their realname in a comment followed by their FAS account name but that's just because I'm anal :-) 8) Run the script on a machine that has network access to db2.fedora.phx.redhat.com, the fedora account system module checked out somewhere with the website module, the pgdb module, and the /etc/sysconfig/fedora-db-access file (to enable the website module to work). The script will ask you to confirm that the users and groups were correctly pulled from the database and then will insert the records into the elections database to make things work. 9) Edit vote.cgi and castvote.cgi. Set the electionName variable to the title of the election. 10) Copy the updated vote.cgi and castvote.cgi to the voting directory on the app servers:: scp vote.cgi castvote.cgi app1:/var/www/html/admin/voting/ scp vote.cgi castvote.cgi app2:/var/www/html/admin/voting/ Notes ===== In the past I have setup the election with an earlier date for people to test it out first. If you do this it's important to remember all the steps to take when making the database ready for the real election: 1) update election set start_date = 'ACTUAL DATE', end_date = 'ACTUAL DATE' where id = ELECTIONID; 2) delete from ballots where election_id = ELECTIONID; 3) delete from votes where election_id = ELECTIONID; ---------------------- Getting the Tallysheet ---------------------- There is currently no web interface to this. You have to log in to the db and view the tallysheet:: psql -h db2 -U electionsuser elections Password: elections=> select * from tallysheet where election_id = 2; vote_count | id | election_id ------------+--------+------------- 35 | 100307 | 2 27 | 100263 | 2 26 | 100443 | 2 20 | 100290 | 2 19 | 100393 | 2 19 | 100189 | 2 19 | 100406 | 2 12 | 100516 | 2 11 | 100386 | 2 9 | 100815 | 2 6 | 100435 | 2 Then you have to connect to the Fedora Account System and lookup the user ids for the winners to find out their names.