Go to file
FinnStutzenstein bb2f958eb5 Redis: Wait for replication on writes
Since channels_redis does not support dedicated read-redis instances, the
autoupdate message may be received before the data was replicated. All workers
read the autoupdate message from the write host, so there is a race between
getting this message and a finished replication. For large payloads, the
replication is slower in the most cases (even more in a distributed setup, where
the master and replica are on different nodes). The easy way is to wait for
replication. But there is one difficulty: The number of replicas has to be
known. There is a new settings-variable "AMOUNT_REPLICAS" which defaults to 1.
It needs to be set correctly! If it is too high, every autoupdate will be
delayed by 1 seconds because of a timeout witing for non-existent replicas. If
it is too low, some autoupdates may be wrong (and not detectable by the client!)
becuase of reading from non-synchronised relicas.

The other possibility is to fork channel_redis and add the feature of a
read-only redis. This ould help, because on a single redis instance all commands
are ordered: First, the data is synced, then the autoupdate message. Attention:
This means, if redis-replicas are scaled up, one must make sure to read from the
same instance. I think this is not possible in the way how dockers overlay
networks work. The only way would be to open one connection and reuse the
connection from channels_redis in OpenSlides. This would mean a heavy
integration of channels_redis (meaning including the source code in our repo).

For the first fix, this one is easy and should work.
2020-04-01 13:09:48 +02:00
.github/ISSUE_TEMPLATE Update issue templates 2019-08-06 11:22:13 +02:00
client Merge pull request #5283 from tsiegleauq/user-active-toggle 2020-03-30 10:14:27 +02:00
logo Updated improved OpenSlides logo. 2019-09-13 13:25:41 +02:00
make Projectiondefaults, width slider direct save 2019-04-01 08:48:52 +02:00
openslides Redis: Wait for replication on writes 2020-04-01 13:09:48 +02:00
requirements Updated translations 2020-03-20 17:19:12 +01:00
tests Last changes and cleanup some todos 2020-03-17 07:24:50 +01:00
.gitignore [WIP] External postgres as mediafile store 2020-02-17 14:38:32 +01:00
.travis.yml Last changes and cleanup some todos 2020-03-17 07:24:50 +01:00
AUTHORS changed email 2019-08-08 08:07:29 +02:00
CHANGELOG.rst Release 3.1 2019-12-13 09:39:11 +01:00
DEVELOPMENT.rst Prepared 3.0 release 2019-09-12 23:29:55 +02:00
Dockerfile switch to proper npm run build for client 2019-02-18 10:37:12 +01:00
LICENSE Prepared 3.0 release 2019-09-12 23:29:55 +02:00
manage.py Use file-based database during testing 2019-12-11 16:13:59 +01:00
MANIFEST.in Prepared 3.0 release 2019-09-12 23:29:55 +02:00
README.rst Prepared 3.0 release 2019-09-12 23:29:55 +02:00
requirements.txt Faster then fastes big_mode (with tests) 2018-08-25 17:11:29 +02:00
SETTINGS.rst Changed DEVELOPMENT.rst. 2019-09-12 21:40:42 +02:00
setup.cfg saml 2019-10-21 13:34:01 +02:00
setup.py Update version to 3.1.1-dev 2019-12-13 09:39:42 +01:00

============
 OpenSlides
============

What is OpenSlides?
===================

OpenSlides is a free, web based presentation and assembly system for
managing and projecting agenda, motions and elections of an assembly. See
https://openslides.com for more information.


Installation
============

The OpenSlides server runs everywhere where Python is running (for example on
GNU/Linux, Mac or Windows). For the OpenSlides client a current web browser is required.


1. Installation on GNU/Linux or Mac OS X
----------------------------------------

