ingang/README.md

128 lines
4.4 KiB
Markdown
Raw Permalink Normal View History

2021-11-14 21:13:02 +00:00
# ingang
2024-02-16 16:22:02 +00:00
This is a piece of middleware intended to help manage invites for [Helios](https://heliosvoting.org/),
2021-11-14 21:13:02 +00:00
the two systems we use in tandem for holding meetings where members can vote.
Its web interface is hosted at
[https://vergadering.bij1.org/ingang/rooms/](https://vergadering.bij1.org/ingang/rooms/).
## requirements
- [Ruby](https://www.ruby-lang.org/)
- [Rake](https://ruby.github.io/rake/)
- [Bundler](https://bundler.io/)
2021-12-06 22:03:19 +00:00
## dependencies
- [rvm](https://rvm.io/)
2021-11-14 21:13:02 +00:00
## usage
2021-12-06 17:58:02 +00:00
```bash
2021-12-06 22:03:19 +00:00
# install ruby version specified in Gemfile
rvm use "ruby-2.7.5"
# create a wrapper for this ruby
PUMA=`gem wrappers show pumactl`
2021-12-06 17:58:02 +00:00
cp config/application.yml.bck config/application.yml.bck
# edit the above file to enter proper values
2023-02-19 07:24:31 +00:00
./bin/bundle config set --local path 'vendor'
./bin/bundle update
./bin/bundle install
./bin/bundle binstubs --all
2023-02-19 07:18:55 +00:00
./bin/rails app:update:bin
./bin/rails credentials:edit
2021-12-06 17:58:02 +00:00
# either restore existing data
cp old/config/master.key ./config/master.key
cp old/db/production.sqlite3 ./db/production.sqlite3
# or scaffold database
2023-02-19 07:18:55 +00:00
./bin/rails db:migrate # RAILS_ENV=test
2021-12-07 20:43:07 +00:00
# handle static assets
2021-12-06 17:58:02 +00:00
sudo apt-get update && sudo apt-get install yarn
2023-02-19 07:18:55 +00:00
RAILS_ENV=production ./bin/rails assets:precompile
./bin/rails webpacker:install
2021-12-07 20:43:07 +00:00
# run tests
2023-02-19 07:24:31 +00:00
./bin/rake test
2021-12-06 17:58:02 +00:00
# create service
sudo bash -c "cat > /etc/systemd/system/ingang.service" << EOF
[Unit]
Description=Ingang
[Service]
2021-12-06 22:03:19 +00:00
Type=simple
RemainAfterExit=yes
2021-12-06 17:58:02 +00:00
Restart=on-failure
2021-12-06 22:03:19 +00:00
TimeoutSec=300
2021-12-06 17:58:02 +00:00
User=$USER
WorkingDirectory=$PWD
2021-12-06 22:03:19 +00:00
PIDFile=$PWD/tmp/pids/server.pid
ExecStart=$PUMA -F $PWD/config/puma.rb start
ExecStop=$PUMA -F $PWD/config/puma.rb stop
ExecReload=$PUMA -F $PWD/config/puma.rb phased-restart
2021-12-06 17:58:02 +00:00
[Install]
WantedBy=multi-user.target
EOF
2021-12-06 22:03:19 +00:00
# start and check service
sudo systemctl daemon-reload
sudo systemctl stop ingang
sudo systemctl disable ingang
2021-12-06 17:58:02 +00:00
sudo systemctl enable ingang
sudo systemctl start ingang
systemctl status ingang
2021-12-06 22:03:19 +00:00
journalctl -u ingang
2021-12-06 17:58:02 +00:00
```
2021-11-14 21:13:02 +00:00
2023-03-08 17:40:24 +00:00
## handleiding
- [log in](https://vergadering.bij1.org/ingang/rooms/)
2024-02-16 16:22:02 +00:00
- maak een `New room`
2023-03-08 17:40:24 +00:00
- laad deelnemers in via `Users` -> `Bulk import`
- doe `Export Voters for Helios` en [laad in Helios stemmingen in](https://bij1.org/handleiding-stemsysteem/#stemgerechtigden-inladen)
2023-03-08 17:40:24 +00:00
- ofwel:
- in Helios stuur per stemming een invite
2023-10-08 10:20:50 +00:00
- Ingang in (stemmingen): `Import Votes` (vergt SSH toegang tot Helios server) en verspreid stemportaal links via ofwel:
1. `Export Voters for Mailing` doen en via externe mailing dienst sturen
* NB: volgorde blijft hierbij niet intact
2023-10-08 10:20:50 +00:00
1. via Ingang sturen door:
- bij `/rooms` -> `Edit` tweak de [mail text](https://cloud.bij1.org/s/4kT8KZRqGWWqerw)
- test via `Users` -> `Send test invite`
- als deze goed is `Send Invitations` naar de rest
2023-03-08 17:40:24 +00:00
- open stemmingen in Helios
- wacht tot mensen via hun in de mail gelinkte persoonlijke stem-portaal de vergadering in komen en stemmen
### late aanmeldingen
2024-03-24 16:22:59 +00:00
stappen in [Ingang](https://code.bij1.org/bij1/ingang), voor een `$ROOM` en `$ELECTION`: kies in de user index van een kamer (url `https://vergadering.bij1.org/ingang/rooms/$ROOM/users`, b.v. `https://vergadering.bij1.org/ingang/rooms/123/users`):
2023-10-07 17:11:16 +00:00
2024-03-24 16:22:59 +00:00
- Ingang in: kies in de user index van een kamer knop `Bulk import` (url `https://vergadering.bij1.org/ingang/rooms/$ROOM/users/new`, b.v. `https://vergadering.bij1.org/ingang/rooms/123/users/new`)
- Ingang uit: kies in de user index van een kamer knop `Export Voters for Helios` (url `https://vergadering.bij1.org/ingang/rooms/$ROOM/voters.csv`, b.v. `https://vergadering.bij1.org/ingang/rooms/123/voters.csv`)
- [Helios](https://stemmen.bij1.org/) in: bij een vergadering op `voters & ballots` (url: `https://stemmen.bij1.org/helios/elections/$ELECTION/voters/upload`, b.v. `https://stemmen.bij1.org/helios/elections/12345678-1234-1234-1234-1234567890ab/voters/upload`)
2023-03-08 17:40:24 +00:00
- stuur mail via Ingang
- ofwel:
- Ingang in (stemmingen): `https://vergadering.bij1.org/ingang/rooms/$ROOM/votes/bulk` (vergt SSH toegang tot Helios server)
- in Helios stuur per stemming een invite
2021-12-15 18:24:32 +00:00
## todo
2022-01-01 21:22:57 +00:00
- CI
2021-12-15 18:24:32 +00:00
- un-hardcode
2021-12-19 21:11:21 +00:00
- `app/views/main/stream.html.erb`: video/chat urls
2021-12-15 18:24:32 +00:00
2021-11-14 21:13:02 +00:00
## documentation checklist
2020-10-23 01:52:26 +00:00
This README would normally document whatever steps are necessary to get the
application up and running.
Things you may want to cover:
2023-10-07 17:11:16 +00:00
- Ruby version
- System dependencies
- Configuration
- Database creation
- Database initialization
- How to run the test suite
- Services (job queues, cache servers, search engines, etc.)
- Deployment instructions
- ...