Skip to content

Commit 8695eb1

Browse files
committed
Corrections per Nate W.
Signed-off-by: Josh Berkus <josh@agliodbs.com>
1 parent d0ef432 commit 8695eb1

File tree

4 files changed

+35
-40
lines changed

4 files changed

+35
-40
lines changed

content/en/docs/Getting started/_index.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ description: >
66
Start using elekto for your organisation.
77
---
88

9-
Elekto is a DIY service, so in order to start using it, you're going to have to install it.
10-
11-
Please see the following guides:
12-
13-
Ways to install Elekto, any of:
9+
Elekto is a DIY service, so in order to start using it, you're going to have to install it:
1410

1511
* [Developer Installation]({{< relref "devinstall.md" >}})
1612
* [Server Installation]({{< relref "installation.md" >}})

content/en/docs/Getting started/configuration.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@ Currently, the only Oauth provider offered is GitHub. Contributions of addition
2828

2929
#### GitHub Oauth
3030

31-
You must set up an "Oauth Application" that Elekto can use. In GitHub, this is under Settings-->Developer Tools-->Oauth Applications. Note that Oauth Apps are belong to *accounts* rather than organizations, so you'll want to set up an account with shared access in your infra team. We also recommend setting up a separate Oauth App for Elekto rather than re-using one created for other purposes, and giving each Elekto instance its own secret key.
31+
You must set up an "Oauth Application" that Elekto can use. In GitHub, this is under Settings-->Developer Tools-->Oauth Applications. Note that Oauth Apps are belong to *accounts* rather than organizations, so you'll want to set up an account with shared access in your infra team. We also recommend setting up a separate Oauth App for Elekto rather than re-using ones created for other purposes, and giving each Elekto instance its own secret key.
3232

3333
The Oauth App must have the following settings:
3434

3535
* Application Name: whatever you've named your Elekto instance
3636
* Homepage URL: the url of your Elekto instance
37-
* Authorization Callback URL: https://your.elekto.domain/oauth/github/callback (note that this can be changed in ENV)
37+
* Authorization Callback URL: `https://your.elekto.domain/oauth/github/callback` (note that this can be changed in ENV)
3838

3939
Once you create the Oauth App, GitHub will create a ClientID for it, which you populate in GITHUB_CLIENT_ID in ENV. You then create a new Oauth secret under the app and copy the value for that, and that gets populated in GITHUB_CLIENT_SECRET.
4040

4141
#### GitHub Repository Webhook
4242

43-
In order to receive changes from the repo, you need to add a webhook that pushes changes whenever you merge. Webhooks are under "settings" for the individual repository (which also means you must be a repo onwer).
43+
To receive changes from the repo, you need to add a webhook that pushes changes whenever you merge. Webhooks are under "settings" for the individual repository (which also means you must be a repo owner).
4444

4545
The Webhook should have the following settings:
4646

47-
* Payload URL: https://your.election.domain/v1/webhooks/meta/sync
48-
* Content Type: application/json
49-
* Shared Secret set to the same as META_SECRET
47+
* Payload URL: `https://your.election.domain/v1/webhooks/meta/sync`
48+
* Content type: application/json
49+
* Secret set to the same as META_SECRET
5050
* Enable SSL Verification
5151
* Just The Push Event
5252
* Check "Active" to turn it on
@@ -57,12 +57,12 @@ This "secret" is an arbitrary string that authenticates the push to the Elekto s
5757

5858
Elekto is designed to accept its runtime configuration as ENV variables in its shell environment. A sample `.env.example` file can be found in the base directory of the Elekto source. These ENV configuration variables are not expected to change frequently, or at all, for any particular running Elekto instance. Changing them generally requires restarting Elekto.
5959

60-
All of these env variables need to be set before starting Elekto as a uwsgi application, or even in developer mode; without them, Elekto will error out and refuse to start. You can set this up however you please:
60+
All of these env variables need to be set before starting Elekto as a uWSGI application, or even in developer mode; without them, Elekto will error out and refuse to start. You can set this up however you please:
6161

