Skip to content

Installing Clotho 3.0

Jerome Wilfred G. Andaya Jr edited this page May 23, 2017 · 37 revisions

For command-by-command instructions to install on Ubuntu 14.04 (Trusty), see https://github.com/CIDARLAB/clotho3/wiki/Installing-on-Ubuntu-Trusty-14.04

For Windows installation, see https://github.com/CIDARLAB/clotho3/wiki/Installing-on-Windows

0. Install dependencies

We suggest using an IDE that supports Maven, such as NetBeans or Eclipse.

See also: Installing Dependencies

1. Get the source code

git clone https://github.com/CIDARLAB/clotho3.git

Clones the repository into a new directory clotho3 in your current directory.

2. Start MongoDB

If MongoDB is not already running, start it with mongod.

If you are working on a Linux operating system, and run into an error while starting MongoDB : "dbpath (/data/db) does not exist, terminating", try the following commands

sudo mkdir -p /data/db/

sudo chown `id -u` /data/db

sudo mongod

3. Build the back end

mvn clean install

Builds and tests the back end. Maven automatically downloads dependencies.

4. Create a .clothoconfig file in your home directory

On Ubuntu, your home directory is usually : /home/-yourusernamehere-
On Windows, it looks like : C:\Users-yourusernamehere-

On Linux-based systems you can check your home variable with the command :

  • echo $HOME

For the production server, unless specified as a command line argument you must have one field to denote "keystorepass" to be used for SSL. The default password for your java cacert is "changeit". If you want to use the prebuilt front-end (or any front-end), you will also need a "clientdirectory" field.

Basic .clothoconfig:

keystorepass = changeit
clientdirectory = clotho3-web/dist

For the test server, the presence of a .clothoconfig file is optional.

5. Run the server

If MongoDB is not already running, start it with mongod.

If you are working on a Linux operating system, and run into an error while starting MongoDB : "dbpath (/data/db) does not exist, terminating", try the following commands

sudo mkdir -p /data/db/

sudo chown `id -u` /data/db

sudo mongod

Choose one of the options below.

Option A: Production server

mvn process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec "-Dexec.args=-classpath %classpath org.clothocad.core.ClothoStarter" -Dexec.executable=java

Option B: Test server

mvn -Dexec.args="-Dloglevel=OFF -classpath %classpath org.clothocad.core.util.ClothoTestEnvironment -clientdirectory clotho3-web/dist" \
    -Dexec.executable=java \
    -Dexec.classpathScope=test \
    process-classes \
    org.codehaus.mojo:exec-maven-plugin:1.2.1:exec

Provides a small universe of items for exploring or running tests against.

-clientdirectory may be set to either clotho3-web/dist or clotho3-web/app:

  • dist -- prebuilt front end. Use this if you do not want to build the front end yourself.
  • app -- front end source code. Build before using.

See also: Configuration , Building the Front End

Congrats! You have a working development environment for Clotho 3.0!

Clone this wiki locally