Today, in this post, I'm gonna tell you how to configure Etherpad-lite in a server join with a LTI connector. That will allow you to create pads into your Sakai sites.
Install Etherpad-lite and the LTI connector on Centos 6.4
For this job you will need to install two services. First is the Etherpad-lite it self. It's powered by node.js technology and should be installed too.
The second service is the LTI connector. It will handle the LTI requests from a LMS like Sakai, Moodle, Canvas, ... and will launch Etherpad tool in your LMS site.
First of all, as root, you should install node.js and all dependencies needed by the two services. So, log in as root and install the needed packages:
yum -y groupinstall "Development Tools" yum -y install wget gzip subversion git-core curl python openssl-devel unzip java-1.6.0-openjdk.x86_64 ant
Then download node.js sources and compile them.
wget http://nodejs.org/dist/v0.10.13/node-v0.10.13.tar.gz tar xvfz node-v0.10.13.tar.gz
cd node-v0.10.13 ./configure make
That step can spend a lot of time. When finished install all on the system.
Now you can download etherpad-lite and configure it. First, for sercurity reasons, create a new user and log in.
adduser -m etherpad su - etherpad
Download the etherpad-lite code and update it.
git clone git://github.com/ether/etherpad-lite.git cd etherpad-lite git pull origin
Copy the configuration template and set it up.
cp settings.json.template settings.json
Modify the following parts.
... "editOnly" : true,
"requireSession" : true,
Uncomment "users" block and change passwords.
Now you can start the etherpad-lite for first time. Execute it from console. It will take some time on the first start.
You will notice that a new file exists 'APIKEY.txt'. That contains a key that let external applications connect with etherpad API. You will need that value later to allow LTI connector use the API to create and edit pads.
Note: If you get an error on startup, update again code again and start it.
Later, when all are configured and all dependencies installed, you can execute it as a background service if you want.
nohup bin/run.sh &
Install Basic LTI Connector for etherpadIt's time to install the LTI connector. We are going to install it on the etherpad's home so, if you exited "etherpad" user session, remember to log in again:
su - etherpad, and ensure you are in the home directory
Create a directory to store all necessary.
Download an old version of tomcat 5.5 . It could be installed on a newer Tomcat, but it would be harder to explain how to set it up.
chmod +x bin/*.sh
Edit .bashrc file from etherpad's home to include Java and Tomcat system required variables:
Add the following lines at the top, just after the # .bashrc
Save and execute
Now check out the LTI connector for etherpad. That connector provides the LTI integration to Etherpad Lite. It was designed and developed by Mark J. Norton of Nolaria Consulting
svn co https://source.sakaiproject.org/contrib/mnorton/etherpad-lti/
Create a file called build.properties and add the following line:
Compile with the command
Copy the needed libraries to the tomcat's common/lib directory.
cp lib/* ../apache-tomcat-5.5.36/common/lib/
Create a directory on tomcat to store the configuration, and copy it from the sample that exists in the source code
cp web/eplti.properties ../apache-tomcat-5.5.36/etherpad
Configure the connector editing the file eplti.properties you just copied:
Oauth LTI secret. It will be used in Sakai basic LTI tool as shared secret
Etherpad's API key. Fill it with the value you found in APIKEY.txt on etherpad-lite
api.key = ...
Set the the etherpad service URL and the administrator roles allowed to create and delete pads on a site:
Now, you can start the service:
Configure your sakai Basic LTI tool instanceAdd a Basic Lti Tool on a site
Press the edit button on the top right of the tool and provide the following values:
Remote Tool Url: http://your.host.name:8080/eplti
Remote Tool Key: admin
Remote Tool Secret: YOUR-ETHERPAD-LITE-LTI-SECRET
That's all, if you access to the tool as Instructor you will see an screen that allows you to create a new pads associated with this site. Enjoy it.
Set up this as a serviceIf you look to keep it as a service, you must write two scripts on /etc/init.d to allow system start and stop the service on boot.
You can follow the instructions on Setup etherpad-lite as a service, or you can download the one I created to set up my server here
Also, you can download my version of Apache Tomcat script to set it up as a service here
After that you can register them with command
chkconfig --add tomcat-ltiThen go to 'System services' and check the recent installed scripts.
chkconfig --add etherpad-lite-lti setup
Some references used to write that post that you would find useful.
How to install and run a node.js app on centos 6.4 64bit
Etherpad installation guide
Etherpad LTI Connector