a. Check requirements
'''''''''''''''''''''

Make sure that you have installed `Python (>= 3.6) <https://www.python.org/>`_
on your system.

Additional you need build-essential packages, header files and a static
library for Python and also the pyvenv-3 binary package for python3.

E.g. run on Debian/Ubuntu::

    $ sudo apt-get install build-essential python3-dev python3-venv


b. Setup a virtual Python environment (optional)
''''''''''''''''''''''''''''''''''''''''''''''''

You can setup a virtual Python environment using the virtual environment
(venv) package for Python to install OpenSlides as non-root user.

Create your OpenSlides directory and change to it::

    $ mkdir OpenSlides
    $ cd OpenSlides

Setup and activate the virtual environment::

    $ python3 -m venv .virtualenv
    $ source .virtualenv/bin/activate
    $ pip install --upgrade setuptools pip


c. Install OpenSlides
'''''''''''''''''''''

To install OpenSlides just run::

    $ pip install openslides

This installs the latest stable version. To install a specific (beta)
version use ``openslides==x.y``.

You can also use the package from the `OpenSlides website
<https://openslides.com/>`_. Download latest OpenSlides release as
compressed tar archive and run::

    $ pip install openslides-x.y.tar.gz

This will install all required Python packages (see
``requirements/production.txt``).


d. Start OpenSlides
'''''''''''''''''''

To start OpenSlides simply run::

    $ openslides

If you run this command the first time, a new database and the admin account
(Username: ``admin``, Password: ``admin``) will be created. Please change the
password after first login!

OpenSlides will start a webserver. It will also try to open the webinterface in
your default webbrowser. The server will try to listen on the local ip address
on port 8000. That means that the server will be available to everyone on your
local network (at least for commonly used network configurations).

If you use a virtual environment (see step b.), do not forget to activate
the environment before restart after you closed the terminal::

    $ source .virtualenv/bin/activate

To get help on the command line options run::

    $ openslides --help

You can store settings, database and other personal files in a local
subdirectory and use these files e. g. if you want to run multiple
instances of OpenSlides::

    $ openslides start --local-installation


2. Installation on Windows
--------------------------

Follow the instructions above (1. Installation on GNU/Linux or Mac OS X) but care
of the following variations.

To get Python download and run the latest `Python 3.7 32-bit (x86) executable
installer <https://www.python.org/downloads/windows/>`_. Note that the 32-bit
installer is required even on a 64-bit Windows system. If you use the 64-bit
installer, step 1c of the instruction might fail unless you installed some
packages manually.

In some cases you have to install `MS Visual C++ 2015 build tools
<https://www.microsoft.com/en-us/download/details.aspx?id=48159>`_ before you
install the required python packages for OpenSlides (unfortunately Twisted
needs it).

To setup and activate the virtual environment in step 1b use::

    > .virtualenv\Scripts\activate.bat

All other commands are the same as for GNU/Linux and Mac OS X.


3. Installation with Docker
---------------------------

The installation instruction for (1) and (2) described a way to use OpenSlides in a
'small mode' with max 10 concurrent clients. To install OpenSlides for big assemblies
('big mode') you have to setup some additional components and configurations.

The easiest way to run the OpenSlides 'big mode' environment (with PostgreSQL, Redis
and NGINX) with Docker Compose: use our docker compose suite. Follow the instruction in
the `openslides-doccker-compose Repository <https://github.com/OpenSlides/openslides-docker-compose>`_.

To install and configure all components of our 'big mode' manually you can read the
`big-mode-instruction <https://github.com/OpenSlides/OpenSlides/blob/master/DEVELOPMENT.rst#openslides-in-big-mode>`_


Configuration
=============

Please consider reading the `OpenSlides configuration
<https://github.com/OpenSlides/OpenSlides/blob/master/SETTINGS.rst>`_ page to
find out about all configurations, especially when using OpenSlides for big
assemblies.


Development
===========

To setup a development environment for OpenSlides follow the instruction of
`DEVELOPMENT.rst
<https://github.com/OpenSlides/OpenSlides/blob/master/DEVELOPMENT.rst>`_.


Used software
=============

OpenSlides uses the following projects or parts of them:

* Several Python packages (see ``requirements/production.txt`` and ``requirements/big_mode.txt``).

* Several JavaScript packages (see ``client/package.json``)


License and authors
===================

OpenSlides is Free/Libre Open Source Software (FLOSS), and distributed
under the MIT License, see ``LICENSE`` file. The authors of OpenSlides are
mentioned in the ``AUTHORS`` file.