Skip to content

Commit c9743ae

Browse files
committed
Update documentation for 0.6.0 release.
Signed-off-by: Josh Berkus <[email protected]>
1 parent 4faeb0a commit c9743ae

File tree

10 files changed

+90
-12
lines changed

10 files changed

+90
-12
lines changed

content/en/docs/Administration/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: >
66
Guide for running elections using Elekto.
77
---
88

9-
Administering elections in Elekto is done through pushes of structured files to a GitHub repository. See the [configuration guide]({{< ref "/Configuration" >}}) for how to configure the link to the repository. This guide outlines how the Election Administrators run an individual election. There are three parts to this:
9+
Administering elections in Elekto is done through pushes of structured files to a GitHub repository. See the [configuration guide]({{< ref "/docs/Setup/configuration.md" >}}) for how to configure the link to the repository. This guide outlines how the Election Administrators run an individual election. There are three parts to this:
1010

1111
1. [Creating an election]({{< relref "creating.md" >}})
1212
2. [Running an election]({{< relref "running.md" >}})

content/en/docs/Getting started/_index.md renamed to content/en/docs/Setup/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: "Getting Started"
3-
linkTitle: "Getting Started"
2+
title: "Installation and Setup"
3+
linkTitle: "Installation"
44
weight: 2
55
description: >
66
Start using elekto for your organisation.

content/en/docs/Getting started/configuration.md renamed to content/en/docs/Setup/configuration.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Configuration"
33
linkTitle: "Configuration"
4-
weight: 2
4+
weight: 3
55
description: >
66
Setting up and configuring Elekto for operation
77
---
@@ -86,7 +86,9 @@ Example: `production` or `development`
8686

8787
**APP_KEY**
8888

89-
*Optional* Encryption seed for application cookies. Deprecated; will be set automatically by Elekto in the future, but for now set it to a random 8byte+ value.
89+
*Optional* Encryption seed for application cookies. Most users should leave blank, in which case it will be set automatically as a
90+
random 8-byte key by the startup code. Set manually to an 8-16 character key if you need to run multiple Elekto instances for the
91+
same organization.
9092

9193
Example: `2400229255`
9294

@@ -120,6 +122,12 @@ Example: `localhost`
120122

121123
Example: `http` or `socket`
122124

125+
**MIN_PASSCODE_LENGTH**
126+
127+
*Optional*: Integer. Minimum length for a voter-ballot passphrase in order to deter hacking. Set to 6 if left blank.
128+
129+
Example: `8`
130+
123131
#### Database Connection
124132

125133
**DB_CONNECTION**
File renamed without changes.
File renamed without changes.

content/en/docs/Getting started/kubernetes.md renamed to content/en/docs/Setup/kubernetes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Kubernetes Installation"
33
linkTitle: "Kubernetes Installation"
4-
weight: 2
4+
weight: 4
55
description: >
66
Installing Elekto on Kubernetes
77
---

