Skip to content

Commit

Permalink
documentation in markup
Browse files Browse the repository at this point in the history
  • Loading branch information
Markos Gogoulos committed Jul 19, 2013
1 parent b4d4f8c commit 9e9c668
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 40 deletions.
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -15,7 +15,7 @@ More info
Installation and migration
=========================

- For installation instructions see docs/INSTALL.txt
- For installation instructions see docs/INSTALL.rst
- For migration instructions see docs/MIGRATE.txt
- Code repository: **https://github.com/plumi/plumi.app**

Expand Down
1 change: 1 addition & 0 deletions docs/INSTALL.rst
94 changes: 55 additions & 39 deletions docs/INSTALL.txt
@@ -1,50 +1,62 @@
Installation
============

This is the most up to date Plumi installation guide. A user/admin manual can be found at
http://en.flossmanuals.net/Plumi/Introduction
**http://en.flossmanuals.net/Plumi/Introduction**

Environment
===========

We use and test Plumi mainly in Debian/Ubuntu, using Python 2.7

Quick installation
==================

This assumes you are on ubuntu/debian and have python 2.7

step 1: install the necessary packages
#apt-get install build-essential pkg-config git-core python-dev libjpeg62-dev zlib1g-dev libxslt1-dev groff-base
step 1: install the necessary packages

#apt-get install build-essential pkg-config git-core python-dev libjpeg62-dev zlib1g-dev libxslt1-dev groff-base

step 2: get plumi from github and ceate a virtualenv environment

$git clone https://github.com/plumi/plumi.app/
$cd plumi.app
~/plumi.app$virtualenv .

step 3: edit site.cfg and change users, if necessary (ftp user, cache user, etc)

step 2: get plumi from github and ceate a virtualenv environment
$git clone https://github.com/plumi/plumi.app/
$cd plumi.app
~/plumi.app$virtualenv .
$vi site.cfg

step 3: edit site.cfg and change users, if necessary (ftp user, cache user, etc)
step 4: run the buildout

step 4: run the buildout
~/plumi.app$./bin/python bootstrap.py && ./bin/buildout -v
~/plumi.app$./bin/python bootstrap.py && ./bin/buildout -v

step 5: run the buildout for ffmpeg
~/plumi.app$cd ffmpeg
~/plumi.app/ffmpeg$../bin/python bootstrap.py && ./bin/buildout -vN
step 5: run the buildout for ffmpeg

step 6: start supervisord as root, this will start all services as users defined on site.cfg
#./bin/supervisord
~/plumi.app$cd ffmpeg
~/plumi.app/ffmpeg$../bin/python bootstrap.py && ./bin/buildout -vN

step 6: start supervisord as root, this will start all services as users defined on site.cfg

#./bin/supervisord

Now check that services have started

root@userx:/home/user/plumi# ./bin/supervisorctl status
cache RUNNING pid 22650, uptime 0:21:29
nginx RUNNING pid 22651, uptime 0:21:29
ploneftp RUNNING pid 22649, uptime 0:21:29
transcodedaemon RUNNING pid 22612 uptime 0:21:29
uwsgi RUNNING pid 22646, uptime 0:21:29
worker RUNNING pid 22647, uptime 0:21:29
zeo RUNNING pid 22645, uptime 0:21:29
root@userx:/home/user/plumi# ./bin/supervisorctl status
cache RUNNING pid 22650, uptime 0:21:29
nginx RUNNING pid 22651, uptime 0:21:29
ploneftp RUNNING pid 22649, uptime 0:21:29
transcodedaemon RUNNING pid 22612 uptime 0:21:29
uwsgi RUNNING pid 22646, uptime 0:21:29
worker RUNNING pid 22647, uptime 0:21:29
zeo RUNNING pid 22645, uptime 0:21:29


I you start plumi as normal user, without changing the default ports, it will not be able to load nginx to port 80

System dependencies
================
===================

* install gcc/g++ dev tools
e.g. sudo apt-get install build-essential pkg-config
Expand All @@ -62,18 +74,20 @@ System dependencies

