-
Notifications
You must be signed in to change notification settings - Fork 3
Complete Installation Guide
These instructions assume you're starting with a new server. If you already have completed some of the steps, eg. already installed Java, feel free to skip those steps.
Example code provided for an Ubuntu server
-
Install Git
sudo apt-get install git -
Install Java (JDK)
sudo apt-get install default-jdk -
Set JAVA_HOME environment variable
To find out which Java options you have installed:
sudo update-alternatives --config javaThen set the JDK you want to the JAVA_HOME variable in /etc/environment
sudo vi /etc/environmentAdd the line
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"Check JAVA_HOME has been set using
echo $JAVA_HOME -
Install Maven
sudo apt-get install maven
-
Clone CE-Store
git clone https://github.com/ce-store/ce-store -
CD into CE-Store directory
cd ce-store -
Install CE-Store
mvn install -
Run CE-Store
mvn tomcat:runYou can run CE-Store in the background on an Ubuntu server using paranthesis:
(mvn tomcat:run &)CE-Store should be available on
<YOUR-SERVER>:8080/ce-store
Example code provided for an Ubuntu server
If you already have data hosted elsewhere you can skip to the last step and load it straight into the Engineering Panel using its URL.
-
Clone sample data from Science Library Data
git clone https://github.com/ce-store/sl-data.git -
Move the SL-Data CE folder into the CE-Store CE directory.
SL-Data CE is stored in
sl-data/WebContent/ceCE in the CE-Store is stored in
ce-store/src/main/webappYou will need to create a directory in the CE-Store webapp directory for the SL-Data to live
mkdir ce-store/src/main/webapp/sl-dataThen move the CE into the newly created folder
mv sl-data/WebContent/ce ce-store/src/main/webapp/sl-dataFinally we need to set the CE root so the store knows where to base the relative URLs off
vi ce-store/src/main/webapp/sl-data/ce/cmd/load_cached.cecmdAdd this line to the
load_cachedcommand file after the store reset command:perform set 'ce root' to '<YOUR_SERVER>:8080/ce-store/'.load_cached.cecmdshould look like this:perform reset store with starting uid '1'. perform set 'ce root' to '<YOUR_SERVER>:8080/ce-store/'. -- Load the models perform load sentences from url '/sl-data/ce/cmd/all_models.cecmd'. -- Load the generated facts perform load sentences from url '/sl-data/ce/cmd/all_facts_generated.cecmd'. -- (Run the rules) - Load the cached data perform load sentences from url '/sl-data/ce/cmd/all_cached_rules.cecmd'. -
Load the data into the to CE-Store
Go to the Engineering panel at (
YOUR_SERVER:8080/ce-store/ui)Click 'Add CE' in the left panel, under 'Add CE from URL' select 'Specify URL...'
A popup window should appear to specify the command file you want to load
Enter
./sl-data/ce/cmd/load_cached.cecmdand click 'Okay'It may take a while to load the data, but you should get a pop up saying:
Result of CE sentence loading: 66 commands executed 127503 valid sentencesIf you get a file not found error, try restarting the CE-Store
Example code provided for an Ubuntu server
- Install Node
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -sudo apt-get install -y nodejs
-
Clone Science Library
git clone https://github.com/ce-store/science-library -
Install dependencies using npm and bower
npm install sudo npm install -g bower sudo npm install -g grunt-cli sudo npm install -g forever bower install -
Update URL home and server endpoints in
app/services/urls.jsto your server's URLvi app/scripts/services/urls.jsIt should look like this:
angular.module('itapapersApp') .constant('urls', { home: '<YOUR_SERVER>:8080', server: '<YOUR_SERVER>:8080', ... -
Set environment to production
export NODE_ENV=production -
Build the production version of the Science Library
grunt -
Run the Science Library with Forever
forever start server.jsThe Science Library should be available on
<YOUR-SERVER>:3000To view running processes:
forever listTo stop running process:
forever stop <ID|UID|PID>