bigbluebutton-Github/record-and-playback/matterhorn/README

235 lines
7.2 KiB
Plaintext
Executable File

Matterhorn Webapp
=================
Go to the webapp folder, and follow these instructions
* The matterhorn webapp requires:
sudo apt-get install ruby1.8-dev
sudo apt-get install libxml2
sudo apt-get install libxml2-dev
sudo apt-get install libxslt-dev
* Install bundler and execute for get the required gems:
sudo gem install bundler
sudo bundle install
* Setting configuration:
- Edit the bigbluebutton.yml file according to your installation
## For development
* Run the following:
sudo thin -R config.ru start
## For production
* We need to create a run start level:
sudo thin install
sudo /usr/sbin/update-rc.d -f thin defaults
* Then, run the following commands:
sudo sh deploy.sh
sudo service thin start
## Proxy Pass with Nginx
* Edit the file /etc/nginx/sites-enabled/bigbluebutton:
# Bigbluebutton
location /matterhorn/ {
proxy_pass http://127.0.0.1:3000/;
proxy_redirect default;
}
===========
There is a ruby script in EC2 instance that:
1) Converts audio.wav to audiopresenter.ogg
2) Remove audio from flash videos, converting videopresenter.flv to justvideopresenter.flv and videopresentation.flv to justvideopresentation.flv.
3) Creates manifest.xml
4) Creates dublincore.xml (metadata is taken from strings declared in the script)
5) Creates a zipped package tosend.zip with
justvideopresenter.flv
justvideopresentation.flv
audiopresenter.ogg
manifest.xml
dublincore.xml
6) Compiles and executes a java class that sends the zipped package to Matterhorn server in the EC2 instance
Previously I installed:
vorbis tools => sudo apt-get install vorbis-tools
zip => sudo apt-get install zip
ruby => sudo apt-get install ruby irb rdoc
rubygems => sudo apt-get install rubygems
builder (a gem to generate xml) => gem install builder
streamio-ffmpeg (a gem to get media info) => gem install streamio-ffmpeg
To run the script:
cd /home/ubuntu/bnmaterial/prepareMediaRuby
ruby remix.rb audio.wav videopresenter.flv videopresentation.flv
Notes:
About parameters passed to the ruby script:
Audio file must be named <whatevername>.wav
Presenter Video must be named <whatever>presenter.flv
Presentation Video must be named <whatever>presentation.flv
If you don't want to run the ruby script and only want to send a ready zipped file to Matterhorn server :
cd /home/ubuntu/bnmaterial/
java ClientPreemptiveDigestAuthentication
It takes tosend.zip and sends it to Matterhorn Server
Then you can verify the uploaded file is in
http://ec2-50-17-155-248.compute-1.amazonaws.com:8080/engage/ui/index.html
Actually there are 3 objects in Media Gallery
--------------------------------------------
| MATTERHORN 1.1 INSTALLATION IN UBUNTU LUCID |
--------------------------------------------
MATTERHORN INSTALLATION DIRECTORY AND SOURCES
Create Matterhorn installation directory
sudo mkdir -p /opt/matterhorn
sudo chown $USER:$GROUPS /opt/matterhorn
Update pacakges and install subversion
sudo apt-get update
sudo apt-get install subversion
Checkout Matterhorn 1.1 source in Matterhorn directory
cd /opt/matterhorn
svn checkout http://opencast.jira.com/svn/MH/tags/1.1.0 /opt/matterhorn/1.1.0
JAVA
Update sources list
sudo nano /etc/apt/sources.list
Add these lines at the end:
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner
Save the file and update
sudo apt-get update
Install java
sudo apt-get install sun-java6-jdk
Set JAVA_HOME variable
echo "export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24/" >> ~/.bashrc
source ~/.bashrc
APACHE MAVEN
Install maven
sudo apt-get install maven2
Set maven opts
export MAVEN_OPTS='-Xms256m -Xmx960m -XX:PermSize=64m -XX:MaxPermSize=256m'
APACHE FELIX
Get the lastest release of Felix
sudo wget http://apache.deathculture.net//felix/org.apache.felix.main.distribution-3.2.2.tar.gz
Unarchive
sudo tar xvf org.apache.felix.main.distribution-3.2.2.tar.gz
Move and rename unarchived folder to Matterhorn installation directory
sudo mv felix-framework-3.2.2 /opt/matterhorn/felix
Configure
sudo mkdir /opt/matterhorn/felix/load
sudo cp -rf /opt/matterhorn/1.1.0/docs/felix/* /opt/matterhorn/felix/
BUILD MATTERHORN
Go to Matterhorn source directory, deploy
cd /opt/matterhorn/1.1.0/
sudo mvn clean install -DdeployTo=/opt/matterhorn/felix/matterhorn
THIRD PARTY TOOLS
Go to third party directory and run the script to install them
cd /opt/matterhorn/1.1.0/docs/scripts/3rd_party
sudo ./menu3p
Note: Here you have an interactive menu where you need to run only options 0,1 and 2
for Ubuntu.
EXPORT ENVIRONMENT VARIABLES
echo "export M2_REPO=/home/$USER/.m2/repository" >> ~/.bashrc
echo "export FELIX_HOME=/opt/matterhorn/felix" >> ~/.bashrc
echo "export JAVA_OPTS='-Xms1024m -Xmx1024m -XX:MaxPermSize=256m'" >> ~/.bashrc
source ~/.bashrc
CONFIGURE MATTERHORN PARAMETERS
sudo nano /opt/matterhorn/felix/conf/config.properties
Change server url "http://localhost" to your hostname
Example:
org.opencastproject.server.url=ec2-50-16-8-19.compute-1.amazonaws.com:8080
Change storage directory to the dir where you want to store processed files
Example:
org.opencastproject.storage.dir=/opt/matterhorn/opencast
FELIX HOME
Running Matterhorn could throw an error with FELIX_HOME so edit the script to run Matterhorn
sudo nano /opt/matterhorn/felix/bin/start_matterhorn.sh
Change line 10 to
FELIX="/opt/matterhorn/felix"
RUN MATTERHORN
sudo sh /opt/matterhorn/felix/bin/start_matterhorn.sh
|||||||||||||||||||||||||||||||||||
Ingesting to Matterhorn inbox
|||||||||||||||||||||||||||||||||||
----------------------------------
Notes:
----------------------------------
User in BBB server is firstuser
User in Matterhorn server is matt
BBB server ip: 192.168.1.42
Matterhorn server ip: 192.168.1.40
FELIX_HOME: /opt/matterhorn/felix
----------------------------------
Steps:
----------------------------------
In the BBB server:
1) Create a ssh key
ssh-keygen -t rsa
2)Ask for a passphrase. Press Enter
3)Ask for repeating the passphrase. Press Enter
The public key was generated in /home/firstuser/.ssh/
Its name is id_rsa.pub
In MH server:
4)Create a .ssh directory
sudo mkdir /home/matt/.ssh
5)Create authorized_keys file
sudo nano /home/matt/.ssh/authorized_keys
6) Copy the content from /home/firstuser/.ssh/id_rsa.pub in BBB server
To /home/matt/.ssh/authorized_keys in MH server
In BBB Server:
7)scp /path/to/zipped_file.zip matt@192.168.1.40:/opt/matterhorn/felix/inbox
The file is sent and ingested in Matterhorn
----------------------------------
About inbox ingestion:
----------------------------------
-By default inbox directory is $FELIX_HOME/inbox
-If you need to change inbox directory, change the parameter
felix.fileinstall.dir
in
/opt/matterhorn/1.1.0/docs/felix/load/org.apache.felix.fileinstall-inbox.cfg
-Zipped package is deleted after it is ingested in inbox dir
-If the zipped package is not a media package it is sent to the storage_dir/files/collection
where storage_dir is a parameter configured in $FELIX_HOME/conf/config.properties