content/en/docs/Setup/upgrading.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: "Upgrading Elekto"
3+
linkTitle: "Upgrading"
4+
weight: 7
5+
description: >
6+
How to upgrade Elekto
7+
---
8+
9+
# Upgrading
10+
11+
In most cases, you should be able to upgrade Elekto just by replacing the
12+
Python/Flask code or the container image and restarting the service.
13+
The cases where that is not true are documented below.
14+
15+
If you are running Elekto as Python code, you should also update the
16+
dependencies every time you upgrade, as we usually upgrade python library
17+
versions to current ones.
18+
19+
```
20+
pip3 install -r requirements.txt
21+
```
22+
23+
## Upgrading from 0.5 to 0.6
24+
25+
**This Upgrade Requires Extra Steps**
26+
27+
Version 0.6 involves several major changes to the database schema which require
28+
a multi-step database migration. **At this time, this process is only automated
29+
for PostgreSQL**.
30+
31+
**The Elekto Project Recommends Backing Up Your Database Before Upgrading**
32+
33+
For users on PostgreSQL, the process should be as simple as:
34+
35+
1. Shut the Elekto web application down
36+
2. Upgrade Elekto software
37+
3. Run `python console --migrate`
38+
39+
If you are using the official container image, or others built like it, then
40+
the container image should automatically do the above when you delete and replace
41+
the container or pod.
42+
43+
This may fail on PostgreSQL, either because you have modified your database schema
44+
after creation by Elekto, or because the Elekto database user does not have
45+
permissions to modify tables. In either case, you may need to run the
46+
database migration manually. If so, you will need to run the following SQL
47+
statements as the database owner or superuser:
48+
49+
```
50+
CREATE TABLE schema_version ( version INT PRIMARY KEY );
51+
INSERT INTO schema_version VALUES ( 2 );
52+
ALTER TABLE voter ADD COLUMN salt BYTEA, ADD COLUMN ballot_id BYTEA;
53+
CREATE INDEX voter_election_id ON voter(election_id);
54+
ALTER TABLE ballot DROP COLUMN created_at, DROP COLUMN updated_at;
55+
ALTER TABLE ballot DROP CONSTRAINT ballot_pkey;
56+
ALTER TABLE ballot ALTER COLUMN id TYPE CHAR(32) USING to_char(id , 'FM00000000000000000000000000000000');
57+
ALTER TABLE ballot ALTER COLUMN id DROP DEFAULT;
58+
ALTER TABLE ballot ADD CONSTRAINT ballot_pkey PRIMARY KEY ( id );
59+
CREATE INDEX ballot_election_id ON ballot(election_id);
60+
```
61+
62+
We [do not yet have instructions](https://github.com/elekto-io/elekto/issues/67) for upgrading MySQL or SQLite. Those are in development.
63+
If you have an Elekto/MySQL instance, please contact us via Elekto slack channel
64+
on CNCF Slack, or by [commenting on the issue](https://github.com/elekto-io/elekto/issues/67); we would like to work with you on this.
65+
66+
If you do not care about preserving election history, your other option is
67+
to simply delete the old database and create a new, empty one. In that case,
68+
Elekto will generate a new, updated schema through `console --migrate`.

content/en/docs/Voting/_index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ You are allowed to "tie" two candidates, giving them the same number ranking, if
100100

101101
When you have finished ranking candidates, you may optionally enter a passphrase that will allow you to re-cast your vote. This passphrase is used to encrypt the link between your account and your vote, so that the Election Officers are unable to eavesdrop on your specific ballot. If you enter a passphrase, you need to remember it or write it down because it is not retrievable via Elekto. If you know that there is no chance you will want to re-do your ballot before the election is over, then you can leave the passphrase empty.
102102

103-
## Re-Casting Your Vote
103+
## Reviewing and Re-Casting Your Vote
104104

105-
If permitted by your administrator, Elekto allows you to revoke and re-cast your vote for as long as the election is open. This way, you can vote when it opens, and update your vote if you learn new information about candidates. If not permitted, you will not see the Revoke option.
105+
If permitted by your administrator, Elekto allows you to review, revoke and re-cast your vote for as long as the election is open. This way, you can vote when it opens, and update your vote if you learn new information about candidates. If not permitted, you will not see the View option.
106106

107-
![revoke vote interface](revoke.png)
107+
In order to ensure that this doesn't compromise the privacy of your ballot, though, the link between your identity and ballot are encrypted with a passphrase you supplied when you voted (see above). As such, you must enter that passphrase in the field in the election UI in order to review your vote. If you didn't set one, or cannot remember it, you cannot re-cast your vote. Administrators will not be able to help.
108108

109-
In order to ensure that this doesn't compromise the privacy of your ballot, though, the link between your identity and ballot are encrypted with a passphrase you supplied when you voted (see above). As such, you must enter that passphrase in the field in the election UI in order to revoke your vote. If you didn't set one, or cannot remember it, you cannot re-cast your vote. Administrators will not be able to help.
109+
If you enter your passphrase, and click "View", and you will be presented with a read-only view of your ballot. You can then check if the ballot still matches how you wish to vote.
110110

111-
If you enter your passphrase, and click "Revoke", your original ballot will be deleted. You can then select "vote" in order to cast your ballot again.
111+
If it does not, you can revoke your ballot from the View screen. Simply enter your passphrase again, and then press "Revoke". Your original ballot will be deleted. You can then select "vote" in order to cast your ballot again. Note that, if you revoke your ballot and do not vote again, you are canceling your vote in that election.
112112

113113
## Checking the Results
114114

content/en/docs/Voting/revoke.png

-70.7 KB
Binary file not shown.

content/en/docs/_index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ Elekto was designed to support the following:
1818
- Preference election voting (starting with Condorcet)
1919
- Multiple elections for the same organization
2020
- Responsive web design
21-
- Secret ballot voting
21+
- Secret ballot voting
22+
23+
This set of documentation covers Elekto version 0.6.X.

0 commit comments

Comments
 (0)