-
Notifications
You must be signed in to change notification settings - Fork 0
Setup instructions
This article describes the necessary steps to setup and run SPKR. The procedure uses commands for Ubuntu, but can easily be adapted to any OS.
-
jdk installed
sudo apt-get install openjdk-7-jre -
sbt installed. This is the recommended procedure. Manual installation works best. Don't forget to add the ~/bin dir to your .bashrc if it hasn't already been done.
echo “export PATH=$PATH:~/bin” >> ~/.bashrc(may required a restart) - A working git client
sudo apt-get install git-core - An apache server
sudo apt-get install apache2 - A MySQL server (may be a remote server)
sudo apt-get install mysql-server
On your MySQL server, create a USER and SCHEMA, and give the user the access rights by running these commands (use sudo mysql -p to access the MySQL console):
CREATE USER SPKR@'localhost' IDENTIFIED BY 'QlWFwjKfeOsGN6nqsaEg';
CREATE SCHEMA SPKR;
GRANT CREATE, SELECT, INSERT, DELETE, UPDATE ON SPKR.* to 'SPKR'@'%' IDENTIFIED BY 'QlWFwjKfeOsGN6nqsaEg';
These commands use SPKR’s default configuration, but you may use any schema running on any server by customizing the configuration file later.
Create a project directory and clone the SPKR repository in it as well as the other frameworks it depends on (you may need to configure keys before cloning):
git clone git@github.com:wajam/spkr.git
git clone git@github.com:wajam/nrv.git
git clone git@github.com:wajam/mry.git
git clone git@github.com:wajam/scn.git
git clone git@github.com:wajam/spnl.git
All frameworks should be compiled so they can be used by SPKR.
cd nrv
sbt clean compile publish-local
cd ../scn
sbt clean compile publish-local
cd ../spnl
sbt clean compile publish-local
cd ../mry
sbt clean compile publish-local
Move to the spkr project directory and build the project.
sbt clean compile stage
If you’re using a different name, user, password, or if you’re using a remote server, you need to update 'spkr/etc/spkr.properties' with the proper MySQL information.
Make sure your Apache server is running. You can try accessing the default Apache page at http://localhost (or whatever the ip of your Apache server is). Copy the content of the 'www' folder in spkr's working directory to your Apache folder (by default /var/www/). http://localhost should now display the SPKR client. If you're running SPKR on a remote server, specify the server's address at the bottom of the SPKR page.
Note: Apache is required since running the file directly may result in CORS issues.
Start the SPKR server using this command from the spkr working directory:
./spkr-core/target/start
- You can experiment with multiple browsers to familiarize yourself with the functionalities.
- You check out SPKR overview documentation in the wiki.
- You can explore the source code using favorite IDE and see how the frameworks are used. (start with the main class Spkr.scala)
- Note that the default cluster is static. This means the cluster requires less dependencies, but lacks some important persistence features. You may experience weird behavior while running SPKR in static mode (such as double posted messages in between restarts, unordered feeds, etc.). This article contains more information about the dynamic cluster.