-
Notifications
You must be signed in to change notification settings - Fork 10
Development Environment Setup
-
Install Java JDK 7 and JDK 8 from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html and http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
-
Determine the Java home directory path (for JDK 8). Under Mac OS it's usually similar to
/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home, but run/usr/libexec/java_hometo be sure. Update your profile file to export your Java home directory env variable:nano ~/.profileAdd the line:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home -
Install maven. On Mac OS with homebrew:
brew install mvnorbrew install maven -
Install mysql. On Mac OS with homebrew:
brew install mysql mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
-
Make sure mysql is running. On Mac OS with homebrew:
brew tap homebrew/services brew services start mysql
-
Lets call our deployment folder
XCOLAB_BUNDLES_DIR -
Download tomcat 8 and unzip it in XCOLAB_BUNDLES_DIR. The tomcat root directory should be
XCOLAB_BUNDLES_DIR\apache-tomcat-8.0.33. Make sure you use that exact name (including the version). -
Remember to change permissions in tomcat's bin folder for executable flags to all scripts
$chmod +x *.sh -
Clone XCoLab GitHub repository: https://github.com/CCI-MIT/XCoLab. Lets call the directory to which the repository was downloaded
XCOLAB_SRC. -
Create a file at you user directory home with the name .xcolab.application.properties
-
Copy file
XCOLAB_SRC/microservices/services/src/main/resources/application.propertiesto~/.xcolab.application.propertiesand edit it to match your local configuration for mysql and your (fake) smtp server -
Copy file
XCOLAB_SRC/conf/deploy.propertiesto~/.xcolab.deploy.properties, edit that file and setliferay.auto.deploy.dirtoXCOLAB_BUNDLES_DIR/deploy(No need to create the deploy folder) (i.e.: liferay.auto.deploy.dir=/Users/Beatrice/projects/XCOLAB_BUNDLES_DIR/deploy Take care that you have no spaces around the equals-sign '=' or after "/deploy"). -
Now it's needed to put all "parent" artifacts in local maven repository, execute
mvn install -Nin following dirsXCOLAB_SRC XCOLAB_SRC/microservices XCOLAB_SRC/microservices/util -
Install utility libraries
cd XCOLAB_SRC/microservices/util/xcolab-utils mvn compile package install cd XCOLAB_SRC/microservices/util/service-utils mvn compile package install -
Now put all missing "parent" artifacts in local maven repository, execute
mvn install -Nin following dirsXCOLAB_SRC/microservices/clients XCOLAB_SRC/microservices/services -
Now we install entity utils dependencies by compiling with mvn clean compile package install clean :
XCOLAB_SRC/microservices/clients/emails-client XCOLAB_SRC/microservices/clients/members-client XCOLAB_SRC/microservices/clients/admin-client XCOLAB_SRC/microservices/clients/comment-client XCOLAB_SRC/microservices/clients/activities-client XCOLAB_SRC/microservices/clients/modeling-client XCOLAB_SRC/microservices/clients/contestproposal-client -
Now we install entity-utils itself with mvn clean compile package install clean:
XCOLAB_SRC/microservices/util/entity-utils/ -
Install the client libraries. Make sure you install the clients on the step above first, as other clients depend on them. You can use following bash script:
cd XCOLAB_SRC/microservices/clients for D in *; do if [ -d "${D}" ]; then cd $D pwd mvn clean compile package install clean cd .. fi done -
Create a database that uses "utf8mb4 collation" encoding and specify a user & password:
mysql -u root -p CREATE DATABASE xcolab CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -
Import newest database dump (ask Patrick for it):
cat dump.sql.bz2 | bunzip2 | mysql -u liferay -p xcolab -
Install all services. You can use following bash script, which is also located at
XCOLAB_SRC/deployServices.sh:cd XCOLAB_SRC/microservices/services for D in *-service; do if [ -d "${D}" ]; then cd $D pwd mvn clean compile package spring-boot:repackage cd .. fi done -
Start the microservice server:
XCOLAB_BUNDLES_DIR/apache-tomcat-8.0.33/bin/startup.sh
-
Follow the logs:
tail -f XCOLAB_BUNDLES_DIR/apache-tomcat-8.0.33/logs/catalina.out -
Compile the view layer with:
-
Start the microservice server:
sh XCOLAB_SRC/deployView.sh
-
After all microservices have started at the apache server, start the view:
cd XCOLAB_SRC/view/target java -Xmx4096M -Xms4096M -jar xcolab-view-1.0-SNAPSHOT.jar -
All should be ok just head to http://localhost:18082/ And the site will be there.