Merge pull request #6027 from normanjaeckel/ManageSetupCommand
Manage setup command
This commit is contained in:
commit
3b41fb468e
79
.github/workflows/build_images.yml
vendored
Normal file
79
.github/workflows/build_images.yml
vendored
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
---
|
||||||
|
name: Build Docker images for all OpenSlides services
|
||||||
|
on: push
|
||||||
|
env:
|
||||||
|
IMAGE_VERSION: 4.0.0-dev
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Builds Docker images
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
service:
|
||||||
|
- name: openslides-proxy
|
||||||
|
directory: proxy
|
||||||
|
|
||||||
|
- name: openslides-client
|
||||||
|
directory: openslides-client
|
||||||
|
|
||||||
|
- name: openslides-backend
|
||||||
|
directory: openslides-backend
|
||||||
|
|
||||||
|
- name: openslides-datastore-reader
|
||||||
|
directory: openslides-datastore-service
|
||||||
|
args:
|
||||||
|
MODULE: reader
|
||||||
|
PORT: 9010
|
||||||
|
|
||||||
|
- name: openslides-datastore-writer
|
||||||
|
directory: openslides-datastore-service
|
||||||
|
args:
|
||||||
|
MODULE: writer
|
||||||
|
PORT: 9011
|
||||||
|
|
||||||
|
- name: openslides-autoupdate
|
||||||
|
directory: openslides-autoupdate-service
|
||||||
|
|
||||||
|
- name: openslides-auth
|
||||||
|
directory: openslides-auth-service
|
||||||
|
|
||||||
|
- name: openslides-media
|
||||||
|
directory: openslides-media-service
|
||||||
|
|
||||||
|
- name: openslides-manage
|
||||||
|
directory: openslides-manage-service
|
||||||
|
|
||||||
|
- name: openslides-permission
|
||||||
|
directory: openslides-permission-service
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Build image
|
||||||
|
working-directory: ${{ matrix.service.directory }}
|
||||||
|
env:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
run: |
|
||||||
|
if [ "${{ matrix.service.args }}" != "" ]
|
||||||
|
then
|
||||||
|
export BUILD_ARGS="--build-arg MODULE=${{ matrix.service.args.MODULE }}
|
||||||
|
--build-arg PORT=${{ matrix.service.args.PORT }}"
|
||||||
|
fi
|
||||||
|
docker build . --tag ${{ matrix.service.name }} $BUILD_ARGS
|
||||||
|
|
||||||
|
- name: Log into registry
|
||||||
|
run: echo "${{ secrets.GITHUB_TOKEN }}" |
|
||||||
|
docker login ghcr.io --username ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
run: |
|
||||||
|
IMAGE_ID=ghcr.io/${{ github.repository }}/${{ matrix.service.name }}
|
||||||
|
|
||||||
|
# Change all uppercase to lowercase
|
||||||
|
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||||
|
|
||||||
|
docker tag ${{ matrix.service.name }} $IMAGE_ID:$IMAGE_VERSION
|
||||||
|
docker push $IMAGE_ID:$IMAGE_VERSION
|
8
.github/workflows/models.yml
vendored
8
.github/workflows/models.yml
vendored
@ -1,16 +1,18 @@
|
|||||||
name: Validate models.yml
|
---
|
||||||
|
name: Validate models.yml and initial and example data
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
env:
|
env:
|
||||||
PYTHON_VERSION: 3.8.5
|
PYTHON_VERSION: 3.8.5
|
||||||
|
GO_VERSION: 1.16
|
||||||
jobs:
|
jobs:
|
||||||
validate-models:
|
validate-models:
|
||||||
name: Validate models.yml
|
name: Validate models.yml
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.15
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: ${{ env.GO_VERSION }}
|
||||||
|
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
73
README.md
73
README.md
@ -8,50 +8,65 @@ https://openslides.com for more information.
|
|||||||
|
|
||||||
__Note: OpenSlides 4 is currently under development.__
|
__Note: OpenSlides 4 is currently under development.__
|
||||||
|
|
||||||
### Architecture of OpenSlides 4
|
|
||||||
|
## Architecture of OpenSlides 4
|
||||||
|
|
||||||
![System architecture of OpenSlides 4](docs/OpenSlides4-systemarchitecture.png)
|
![System architecture of OpenSlides 4](docs/OpenSlides4-systemarchitecture.png)
|
||||||
|
|
||||||
|
|
||||||
Read more about our [concept of OpenSlides 4.0](https://github.com/OpenSlides/OpenSlides/wiki/DE%3A-Konzept-OpenSlides-4).
|
Read more about our [concept of OpenSlides 4.0](https://github.com/OpenSlides/OpenSlides/wiki/DE%3A-Konzept-OpenSlides-4).
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
NOTE: Do not use prod at the moment. It will not work. Please refer to the DEVELOPMENT.md!
|
### Requirements
|
||||||
|
|
||||||
Required software: Docker, docker-compose, make, git
|
You need [Docker](https://docs.docker.com/engine/install/) and [Docker
|
||||||
|
Compose](https://docs.docker.com/compose/install/).
|
||||||
|
|
||||||
For a non-development setup, clone this repo and run it via docker compose. The make command is a handy shortcut for this:
|
### Setup OpenSlides
|
||||||
|
|
||||||
$ git clone git@github.com:OpenSlides/OpenSlides.git
|
Go to a nice place in your filesystem, get the [OpenSlides manage
|
||||||
$ cd OpenSlides
|
tool](https://github.com/OpenSlides/openslides-manage-service/releases/tag/latest)
|
||||||
$ git checkout openslides4-dev # needed, until OS4 is released
|
from GitHub and make it executable. E. g. run:
|
||||||
$ make run-prod
|
|
||||||
|
$ wget https://github.com/OpenSlides/openslides-manage-service/releases/download/latest/manage
|
||||||
|
$ chmod +x manage
|
||||||
|
|
||||||
|
Create configuration files:
|
||||||
|
|
||||||
|
$ ./manage setup --cwd # TODO: Provide instruction using XDG_DATA_PATH.
|
||||||
|
|
||||||
|
Build and start Docker containers. According to your Docker installation you may
|
||||||
|
have to run this as root:
|
||||||
|
|
||||||
|
$ docker-compose up --detach
|
||||||
|
|
||||||
|
Setup initial-data:
|
||||||
|
|
||||||
|
$ ./manage initial-data
|
||||||
|
|
||||||
|
Now you can open http://localhost:8000 and use OpenSlides.
|
||||||
|
|
||||||
|
To stop OpenSlides run:
|
||||||
|
|
||||||
|
$ docker-compose stop
|
||||||
|
|
||||||
|
To remove all containers including the complete database run:
|
||||||
|
|
||||||
|
$ docker-compose rm
|
||||||
|
|
||||||
|
|
||||||
|
## Installation with ...
|
||||||
|
|
||||||
|
TODO: Provide a short instruction for setup with Docker Swarm or Kubernetes or
|
||||||
|
something else.
|
||||||
|
|
||||||
|
|
||||||
|
## Development setup
|
||||||
|
|
||||||
For a development setup, refer to [the development docs](DEVELOPMENT.md)
|
For a development setup, refer to [the development docs](DEVELOPMENT.md)
|
||||||
|
|
||||||
|
|
||||||
## Productive environment
|
|
||||||
|
|
||||||
Setup the repository (may be already done)
|
|
||||||
|
|
||||||
$ git clone git@github.com:OpenSlides/OpenSlides.git
|
|
||||||
$ cd OpenSlides
|
|
||||||
$ git checkout openslides4-dev
|
|
||||||
$ git submodule update --init
|
|
||||||
|
|
||||||
Prod setup. `./build.sh` may take a while.
|
|
||||||
|
|
||||||
$ cd docker
|
|
||||||
$ m4 docker-compose.yml.m4 > docker-compose.yml
|
|
||||||
$ ./build.sh
|
|
||||||
$ ./setup-prod.sh
|
|
||||||
$ docker-compose up
|
|
||||||
|
|
||||||
Navigate to https://localhost:8000
|
|
||||||
|
|
||||||
|
|
||||||
## Used software
|
## Used software
|
||||||
|
|
||||||
OpenSlides uses the following projects or parts of them:
|
OpenSlides uses the following projects or parts of them:
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 6ab94da8debbd0367a34f173ccc1ddee5a701863
|
Subproject commit d1bd161936e304c18336e3c1cc94609c8b39e952
|
Loading…
Reference in New Issue
Block a user