For help with configuring mysql, rabbitmq, and (optionally) nginx see sections 3.2, 3.3 and 3.4.
sudo apt-get install npm python2.7-dev python-pip python-virtualenv rabbitmq-server ffmpeg
. Also install an SQL server of your choice (mysql and sqlite3 tested). A proper SQL server (like MySQL) is absolutely preferred! For help with RabbitMQ configuration, see below.- Install bower, eg.
sudo npm install -g bower
. Please see Bower installation instructions for details - Create a virtualenv
virtualenv /path/to/virtualenv/utuputki2
and activate itsource /path/to/virtualenv/utuputki2/bin/activate
. See virtualenv documentation for details. - Install python requirements:
pip install --upgrade -r deploy/requirements.txt
. If you want to use MySQL, you need to also install mysql-python (pip install mysql-python
). - Install JS requirements
bower install
. Run this in the Utuputki2 project directory!
- Get Python 2.7 and install it. You'll get pip preinstalled, but you'll have
to install virtualenv yourself. Remember to add
python27/
andpython27/Scripts
to your PATH to make things easier. - Install Node.js and npm. Also add
nodejs/
directory to your PATH. Install bower withnpm install -g bower
. - Download and Install OTP, and then install
RabbitMQ-server. You'll want to add
rabbitmq_server-3.5.6/sbin
to your PATH. - Download and install your SQL server of choice. MySQL is tested & works. Other than that, no guidance here, google will help :)
- Hop to the linux guide above for the rest of the steps. Make sure to replace paths with windows alternatives etc.
Run all commands in utuputki-webui directory.
- Create utuputki.conf in project root (or ~/.utuputki.conf or /etc/utuputki.conf) and edit it as necessary. See utuputki.conf.dist for help.
- Run database migrations with alembic:
alembic upgrade head
. - Create an admin user:
python -m utuputki.tools create_admin
. Admin user can upload any length videos and manage playback, while normal users will be limited in video duration and management options. - Create a new event:
python -m utuputki.tools create_event
. There can be multiple events, eg. "My Lanparty 2015", "New lan party 2016", etc. - Create a new player for the event
python -m utuputki.tools create_player
. A single event can have multiple players, for example if there are multiple screens. - Run the apps (see below). Enjoy!
A quick example below (edit as necessary). See rabbitmqctl man page and RabbitMQ manual for more instructions.
- Create a new user with a password:
sudo rabbitmqctl add_user utuputki utuputki
- Create a new virtual host:
sudo rabbitmqctl add_vhost utuputki
- Grant all rights to user on vhost:
sudo rabbitmqctl set_permissions -p utuputki utuputki ".*" ".*" ".*"
After installing mysql, this is how you set up a database:
- On commandline, run
mysql -u root -p
. This will take you to MySQL command prompt. - On mysql commandline, run
CREATE DATABASE utuputki2;
. - On mysql commandline, run
GRANT ALL PRIVILEGES ON utuputki2.* To '<username>'@'localhost' IDENTIFIED BY '<password>';
. Pick a good username and a secure password. Database name may be switched if you wish to do so. Remember to update the DATABASE_CONFIG setting in your utuputki.conf accordingly!.
It is generally a good idea to let a web server like Nginx serve all your video files and static content, freeing
tornado to handle only the sockjs connections. An example nginx configuration can be found at
deploy/utuputki-nginx.conf
.
Short guide to set up:
- Copy
deploy/utuputki-nginx.conf
to/etc/nginx/sites-available/utuputki.conf
- Make a link to the new conf file from sites-enabled:
ln -s /etc/nginx/sites-available/utuputki.conf /etc/nginx/sites-enabled/utuputki
- Make changed to the
/etc/nginx/sites-available/utuputki.conf
. See the comments for explanations. - Reload nginx (mechanism depends on your distribution).
Run all commands in utuputki-webui directory.
To start the apps:
python -m utuputki.webui.webui_main
to run the main www-uipython -m utuputki.downloader.downloader_main
to start the downloader daemon.
To run the tools (for creating the event and a player)
python -m utuputki.tools <command>