-
Notifications
You must be signed in to change notification settings - Fork 41
Setup GraphSpace with Notification
This page gives step-by-step guide to installing all the tools required to run GraphSpace with notification support. Continue with these steps if you already have an older version of GraphSpace installed. If you are new to GraphSpace, please follow steps in the README.
Follow the steps given here to install Redis.
Follow the steps given here.
Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems.
-
Install Supervisor:
sudo apt install supervisor
-
Update location of graphspace directory (
GRAPHSPACE
) inrunworker
anddaphne
file. -
When Supervisor is installed you can give it programs to start and watch by creating configuration files in the
/etc/supervisor/conf.d
directory. For Daphne and workers we’ll create a file named/etc/supervisor/conf.d/graphspace.conf
with the following content, after replacingpath_to_GraphSpace
with the name of the directory where you downloaded GraphSpace,path_to_kafka
with the name of the directory where you downloaded Kafka anduser_name
with the name of the current user:[program:daphne_graphspace] command=sh /path_to_GraphSpace/daphne user = user_name stdout_logfile = /path_to_GraphSpace/logs/daphne.log redirect_stderr = true environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8,PYTHON_EGG_CACHE="/home/melvin15may/GraphSpace/python-eggs" priority=2 [program:runworker_daphne_graphspace] command=sh /path_to_GraphSpace/runworker process_name=%(process_num)s numprocs = 2 user = user_name stdout_logfile = /path_to_GraphSpace/logs/runworker.log redirect_stderr = true environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8,PYTHON_EGG_CACHE="/home/melvin15may/GraphSpace/python-eggs" priority=3 [program:kafka_graphspace] command=/path_to_kafka/bin/kafka-server-start.sh /path_to/kafka/config/server.properties user = user_name stdout_logfile = /path_to_GraphSpace/logs/kafka.log redirect_stderr = true environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8 priority=1
-
Update settings and run supervisord:
sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl restart all
- Run the following cmd:
a2enmod rewrite
,a2enmod proxy
anda2enmod proxy_wstunnel
- Inside the
/path_to/apache2/sites-enabled/000-default.conf
, copy and paste following lines inside<VirtualHost *:80> </VirtualHost>
RewriteEngine on RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC,OR] RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC] RewriteRule .* ws://127.0.0.1:9099%{REQUEST_URI} [P,QSA,L]
- Restart the apache server. On a computer running Ubuntu, the command is
sudo service apache2 restart