6262
* as the `.bashrc` for the elekto application user
6363
* as ENV variables for a container running Elekto
6464
* preloaded in a systemd unit file
65-
* injected through a ConfigMap and a Secret into an Kubernetes pod
65+
* injected through a ConfigMap and a Secret into a Kubernetes pod
6666

6767
Since we use ENV for Elekto configuration, this does mean that Elekto must be launched under a shell.
6868

@@ -86,11 +86,9 @@ Example: `production` or `development`
8686

8787
**APP_KEY**
8888

89-
*Optional* Seed string for Flask encryption if running Flask in standalone mode. Not required if fronting with an HTTPS webserver.
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.
9090

91-
Example: ``
92-
93-
FIXME
91+
Example: `2400229255`
9492

9593
**APP_DEBUG**
9694

@@ -100,13 +98,13 @@ Example: `True` or `False`
10098

10199
**APP_URL**
102100

103-
*Optional* URL of the Elekto instance. Used by some uwsgi and/or Nginx configurations. Not used internally by Elekto.
101+
*Optional* URL of the Elekto instance. Used by some uWSGI and/or Nginx configurations. Not used internally by Elekto.
104102

105103
Example: `http://elections.knative.dev`
106104

107105
**APP_PORT**
108106

109-
*Optional* Used in some uwsgi start scripts, and when running Flask in standalone mode. Port on which to serve Elekto.
107+
*Optional* Used in some uWSGI start scripts, and when running Flask in standalone mode. Port on which to serve Elekto.
110108

111109
Example: `5000`
112110

@@ -118,15 +116,15 @@ Example: `localhost`
118116

119117
**APP_CONNECT**
120118

121-
*Optional* Whether to serve uwsgi over HTTP or via a local unix socket. Used by some startup scripts; see `entrypoint.sh` for an example.
119+
*Optional* Whether to serve uWSGI over HTTP or via a local Unix socket. Used by some startup scripts; see `entrypoint.sh` for an example.
122120

123121
Example: `http` or `socket`
124122

125123
#### Database Connection
126124

127125
**DB_CONNECTION**
128126

129-
*Required* Which database connection type to use. Currently only postgresql, mysql, and sqlite are supported.
127+
*Required* Which database connection type to use. Currently only PostgreSQL, MySQL, and SQLite backends are supported.
130128

131129
Example: `postgresql`, `mysql`, or `sqlite`
132130

@@ -182,7 +180,7 @@ Example: `local`, `sidecar`
182180

183181
**META_PATH**
184182

185-
*Required* Local file location at which to store a clone of the election data repository. This directory will be created by Elekto at sync time, so the application must have the ability to write to the parent directory. May be absolute or relative; if relative, will be under the eletko source directory. Defaults to `meta`. For containers, a directory under `/tmp` is recommended to make sure the location is writeable.
183+
*Required* Local file location at which to store a clone of the election data repository. This directory will be created by Elekto at sync time, so the application must have the ability to write to the parent directory. The directory may be absolute or relative; if it is relative, it will be under the Eletko source directory. Otherwise it defaults to `meta`. For containers, a directory under `/tmp` is recommended to make sure the location is writeable.
186184

187185
Example: `meta`, `/tmp/meta`
188186

@@ -200,7 +198,7 @@ Example: `92a488d11c0d27bbfea0a97e3332e08a`
200198

201199
#### Oauth Settings
202200

203-
At this time, there are only settings available for GitHub because other Oauth sources haven't been implemented. When other sources get added to Elekto, each will get their own configuration variables.
201+
At this time, there are only settings available for GitHub because other Oauth sources haven't been implemented. When other sources get added to Elekto, each will get its own configuration variables.
204202

205203
**GITHUB_REDIRECT**
206204

