Scala Other
Clone or download
baiqiushi Frontend refactor - Cloudberry client (#539)
* Introduce cloudberry-client communication with Cloudberry.

* refined cloudberry-client

* refined cloudberry-client.js

* Add note for cloudberry-client.js comments

* fix bug of when first time registering category, can not access its sub-key by queryID

* refine the cloudberry-client.js

* get rid of debugging console log
Latest commit 527a664 Jul 16, 2018

README.md

Cloudberry Matrix

Cloudberry is now using the Play! Framework and Angular JS

Build Status codecov

Users are welcome to join our online chat forum :Join the chat at https://gitter.im/ISG-ICS/cloudberry

For developers please join our slack group

Build

Prerequisites: scala, sbt, AsterixDB

Prepare the AsterixDB cluster

Option 1: Follow the official documentation to setup a fully functional cluster.

Option 2: Use the prebuilt AsterixDB docker image to run a small test cluster locally. This approach serves the debug purpose.

Assume you've already had docker(>1.10) installed on your local machine, you can simply run the following command to create an AsterixDB cluster locally.

> ./script/dockerRunAsterixDB.sh  

To compile projects

> cd cloudberry
> sbt compile

Run Cloudberry service

You will need to give the AsterixDB cluster link to neo by change the asterixdb.url configuration in neo/conf/application.conf file. The default value points to the localhost docker cluster

> sbt "project neo" "run"

Run TwitterMap demo

TwitterMap is a demonstration application that shows how front-end services communicate with Cloudberry. You can run the following command in a separate command line window.

> cd examples/twittermap
> ./script/ingestAllTwitterToLocalCluster.sh
> sbt "project web" "run 9001"

You should see the TwitterMap demo on http://localhost:9001

Deploy Cloudberry

Use sbt dist to make a Cloudberry package as follows:

> sbt "project neo" "clean" "dist"

There should be one zip file called neo-1.0-SNAPSHOT.zip generated under cloudberry/neo/target/universal/.

You can copy the file to where you want to run the Cloudberry, unzip it, and run the instance in the background as follows:

> cd neo-1.0-SNAPSHOT
> bin/neo -Dapplication.secret='Yf]0bsdO2ckhJd]^sQ^IPISElBrfy<XWdTWukRwJK8KKc3rFG>Cn;nnaX:N/=R1<' -Dconfig.file=/full/path/to/production.conf  &

The application.secret value should be the same as the one in the application.conf when you run the sbt dist command. You can find more in the Play! framework documentation page

When it runs, there will be one RUNNING_PID file generated that includes the PID of the instance. You can kill the corresponding process to stop the instance.

You can run the TwitterMap application in the same way by running the following command:

> cd examples/twittermap
> sbt "project web" "clean" "dist"

, and run the server on a different port 9001:

> cd web-1.0-SNAPSHOT
> bin/web -Dapplication.secret='Yf]0bsdO2ckhJd]^sQ^IPISElBrfy<XWdTWukRwJK8KKc3rFG>Cn;nnaX:N/=R1<' -Dconfig.file=/full/path/to/production.conf -Dhttp.port=9001 &