______ _
| ___ \ | |
| |_/ /__ __ _ ___| |__
| __/ _ \/ _` |/ __| '_ \
| | | __/ (_| | (__| | | |
\_| \___|\__,_|\___|_| |_|
CLIENT
License: GPLv3
Authors: Christian Bierstedt
Henry Müssemann
Read about the Peach concept!
The main peach frontend is a flask server. The flask server will use the PeachShared submodule to communicate to the peach backend.
To set up peach client you will have to do the following steps:
- Please make sure you have understood the Peach concept and have set up the backend properly (mysql / kafka / PeachBackend / ...).
- Gather all IPs and ports. You will need them later on...
No idea? Maybe you should think about cloning the PeachStandalone Git
- Install the latest version of Flask (Flask Installation)
- Install the LDAP python module
$ sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
$ sudo pip install python-ldap
- Install kafka-python:
$ pip install kafka-python
- Install Apache Avro for Python
- Clone this repository
- Init all submodules
$ git submodule init
$ git submodule update
- Copy
flaskServer/config/flaskServerConfig.sample.py
toflaskServer/config/flaskServerConfig.py
$ cp flaskServer/config/flaskServerConfig.sample.py flaskServer/config/flaskServerConfig.py
- Adapt the newly created file (e.g.
$ vim flaskServer/config/flaskServerConfig.py
):
Replace
"<PeachClient_Git_Repo>": The directory of this file (e.g. /home/peach/PeachClient)
"<peach_temp_data>": The shared storage (See basic concept)
"<mysql_*>": The mysql information
"<current_domain>": The current domain (e.g. http://localhost:5000 !<-no ending backslash!)
- Copy
PeachShared/library/config/peachSharedConfig.sample.py
toPeachShared/library/config/peachSharedConfig.py
$ cp PeachShared/library/config/peachSharedConfig.sample.py PeachShared/library/config/peachSharedConfig.py
- Adapt the newly created file (e.g.
$ vim PeachShared/library/config/peachSharedConfig.py
):
Replace
"<PeachClient_Git_Repo>": The directory of this file (e.g. /home/peach/PeachClient)
"<peach_temp_data>": The shared storage (See basic concept)
"<kafka_server>": The kafka server address (e.g. localhost:9092)
- Set
FLASK_APP
environment variable in terminal
$ export FLASK_APP=app.py
- Start the flask server
$ cd flaskServer
$ flask run