Browse files

update install docs

svn path=/plumi.app/trunk/; revision=228627
  • Loading branch information...
1 parent 4be3bd9 commit 49ddc0f759ecfa324b81679fcf5a648b2d478ed7 @d-mo d-mo committed Dec 9, 2010
Showing with 38 additions and 264 deletions.
  1. +0 −1 base.cfg
  2. +0 −40 build.cfg
  3. +38 −223 docs/INSTALL.txt
View
1 base.cfg
@@ -77,7 +77,6 @@ find-links =
eggs =
collective.transcode.recipe
collective.transcode.daemon
- Scons
# Project-specific version pins.
View
40 build.cfg
@@ -143,14 +143,6 @@ configure-options =
# --enable-libvpx --enable-libxvid --enable-x11grab --enable-libopencore-amrwb \
# --enable-libopencore-amrnb
-[scons]
-recipe = repoze.recipe.egg:scripts
-eggs = SCons
-scripts = scons
-entry-points =
- scons=SCons.Script:main
-extra-paths = ${buildout:eggs-directory}/scons-2.0.1-py2.6.egg/scons-2.0.1
-
[ffmpeg2theora-build]
recipe = iw.recipe.cmd
on_install=true
@@ -223,23 +215,6 @@ target = ${build:target}
# Configure front-end web server
##############################################################################
-#[apachebuild]
-#recipe = plone.recipe.apache:build
-#url = http://archive.apache.org/dist/httpd/httpd-2.2.14.tar.gz
-
-#[apacheconf]
-#recipe = plone.recipe.apache:config
-#bind = 80
-#backends = ${site:apache_backends}
-#zope2_vhm_map = ${site:apache_zope2_vhm_map}
-#extras = NameVirtualHost *:80
-
-#[apachetranscodeconf]
-#recipe = plone.recipe.apache:config
-#bind = 80
-#backends = ${site:transcode_backends}
-#resources = transcoded:${buildout:directory}/transcoded
-
[main-config]
recipe = collective.recipe.template
input = ${buildout:directory}/production/main.conf.template
@@ -264,15 +239,6 @@ user = ${site:cache-user}
config = ${buildout:directory}/production/cache.conf
##############################################################################
-# Configure transforming web server
-##############################################################################
-
-#[transform-config]
-#recipe = collective.recipe.template
-#input = ${buildout:directory}/production/transform.conf.template
-#output = ${buildout:directory}/production/transform.conf
-
-##############################################################################
# Configure load balancer
##############################################################################
@@ -319,7 +285,6 @@ output = ${buildout:directory}/production/logrotate.conf
recipe = zc.recipe.egg
eggs =
${instance-settings:eggs}
- SCons
interpreter = zopepy
scripts = zopepy
@@ -334,11 +299,6 @@ egg = lxml
libxml2-url = http://xmlsoft.org/sources/libxml2-2.7.7.tar.gz
libxslt-url = http://xmlsoft.org/sources/libxslt-1.1.26.tar.gz
-[diazo]
-recipe = zc.recipe.egg
-eggs = diazo
-
-
##############################################################################
# Backups
##############################################################################
View
261 docs/INSTALL.txt
@@ -1,273 +1,88 @@
Before you start
================
- * install gcc/g++ dev tools (e.g. sudo apt-get install build-essential)
- * install yasm (e.g. sudo apt-get install yasm)
+ * install gcc/g++ dev tools and yasm (e.g. sudo apt-get install build-essential yasm)
+ * install subversion (e.g. sudo apt-get install subversion)
* install python2.6 and header files (e.g. sudo apt-get install python2.6-dev)
-
+ * install libjpeg and zlib header files (e.g. sudo apt-get install libjpeg62-dev zlib1g-dev)
Install a Plumi 4.x development instance
========================================
-If you simply want to evaluate Plumi or to contribute in its development, then you don't need a fully fledged production build with caching, multiple load balanced zope instances, etc. A more lightweight buildout is provided. Before runing buildout you may want to customize some of the options inside site.cfg. Then do the following:
+If you simply want to evaluate or develop Plumi, then you don't need a fully fledged production build with caching, multiple load balanced zope instances, etc. A much more lightweight buildout is provided instead.
+
+Before runing buildout you may wish to customize some of the options inside site.cfg. Once you're ready do the following:
python2.6 bootstrap.py -c devel.cfg
./bin/buildout -c devel.cfg
-That should take some time. If all goes well your Plumi dev instance will be ready after that point.
+That should take some time, so feel free to get some cofee or fresh air while buildout is downloading, installing and compiling dependencies (Zope, Plone, ffmpeg, etc). If all goes well your Plumi dev instance will be ready after that point.
Supervisor will be managing the ZEO server and the transcodedaemon. Start supervisor like this:
./bin/supervisord
-To see if zeo and transcodedaemon are up use:
+Confirm that zeo and transcodedaemon are up and running:
./bin/supevisorctl status
Now start your dev instance in the foreground
./bin/instance-debug fg
-You should be able to access your instance at http://localhost:8080 unless you changed the default host and port in site.cfg. Login using the credentials in site.cfg (admin:admin by default) and create a new Plone site. Enter a site id ('Plone' by default) and create the site without selecting any setup profiles.
+You should be able to access your instance at http://localhost:8080 unless you changed the default host and port in site.cfg. Create a new Plone site using the credentials in site.cfg (admin:admin by default, to change them after the initial setup go to http://localhost:8080/acl_users/users/manage_users ). Enter a site id ('Plone' by default) and create the site without selecting any add-ons at this point.
+Once your Plone site has been created, go to the Add-ons configuration section (e.g. http://localhost:8080/Plone/prefs_install_products_form ) and install the Plumi 4.x add-on. You may also want to install the default Plumi skin (check it out at http://demo.plumi.org). If you don't, your site will be based on the default Plone 4 theme (Sunburst).
-Installing Plumi 4.x for production
-===================================
+If you have changed the default port, hostname, or the secret encryption key for transcode daemon in site.cfg, go to the transcode settings panel (e.g. http://localhost:8080/Plone/@@transcode-controlpanel ) and enter the same host, port and key there.
-This guide assumes that you have sudo access. This is necessary in order to start nginx at port 80, ploneftp at port 21 and for buildout to automatically set the right file permissions for you. Supervisor will be managing all the different services and each service will be limited to the permissions of its effective system user for maximum security. This setup includes all you need in order to run Plumi on a GNU/Linux server for production.
+Your dev instance should be ready for testing at this point. Add a new user to your Plumi site for testing (the admin user may not have the correct folders created for them, as this user is created before the Plumi site is generated). Log out and log back in as your new user. You should be able to start publishing videos which should be automatically transcoded to web friendly formats.
-If you don't have sudo access, you have the option of running all the processes as a single user. Edit site.cfg and set your username in the following fields: supervisor-user, ftp-user, www-user, transcode-user, cache-user, balancer-user, zeo-user and zope-user. Then set the ports in the fields www-address and plumiftp-address to values higher than 1024 (port numbers under 1024 can only be reserved by root)
+When you're done, you can press Ctrl-C to stop your dev instance running in the foreground. In order to shutdown zeo, transcodedaemon and supervisor use the command:
-If you want to run plumi and you need caching and multiple load balanced zope instances, a production buildout is provided to make your life easier. Before running buildout, you may want to customize the options inside site.cfg.
-
- python2.6 bootstrap.py -c production.cfg
- ./bin/buildout -c production.cfg
-
-That should take some time. If all goes well, your Plumi production instance will be ready.
-
-Supervisor should be installed and will be managing the ZEO server, the transcodedaemon, the ftp server, your instances and the load balancer.. Start supervisor like this:
-
- sudo ./bin/supervisord
-
-Supervisor will start all the software as root and then drop all priviledges and run each software as the user required (www-data for nginx, proxy for the ftp server, etc)
-
-To see if what supervisord controls and which services have started:
-
- ./bin/supervisorctl status
-
-A debug insance is also created during the production buildout. If you need to test, debug and catch errors on your production environment you can start it with:
-
- ./bin/instance-debug fg
-
-3.x install guide. To be replaced
-=================================
-These instructions can be used for installing Plumi 3.x on a Linux server using an Apache2 web server.
-
-To install Plumi 3.0 on FreeBSD you can visit this guide: http://lists.plumi.org/pipermail/discuss/2010-March/002255.html
-
-Although Plumi is more or less untested on other environments, it has been reported working without issues on MacOS X.
-
-============================= Requirements ===========================================
-
-A) Requirements
-
- * Linux server machine with these system requirements and Apache2 web server & domain set up in which to run your Plumi site.
- * Shell access to server and an account with permissions over domain's directory.
- * The server will need to have:
- o GCC development tools.
- o make.
- o Subversion version control system (svn).
- o Python 2.4
- o ffmpeg with h264 support and ffmpeg2theora
- * Plumi 3 is built on Plone 3 which requires Python 2.4 to operate correctly. It will be installed as part of the installation detailed in this chapter.
-
-B) Two Domains Required
-
-Plumi 3 requires two domains to operate although they can point to the same server:
-
- * The Plumi Site (eg: example.org)
- * Plumi Transcode Daemon and transcoded files (videos.example.org)
-
-Please ensure that these domains are set up in advance of your site installation and have had sufficient time to propagate through the Internet (eg: 24-48 hours).
-
-NOTE: If you server is not going to be accessed from the Internet, you still need to set up the domains within your private network (eg: internal DNS server, /etc/hosts files on all workstations, etc).
-
-C) Setting up Python & video codecs
-
-The following instructions apply for Ubuntu. If you are using another distribution you need to adjust accordingly.
-
-The video codecs (ffmpeg with h264 support) are not part of the standard Ubuntu repositories and you will need use the following command to add the Medibuntu repository to your system:
-
-sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update
-
-Once your system is configured to use the Medibuntu repository you can install Python and the codecs by running this command:
-
-apt-get install python2.4-dev python2.4-setuptools build-essential libavcodec-unstripped-52 ffmpeg ffmpeg2theora
-
-D) 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 -p /usr/bin/python2.4 --no-site-packages src/pyvirt
-. src/pyvirt/bin/activate
-$ easy_install http://dist.repoze.org/PIL-1.1.6.tar.gz
-
-This will install the virtual env into src/pyvirt, activate it and then install the (required) Python Imaging Library into the virtual env.
-
-
-================= Plumi installation =======================
-
-1) Plumi can be downloaded and installed using SVN or as a packaged tarball.
-
-1a) Download Plumi from SVN
-
-Plumi is available from the Plone SVN server. To download version 3.0 of Plumi, run the following command:
+ ./bin/supervisorctl shutdown
-svn co https://svn.plone.org/svn/collective/plumi.buildout/tags/3.0/ target_folder_name
-1b) Download Plumi as a Packaged Release
-
-Plumi can be downloaded as a fully packaged release in an archive using the tar format. Only tagged versions are available this way, not the current trunk. To download a packaged release, follow the instructions below:
-
-mkdir /opt/plumi
-wget http://plone.org/products/plumi/releases/3.0/plumi3.tar.gz
-tar -xzvf plumi3.tgz
-cd plumi-3
-
-2) Set Site Configuration Information
-
-Configure the specific information about this Plumi installation, including:
-
- * Change all references to hostname & email address
- * Check the ports and change them if the defaults are already in use
- * Set the effective user to the name of the user account that Zope is to be installed under (NOTE: This user should already be set up - the Plumi installation script will not create it)
- * Set the default Zope admin user & password if you want them to be different (recommended)
-
-NOTE: It is best to use the default 127.0.0.1 URLs unless you are putting the transcoder on a separate machine
-
-Edit the site.cfg file and provide the following details:
-
-# site-specific settings for a Plumi based site
-
-[site]
-# start with offbeat password, and hint that it should be made unique in-site:
-user = admin:admin <-Default Zope admin user & password
-effective-user = zope <-User that Zope will be installed under
-http-address = 127.0.0.1:8080 <-Internal address of the Zope server
-ftp-address = 127.0.0.1:8021 <-Internal address of the Zope FTP server
-transcode_host = 127.0.0.1 <-Internal address of the transcoder
-transcode_port = 8888 <-Port the transcoder will listen on
-videofolder = transcoded <-Directory where videos will be placed
-
-#squid configs
-squid_address = 127.0.0.1:4128
-squid_backend = ${site:http-address}
-squid_hostname = example.org <-Replace this with your domain name
-squid_email = plumi@example.org <-Replace this with a valid email address
-
-#apache configs
-apache_backends = example.org:${site:squid_address}
-transcode_backends = videos.example.org:${site:transcode_host}:${site:transcode_port}
-apache_zope2_vhm_map = example.org:/Plone <-Replace this with your domain and Plumi site name
-
-3) Run the buildout then setup & configure Plumi
-
-# Prepare to run the buildout (bootstrap is a Python script that creates a number of directories and scripts based on the buildout configuration file, and downloads the latest version of the zc.buildout egg).
-
-$ python2.4 bootstrap.py
-
-# Run the buildout (in verbose mode). This will take between 5 to 10 minutes, possibly more depending on your server's configuration & load. Sit down, grab a coffee and wait till it finishes!
-
-$ ./bin/buildout -v
-
-# Now start Zope/Plone and the other applications in the background (NOTE: This assumes you are running Apache & Squid as supplied by the Plumi Buildout)
-
-./bin/instance start
-./bin/transcodedaemon start
-./bin/squid-instance
-sudo ./bin/apachectl start
-
-# If your server already has Apache & Squid set up on it (eg: for hosting other, non-Plumi sites), copy the files below into the list of available Apache sites and enable them (remember to replace example.org with your site's domain) and then restart Apache:
-
-cp ./parts/apacheconf/conf.d/virtual_example.org.conf /etc/apache2/sites-available
-cp ./parts/apachetranscodeconf/conf.d/virtual_video.example.org.conf /etc/apache2/sites-available
-/etc/init.d/apache2 restart
-
-# Once the instance is running, go to the Zope Management Interface (ZMI).
-http://www.example.org:8080/manage
-
-If you've used a non-standard port for Zope, replace the 8080 in the URL above with the port you have specified when configuring the buildout.
-
-# Log in to the ZMI using the admin login details you specified in site.cfg (eg: username: admin, password: admin). If you want to change the admin user's ZMI password once logged in, navigate to acl_users -> users -> password.
-
-# Add a Plone site or instance in the ZMI.
-
-Click “Root Folder” in the left-hand sidebar. Choose Plone site from the Select type to add... drop-down menu and click Add.
-
-Enter the ID, Name and Description, e.g. ID "plumi" and Name "Plumi Site". Click Add Plone Site.
-
-# Visit your new plone site by entering this URL: http://www.example.org:8080/plumi
-
-If you've used a non-standard port for Zope, replace the 8080 in the URL above with the port you have specified when configuring the buildout.
-
-# Click site setup in the top right corner. Click Add/Remove Products and install the Plumi application setup product.
-
-Wait a few minutes for your Plumi site to install. When it is done, the page will reload and you should see a freshly installed Plumi site :)
-
-# Add a new user to your Plumi site for testing (the admin user may not have the correct folders created for them, as this user is created before the Plumi site is generated). Log out and log back in as your new user.
-
-# Try publishing a video in your new Plumi site (logged in as this new testing user).
-
-# Check the video after it has uploaded to see if it has been created and transcoded correctly.
-
-4) Install PlumiFTP (optional)
-
-An optional addition to Plumi is the PlumiFTP module. This provides an FTP service that monitors port 21 and intterfaces with the Zope FTP service. It is not essential for the operatoin of Plumi.
-
-To install PlumiFTP, run the following command
+Installing Plumi 4.x for production
+===================================
-sudo easy_install-2.4 plumiftp
+This guide assumes that you have sudo/root access. This is necessary in order to start the nginx web server at port 80, ploneftp at port 21 and for buildout to automatically set the right file permissions for you. Supervisor will be managing all the different services and each service will be limited to the permissions of its effective system user for maximum security. This setup includes all you need in order to run Plumi on a GNU/Linux server for production.
-Once installed, run the following commands to set up the configuration files
+If you don't have sudo access, you have the option of running all the processes as a single user. Edit site.cfg and set your username in the following fields: supervisor-user, ftp-user, www-user, transcode-user, cache-user, balancer-user, zeo-user and zope-user. Then set the ports in the fields www-address and plumiftp-address to values higher than 1024 (port numbers under 1024 can only be reserved by processes with root privileges).
-cp /usr/lib/python2.4/site-packages/plumiftp-0.4-py2.4.egg/plumiftp/plumiftp.cfg /etc
-cp /usr/lib/python2.4/site-packages/plumiftp-0.4-py2.4.egg/plumiftp/plumiftp.initscript /etc/init.d/plumiftp
-chmod +x /etc/init.d/plumiftp
+You should also have 2 different hostnames available, one for your Plumi site (e.g. testing.plumi.org) and another for the transcoding server (e.g. videos.testing.plumi.org), both pointing to your public ip address. You could also install the transcoding server in a different machine or even have multiple transcoding servers with load balancing, but this setup will not be covered in this guide. Please ensure that these hostnames are set up in advance of your site installation and have had sufficient time to propagate through the Internet (eg: 24-48 hours). If you server is not going to be accessed from the Internet, you still need to set up the domains within your private network (eg: internal DNS server, /etc/hosts files on all workstations, etc).
-Now you need to edit the /etc/plumiftp.cfg file to configure PlumiFTP as required. The values you can set are:
+
+Before running buildout, should customize the options inside site.cfg. At the very least you should change the following:
- * TmpDir Temporary storage for files as they are being uploaded
- * ZopeFTPServerAddr The URL to the Zope FTP server (be st left as localhost if possible)
- * ZopeFTPServerPort The port your Zope FTP server is listening on
- * ZopePathString Change plumi-id to the ID of your plumi site
- * RealFTP values Set the URL, port, "hello" and "goodbye" messages that PlumiFTP will use when providing the FTP service
+ * secret: a shared secret key for encrypted communication between Plumi and transcodedaemon. Just enter a random string.
+ * www-server-name: the hostname of your Plumi site (e.g. www.engagemedia.org)
+ * www-videoserver-name: the hostname of your transcoder & videoserver (e.g. videos.engagemedia.org)
-Once you have completed editing the configuration file, use the following command to start PlumiFTP:
+Once you're done
-/etc/init.d/plumiftp start
+ python2.6 bootstrap.py -c production.cfg
+ ./bin/buildout -c production.cfg
-Now you can test that PlumiFTPis running by using telnet to connect to your site on the RealFTP URL & port. You should see the "hello" message you set up in /etc/plumiftp.cfg:
+That should take some time. If all goes well, your production instance will be ready to start.
-telnet example.org 21
+Supervisor should be installed and will be managing the ZEO server, transcodedaemon, the ftp server, your instances and the load balancer.. Start supervisor like this:
-For the current version of PlumiFTP, you should also see the following message:
+ sudo ./bin/supervisord
-220 pyftpdlib 0.5.2 ready
+Supervisor will start all the software as root and then drop all priviledges and run each software as the user required (www-data for nginx, proxy for the ftp server, etc)
-Future versions of PlumFTP will show a different version number.
+Confirm that all the services have been started:
-5) Configuring Plumi to start automatically
+ ./bin/supervisorctl status
-To ensure that Plumi will start automatically whenever your server is turned on, add the following lines to your /etc/rc.local file:
+A debug instance is also created during the production buildout but not started by default. If you need to test, debug and catch errors on your production environment you can start it in the foreground:
-./bin/instance start
-./bin/squid-instance
-su zope -c './bin/transcodedaunemon start'
-./bin/apachectl start
+ ./bin/instance-debug fg
-NOTE: Replace the "zope" in "su zope -c" with the name of the user you installed Plumi under (the "effective-user" from site.cfg)
+Add a new user to your Plumi site for testing (the admin user may not have the correct folders created for them, as this user is created before the Plumi site is generated). Log out and log back in as your new user.
-if you are running PlumiFTP on your site, you will also need to add the following line:
-/etc/init.d/plumiftp start
+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

0 comments on commit 49ddc0f

Please sign in to comment.