Skip to content

Commit d0ef432

Browse files
committed
More installation and general information documentation.
Signed-off-by: Josh Berkus <josh@agliodbs.com>
1 parent ce1f31a commit d0ef432

File tree

5 files changed

+31
-87
lines changed

5 files changed

+31
-87
lines changed

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

Lines changed: 8 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -5,88 +5,17 @@ weight: 2
55
description: >
66
Start using elekto for your organisation.
77
---
8-
#### Create a development environment
98

10-
The application is written in `python` using `flask` and `sqlalchemy`. This repository ships a `requirements.txt` and a `environment.yml` for conda users.
9+
Elekto is a DIY service, so in order to start using it, you're going to have to install it.
1110

12-
```bash
13-
# Installation with pip
14-
pip install -r requirements.txt
11+
Please see the following guides:
1512

16-
# Installation with Conda
17-
conda env create -f environment.yml && conda activate elekto
18-
```
13+
Ways to install Elekto, any of:
1914

20-
#### Setup env variables
15+
* [Developer Installation]({{< relref "devinstall.md" >}})
16+
* [Server Installation]({{< relref "installation.md" >}})
17+
* [Kubernetes Installation]({{< relref "kubernetes.md" >}})
2118

22-
The repository has a `.env.example` file which can be used as a template for `.env` file, update the environment file after copying from `.env.example`.
19+
And then regardless of how you installed it:
2320

24-
```bash
25-
# create a new .env file from .env.example
26-
cp .env.example .env
27-
```
28-
29-
Set the basic information about the application in the upper section
30-
```bash
31-
APP_NAME=k8s.elections # set the name of the application
32-
APP_ENV=development # development | production
33-
APP_KEY= # random secret key (!! important !!)
34-
APP_DEBUG=True # True | False (production)
35-
APP_URL=http://localhost # Url where the application is hosted
36-
APP_PORT=5000 # Default Running port for development
37-
APP_HOST=localhost # Default Host for developmemt
38-
```
39-
40-
Update the database credentials,
41-
```bash
42-
DB_CONNECTION=mysql # Mysql is only supported
43-
DB_HOST=localhost
44-
DB_PORT=3306
45-
DB_DATABASE=name
46-
DB_USERNAME=user
47-
DB_PASSWORD=password
48-
```
49-
50-
Update the meta repository info
51-
```bash
52-
META_REPO=https://github.com/elekto-io/elekto.meta.test.git
53-
META_DEPLOYMENT=local
54-
META_PATH=meta
55-
META_BRANCH=main
56-
META_SECRET=db5a951969c379e75d0bf15ad6ff8b4a36fbeb02 # same as webhook of the same meta repository
57-
```
58-
59-
Update the Oauth info, create an github oauth app if already not created.
60-
```bash
61-
GITHUB_REDIRECT=/oauth/github/callback
62-
GITHUB_CLIENT_ID=d79f002c1d2e3cf20521
63-
GITHUB_CLIENT_SECRET=2f64fff6612c46f87314ad5bb81d05c8fd29c561
64-
```
65-
66-
#### Migrate and Sync DB with Meta
67-
68-
The `console` script in the repository is used to perform all the table creations and syncing of the meta.
69-
70-
```bash
71-
# to migrate the database from command line
72-
python console --migrate
73-
```
74-
75-
To sync the database with the meta files
76-
77-
```bash
78-
# to the sync the database with the meta
79-
python console --sync
80-
```
81-
82-
#### Run the application Server locally
83-
84-
The flask server will start on `5000` by default but can be changed using `--port` option.
85-
86-
```bash
87-
# to run the server on default configs
88-
python console --run
89-
90-
# to change host and port
91-
python console --port 8080 --host 0.0.0.0 --run
92-
```
21+
* [Configuration]({{< relref "installation.md" >}})

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ title: "Installation"
33
linkTitle: "Installation"
44
weight: 2
55
description: >
6-
Full installation documentation
6+
Full server installation documentation
77
---
88

