Valamis is a powerful open source learning solution which gives you a collection of tools to construct various e-learning sites to serve different kind of needs. As a simplified example: you could create a site, where users with teacher role can create courses including lessons and quizes, and users with student role can attend these courses and earn certificates. If you would like to know more about the product itself, I suggest you to visit its site for detailed information.
Valamis runs on Liferay and up until recently the CE version was available from the Liferay Marketplace. However, from version 2.2 upwards, it is only available from GitHub as a source code. The aim of this article is to help brave developers on their journey of setting up a working Valamis environment from that code. I will explain what you should do, how and in what order. In the end, you will have a working Valamis instance.
Keep in mind that many paths lead to that destination. I will describe only one in detail, but you may get the correct directions even if you don't follow it precisely. Let's state upfront that my operation system is Ubuntu 14.04, so if you happen to use windows or mac, you may have to look up the exact commands for yourself.
Installing the supporting tools.
These are the collection of items that you must need in order to succeed on your journey.
Java Development kit.
This one is quite obvious and if you have ever worked with Liferay, you probably have it already. Since Liferay doesn't have an official support for Java 8, Valamis doesn't have either. You can experience with it, but if you want play safe I suggest the oracle version of Java 7.
Here is an easy way to install it from the command line on Ubuntu, but on the Oracle's website, you can find versions for all kinds of operation systems.
Validate your installation with java -version.
You should see something like this:
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
SBT
This is a commonly used build tool for projects written in the wonderful language of Scala, such as Valamis. You can find detailed instruction about its installation here.
Validate your installation with sbt sbtVersion
You will see several lines, but among them, you should see this:
[info] 0.13.8
After you have installed SBT, you should configure it in order to access some repositories that you will need during the later builds. Find the SBT's folder (on Ubuntu, it is ~/.sbt) and create a file named repositories with the following content:
[repositories]
local
typesafe-snapshots: https://repo.typesafe.com/typesafe/snapshots/
typesafe-releases: https://repo.typesafe.com/typesafe/releases/
Setting up local Liferay enviroment.
I guess this won't need much explanation, but I'll roughly go through it.
Download Liferay CE
The latest release can be found from its website. Valamis should support the latest version, but you might want make sure before continuing. Check the supported version here.Set up a database
Probably everybody has a good old way to do this. I use PostgreSQL on Ubuntu, so I just type in these two lines:
sudo -u postgres createuser -SPRD "username"
sudo -u postgres createdb --owner "username" "databasename"Note: If you don't have any database system installed, but you are using Ubuntu, type in this to install PostgreSQL:sudo apt-get install postgresql postgresql-contribIf you are really into installing, you might as well install pgAdmin III, a useful GUI tool for your new PostgreSQL:
sudo apt-get install pgadmin3Unpack your Liferay and configure the webserver.
Valamis uses a lot of memory and PermGen space, so I recommend setting their limit to a high enough level. The default tomcat settings are not enough. Go to theliferay-xxx/tomcat-xxx/binfolder, and modify thesetenv.sh(orsetenv.bat, if you use windows) so the following part will look like this:Xmx2048m -XX:MaxPermSize=512mIf you use other webserver, check its default settings and increase it, if needed.Start your Liferay
If you are in the tomcat folder, you could type in the following line:bin/startup.sh && tail -f logs/catalina.outThis will start the Liferay and monitors the server-log afterwards. When the browser opens with the start-up page, don't forget to configure your database there.
Getting the Valamis source code
- GitHub page: https://github.com/arcusys/Valamis
- git clone url: https://github.com/arcusys/Valamis.git
- zip download: https://github.com/arcusys/Valamis/archive/master.zip
- GitHub page: https://github.com/arcusys/valamis-lrs
- git clone url: https://github.com/arcusys/valamis-lrs.git
- zip download: https://github.com/arcusys/valamis-lrs/archive/master.zip
git clone https://github.com/arcusys/Valamis.gitgit clone https://github.com/arcusys/valamis-lrs.git
Building and deploying the portlets
Valamis folder and build the project with SBT. You could type in sbt tasks to see the available tasks for the project, but for now sbt clean package will do the job.
...Valamis/learn-portlet/target/scala-2.10/learn-portlet.war...Valamis/valamis-hook/target/scala-2.10/learn-liferay620-hook.war.
Building and deploying the Learning Record Store
valamis-lrs folder, and execute the sbt clean package, than copy the created . ..valamis-lrs-liferay/target/scala-2.10/valamis-lrs-portlet.war file into your Liferay's deploy folder.


