Add vote service to OS4 setup

Integrate vote service, makes according changes to configuration
Updates the client to integrate the vote service
Updates the backend to integrate the vote service
This commit is contained in:
Sean Engelhardt 2021-11-17 23:32:40 +01:00 committed by Sean
parent 67a82de70c
commit 6846b2ab91
10 changed files with 72 additions and 30 deletions

4
.gitmodules vendored
View File

@ -30,3 +30,7 @@
path = openslides-icc-service
url = https://github.com/OpenSlides/openslides-icc-service.git
branch = main
[submodule "openslides-vote-service"]
path = openslides-vote-service
url = https://github.com/OpenSlides/openslides-vote-service.git
branch = main

View File

@ -34,6 +34,11 @@ services-to-master:
# [1] ...or main, or whatever branch the OS4 one is. See .gitmodules.
git submodule foreach -q --recursive 'git checkout $(git config -f $$toplevel/.gitmodules submodule.$$name.branch || echo master); git pull upstream $$(git config -f $$toplevel/.gitmodules submodule.$$name.branch || echo master)'
submodules-origin-to-upstream:
# You may only use this one time after cloning this repository.
# Will set the upstream remote to "origin"
git submodule foreach -q --recursive 'git remote rename origin upstream'
cypress-open:
cd integration; npm run cypress:open

View File

@ -14,6 +14,7 @@ TARGETS=(
[datastore-reader]="$HOME/../openslides-datastore-service/reader"
[datastore-writer]="$HOME/../openslides-datastore-service/writer"
[media]="$HOME/../openslides-media-service/"
[vote]="$HOME/../openslides-vote-service/"
#[pgbouncer]="https://github.com/OpenSlides/openslides-docker-compose.git#:pgbouncer"
#[postfix]="https://github.com/OpenSlides/openslides-docker-compose.git#:postfix"
#[repmgr]="https://github.com/OpenSlides/openslides-docker-compose.git#:repmgr"

View File

@ -151,3 +151,27 @@ services:
driver: "none" # disable saving logs
ports:
- "8025:8025" # web ui to check mails manually
vote:
image: openslides-vote-dev
depends_on:
- auth
- message-bus
- datastore-reader
- postgres
environment:
- OPENSLIDES_DEVELOPMENT=true
- VOTE_HOST=vote
- VOTE_PORT=9013
- DATASTORE_READER_HOST=datastore-reader
- MESSAGING=redis
- MESSAGE_BUS_HOST=message-bus
- VOTE_REDIS_HOST=cache
- VOTE_DATABASE_HOST=postgres
- VOTE_DATABASE_USER=openslides
- VOTE_DATABASE_PASSWORD=openslides
- VOTE_DATABASE_NAME=openslides
- AUTH=ticket
- AUTH_HOST=auth
ports:
- "9013:9013"

View File

@ -32,3 +32,11 @@ MEDIA_DATABASE_NAME=openslides
MANAGE_HOST=manage
MANAGE_PORT=9008
VOTE_HOST=vote
VOTE_PORT=9013
VOTE_REDIS_HOST=cache
VOTE_DATABASE_HOST=postgres
VOTE_DATABASE_USER=openslides
VOTE_DATABASE_PASSWORD=openslides
VOTE_DATABASE_NAME=openslides

@ -1 +1 @@
Subproject commit 98055f773558121a11f5e0a5cd358fe8dc4a69c4
Subproject commit 7ff8bdbde45f0d816dd9e471fe1bb650e8937cd0

@ -1 +1 @@
Subproject commit b9aa7037fbc723a65674a636c665c69a9966c0d4
Subproject commit 7db47d666ac1ef4289f427d1007c3fd23776c9df

@ -0,0 +1 @@
Subproject commit b0a9acaff79c76e7defcd5cec8b9e9ba4b7de48a

View File

@ -21,9 +21,7 @@
"http": {
"servers": {
"srv0": {
"listen": [
":8000"
],
"listen": [":8000"],
"allow_h2c": true,
"routes": [
{
@ -40,9 +38,7 @@
],
"match": [
{
"path": [
"/system/autoupdate*"
]
"path": ["/system/autoupdate*"]
}
]
},
@ -59,9 +55,7 @@
],
"match": [
{
"path": [
"/system/presenter*"
]
"path": ["/system/presenter*"]
}
]
},
@ -78,9 +72,7 @@
],
"match": [
{
"path": [
"/system/action*"
]
"path": ["/system/action*"]
}
]
},
@ -97,9 +89,7 @@
],
"match": [
{
"path": [
"/system/media*"
]
"path": ["/system/media*"]
}
]
},
@ -116,9 +106,7 @@
],
"match": [
{
"path": [
"/system/auth*"
]
"path": ["/system/auth*"]
}
]
},
@ -136,9 +124,7 @@
],
"match": [
{
"path": [
"/system/icc*"
]
"path": ["/system/icc*"]
}
]
},
@ -149,10 +135,7 @@
"flush_interval": -1,
"transport": {
"protocol": "http",
"versions": [
"2",
"h2c"
]
"versions": ["2", "h2c"]
},
"upstreams": [
{
@ -164,13 +147,28 @@
"match": [
{
"header": {
"Content-Type": [
"application/grpc"
]
"Content-Type": ["application/grpc"]
}
}
]
},
{
"handle": [
{
"handler": "reverse_proxy",
"upstreams": [
{
"dial": "$VOTE_HOST:$VOTE_PORT"
}
]
}
],
"match": [
{
"path": ["/system/vote*"]
}
]
},
{
"handle": [
{

View File

@ -16,6 +16,7 @@ AUTH_HOST="${AUTH_HOST:-auth}" AUTH_PORT="${AUTH_PORT:-9004}" \
MEDIA_HOST="${MEDIA_HOST:-media}" MEDIA_PORT="${MEDIA_PORT:-9006}" \
MANAGE_HOST="${MANAGE_HOST:-manage}" MANAGE_PORT="${MANAGE_PORT:-9008}" \
CLIENT_HOST="${CLIENT_HOST:-client}" CLIENT_PORT="${CLIENT_PORT:-9001}" \
VOTE_HOST="${VOTE_HOST:-vote}" VOTE_PORT="${VOTE_PORT:-9013}" \
envsubst < "$base" > "$base.out" && mv -f "$base.out" "$base"
jq_write() {