content/en/docs/Getting started/devinstall.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This guide will help you create a development installation of Elekto on your lap
1010

1111
## Create a development environment
1212

13-
The application is written in `python` using `flask` and `sqlalchemy`. This repository ships a `requirements.txt` and a `environment.yml` for conda users.
13+
The application is written in Python using Flask and SQLAlchemy. This repository ships a `requirements.txt` and an `environment.yml` for conda users.
1414

1515
```bash
1616
# Installation with pip
@@ -59,7 +59,8 @@ META_BRANCH=main
5959
META_SECRET=db5a951969c379e75d0bf15ad6ff8b4a36fbeb02 # same as webhook of the same meta repository
6060
```
6161

62-
Update the Oauth info, create an github oauth app if already not created.
62+
Update the Oauth info, create a GitHub Oauth app if already not created.
63+
6364
```bash
6465
GITHUB_REDIRECT=/oauth/github/callback
6566
GITHUB_CLIENT_ID=d79f002c1d2e3cf20521
@@ -68,10 +69,10 @@ GITHUB_CLIENT_SECRET=2f64fff6612c46f87314ad5bb81d05c8fd29c561
6869

6970
#### Migrate and Sync DB with Meta
7071

71-
The `console` script in the repository is used to perform all the table creations and syncing of the meta.
72+
The `console` script in the repository is used to perform all the table creations and syncing of the meta files.
7273

7374
```bash
74-
# to migrate the database from command line
75+
# to migrate the database from the command line
7576
python console --migrate
7677
```
7778

content/en/docs/Getting started/installation.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ This guide walks you through installing Elekto by hand on a server or VM.
1212

1313
For Elekto to run in production, you need the following small application stack:
1414

15-
* The Elekto python/flask/uwsgi application
15+
* The Elekto python/flask/uWSGI application
1616
* A backing SQL database instance
1717
* A web proxy such as Nginx or Kubernetes Ingress
1818
* A GitHub repository
1919
* An Oauth authentication source
2020

21-
Elekto can be installed either as a native application, or as a container. The instructions below cover installation as a native application. For installation in a container, see [Kubernetes installation]({{< relref "kubernetes.md" >}})
21+
Elekto can be installed either as a native application or as a container. The instructions below cover installation as a native application. For installation in a container, see [Kubernetes installation]({{< relref "kubernetes.md" >}})
2222

2323
## Installing Requirements and Python Binaries
2424

25-
Elekto is a Python/Flask/uwsgi application developed in Python 3. Building it from source requires the following prerequisites, which should be installed using your OS's packaging system:
25+
Elekto is a Python/Flask/uWSGI application developed in Python 3. Building it from source requires the following prerequisites, which should be installed using your OS's packaging system:
2626

2727
* Python3 Pip and supporting build tools (like gcc), or Conda
28-
* uwsgi server
28+
* uWSGI server
2929
* Database client libraries for your chosen database (see below)
3030
* git
3131

@@ -41,11 +41,11 @@ conda env create -f environment.yml && conda activate elekto
4141

4242
Please check the above build process carefully for error messages; the only acceptable errors are (a) warnings about out-of-date versions and (b) missing database libraries for the databases you're not using.
4343

44-
It is completely possible that you could run Elekto using fastcgi instead of uwsgi, but at this time we have no documentation on how to do this.
44+
It is possible that you could run Elekto using fastcgi instead of uWSGI, but at this time we have no documentation on how to do this.
4545

4646
## Backing SQL Database
4747

48-
Github stores ballots and some metadata in a designated SQL database, which is up to you to install and run. Currently Elekto supports the following:
48+
Github stores ballots and some metadata in a designated SQL database, which is up to you to install and run. Currently, Elekto supports the following:
4949

5050
* PostgreSQL
5151
* MySQL (and its forks)
@@ -55,25 +55,25 @@ However, as Elekto uses SQLAlchemy, it can potentially support any SQL database
5555

5656
Database requirements are very light, so it is completely feasible to run the database on the same server as the python application. The database server needs less than 2 CPUs, 1GB memory, and 25GB storage. You can also use a cloud database service; the included database support was chosen specifically because there are multiple cloud database services available. In that case, you are likely to use the smallest size of cloud database available.
5757

58-
The Elekto database user needs to have permissions to create tables. The database must be configured with user/password login. Other forms of authentication are not yet supported.
58+
The Elekto database user needs to have permission to create tables. The database must be configured with user/password login. Other forms of authentication are not yet supported.
5959

6060
The Elekto application will not run if the database is unavailable. The ballot data contained in the database is not stored anywhere else, and as such is unrecoverable if the database is lost. For this reason, it is up to the administrator to set up and manage backups and high availability. This is particularly a concern for SQLite, which is an embedded database; you will need to set up cron jobs on the server to back this up.
6161

6262
## Web Server
6363

64-
Elekto runs in the python uwsgi web application server. Uwsgi is not very scalable, though, and does not handle SSL connections. As such, for anything other than developer mode, we recommend that you put a web server in front of it.
64+
Elekto runs in the python uWSGI web application server. uWSGI is not very scalable, though, and does not handle SSL connections. As such, for anything other than developer mode, we recommend that you put a web server in front of it.
6565

6666
Nginx works well for this, whether as a standalone or as part of Kubernetes Ingress. See the sample Nginx configuration in the installation directory of the Elekto repository for an example setup. If running directly on a host with an Nginx proxy, you'll want to run Eletko in "socket" connection mode. Other web servers would also work, but Nginx is the only sample configuration supplied.
6767

68-
On Kubernetes, you'll want to access Elekto via Ingress. See `installation/deployment` for an example of this. In a Kubernetes setup, you want to run Elekto in http mode.
68+
On Kubernetes, you'll want to access Elekto via Ingress. See `installation/deployment` for an example of this. In a Kubernetes setup, you want to run Elekto in `http` mode.
6969

7070
## GitHub Repository
7171

72-
Elekto's workflow is GitOps-based. This means that, in order to use Elekto, you must have a GitHub (GitLab TBD) repository for Elekto to attach to. This must be a repository you own and have administration rights on, as you will be setting up a webhook and directories.
72+
Elekto's workflow is GitOps-based. This means that to use Elekto, you must have a GitHub (GitLab TBD) repository for Elekto to attach to. This must be a repository you own and have administration rights on, as you will be setting up a webhook and directories.
7373

7474
It does *not* need to be a repository that's exclusively dedicated to Elekto. Most organizations using Elekto place its election metadata into a subdirectory of a repository that's used for other community documents (e.g. `knative/community/elections`). Given that Elekto will refresh for every webhook push, however, it's probably better if it's not a repository that gets multiple commits per hour.
7575

76-
See [Configuration]() for how to set up this GitHub repository, and the [Administration Guide]() for what files go into it.
76+
See [Configuration]({{< relref "configuration.md" >}}) for how to set up this GitHub repository, and the [Administration Guide]() for what files go into it.
7777

7878
## Oauth Authentication Source
7979

@@ -83,8 +83,8 @@ See Configuration for how to configure this in GitHub.
8383

8484
## Other System Requirements
8585

86-
Elekto does not require elevated privileges to run, so for security we recommend running it under an elekto, www, or python application account with restricted permissions.
86+
Elekto does not require elevated privileges to run, so for security, we recommend running it under an `elekto`, `www`, or `python` application account with restricted permissions.
8787

8888
Elekto caches a copy of the election respository on disk, and as such needs a file location to which it can write, with storage equal to the storage size of a git clone of that repository.
8989

90-
If you've completed everything in Installation, please proceed to [Configuration]().
90+
If you've completed everything in Installation, please proceed to [Configuration]({{< relref "configuration.md" >}}).

0 commit comments

Comments
 (0)