Creating a Python Virtual Environment
=====================================

If you are running other applications and web sites on your server,
it may be worth while creating a python virtual environment for developing
in - this can avoid problems between python packages installed by your
operating system and those installed by easy_install.
You will need to have the virtualenv package installed first - in Debian and
Ubuntu systems you can apt-get install python-virtualenv, then:

virtualenv --no-site-packages plumi.app
virtualenv --no-site-packages plumi.app


Initial configuration
======================

This step is optional for testing/development builds. However, even in those
cases you may wish to customize some of the options inside site.cfg, especially
if ports 8080, 8888, 8021, 8000, 8100 or 8890 are already used by other apps in
Expand Down Expand Up @@ -103,7 +117,7 @@ At the very least you should change the following:
If you decided not to change the default user for zope, zeo and transcode in
site.cfg make sure that it exists in your system. If not, add it:

sudo useradd zope
sudo useradd zope


Install Plumi 4.x
Expand All @@ -113,15 +127,15 @@ Once you're ready with the initial configuration execute the following two
commands. Do it as your regular user for testing/dev builds but make sure you
are root for production builds:

cd ffmpeg
python bootstrap.py (or ../bin/python bootstrap.py if you use virtualenv)
./bin/buildout
cd ffmpeg
python bootstrap.py (or ../bin/python bootstrap.py if you use virtualenv)
./bin/buildout

After the ffmpeg buildout is finished you should run the plumi buildout:

cd ..
python bootstrap.py (or ./bin/python bootstrap.py if you use virtualenv)
./bin/buildout
cd ..
python bootstrap.py (or ./bin/python bootstrap.py if you use virtualenv)
./bin/buildout

That should take some time, so feel free to get some cofee or fresh air while
buildout is downloading, compiling and installing dependencies (Zope, Plone,
Expand All @@ -139,11 +153,11 @@ server in production builds.

Start supervisor like this:

./bin/supervisord
./bin/supervisord

Confirm that zeo, uwsgi and transcodedaemon are up and running:

./bin/supevisorctl status
./bin/supevisorctl status

If you ran buildout as a regular (non root) user and you did not change the
default ports for nginx and ploneftp in site.cfg (www-address & plumiftp-address
Expand All @@ -155,7 +169,7 @@ web server.

Run the plumisite command to create a new Plumi site

./bin/plumisite
./bin/plumisite

Alternatively, if you can create the Plumi site through the web, using the ZMI.

Expand All @@ -167,9 +181,9 @@ If you want to do some development, you can use Paster instead of uwsgi
since the latter is more suited for production. Stop uwsgi and start paster
as shown below:

./bin/supervisorctl stop uwsgi
./bin/supervisorctl stop uwsgi

./bin/paster serve development.ini --reload
./bin/paster serve development.ini --reload

The --reload option will consume more resources but it's very handy for dev
since it will automatically reload any python modules that you edit.
Expand All @@ -184,17 +198,18 @@ Add a new user to your Plumi site for testing and start publishing videos!

In order to shutdown all Plumi related services, use the following command:

./bin/supervisorctl shutdown
./bin/supervisorctl shutdown

If you want to ensure that Plumi will start automatically whenever your server
is turned on, add the following lines to your /etc/rc.local file replacing
PATH_TO_PLUMI with the actual absolute path of your plumi setup:

PATH_TO_PLUMI/bin/supervisord
PATH_TO_PLUMI/bin/supervisord


Configuring Video statistics
=========================================

To record and show video views and downloads you'll need a working Piwik
installation. Add the tracking tag in Site-Setup->Site and fill the form in
Site-Setup-> Piwik Settings with the piwik url, the site id on piwik and the
Expand All @@ -204,6 +219,7 @@ anonymous instead of the API key).

Configuring subtitles and downloads
==========================================

By default, subtitle support through Universal Subtitles is enabled. You can
disable it through Site Setup->Transcode Settings. You can also disable
downloads through embedded videos there.

0 comments on commit 9e9c668

Please sign in to comment.