9+
This guide walks you through installing Elekto by hand on a server or VM.
10+
911
# Installation Concepts
1012

1113
For Elekto to run in production, you need the following small application stack:
@@ -16,7 +18,7 @@ For Elekto to run in production, you need the following small application stack:
1618
* A GitHub repository
1719
* An Oauth authentication source
1820

19-
Elekto can be installed either as a native application, or as a container.
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" >}})
2022

2123
## Installing Requirements and Python Binaries
2224

content/en/docs/Overview/_index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ title: "Overview"
33
linkTitle: "Overview"
44
weight: 1
55
description: >
6-
Understand the working of elekto.
6+
Overview of Elekto Project.
77
---
88

9-
The application requires a [meta]() repository to store election meta files. The meta repository is the single source of truth for the application and is managed by gitops, all the tasks like creating an election, adding/removing voters to the list are managed by raising specific pull requests in the meta repository. See our detailed instruction [docs](/docs/README.md)
9+
The Elekto Project is a [CNCF](https://cncf.io) accessory project which develops online voting software intended for use by the CNCF itself and by open source cloud native projects.
1010

11-
![architecture.png](arch.png)
11+
Originally written for the needs of the Kubernetes and OpenTelemetry projects, the Elekto software is designed to support online preference voting for open source projects. Based on a GitOps workflow and Condorcet election accounting, Elekto supports your steering committee and TOC elections, committee decision making, and anywhere else a formal project vote is required among a small pool of candidates or options.
12+
13+
Read on to learn more about Elekto's [goals]({{< relref "goals.md" >}}) and [architecture]({{< relref "architecture.md" >}}).
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: "Architecture"
3+
linkTitle: "Architecture"
4+
weight: 1
5+
description: >
6+
Understand the working of elekto.
7+
---
8+
9+
The application requires a git repository to store election meta files. The meta repository is the single source of truth for the application and is managed by gitops, all the tasks like creating an election, adding/removing voters to the list are managed by raising specific pull requests in the meta repository.
10+
11+
![architecture.png](arch.png)

content/en/docs/Overview/goals.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ description: >
66
Reasons behind the Elekto design
77
---
88

9-
Elekto was originally built to support the Kubernetes Steering Committee elections, supporting the existing workflow of that community. It's also intended to avoid several chronic issues with usage of the CIVS election system.
9+
Elekto was originally built to support the [Kubernetes Steering Committee elections](https://github.com/kubernetes/steering/blob/master/elections.md), supporting the existing workflow of that community. It's also intended to avoid several chronic issues with usage of the [CIVS election system](https://civs1.civs.us/).
1010

11-
Before adopting, or contributing to Elekto, please read these principles as the project is very unlikely to accept features which transgress any of them.
11+
Before adopting, or contributing to Elekto, please read these principles as they give you a broad idea of what kinds of features and changes the project is interested in or likely to implement.
1212

1313
## Preference Elections for Small Organizations
1414

@@ -22,7 +22,7 @@ Elekto is not designed to support public governmental elections, or any election
2222

2323
The project is designed to be an extremely simple, lightweight web application. Simplicity makes it easy to install and support in a variety of environments and platforms. This means that organizations can run Elekto as a microservice, on their own, instead of requiring a paid, hosted service.
2424

25-
Simplicity also makes Elekto easy to fork and modify, as well as contribute to. We chose [Flask]() as our framework with this in mind. It's also why our container image is a simple, unified image.
25+
Simplicity also makes Elekto easy to fork and modify, as well as contribute to. We chose [Flask](https://flask.palletsprojects.com/en/2.0.x/) as our framework with this in mind. It's also why our container image is a simple, unified image.
2626

2727
This does mean that changes that would substantially increase the complexity of Elekto -- such as a theme engine or porting it to Django or decomposing it into a half-dozen scalable subservices -- are unlikely to be accepted in the main project.
2828

0 commit comments

Comments
 (0)