Team Project for Modern Databases and Their Application's Class
###Setup - Installing Software Current Process was used to
#### Install [Java SE 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- Make sure you Accept there Liscence agreement via the check box
- Pick the appropiate Operating system and continue to download
- Run the installer package
#### Install [Git](http://git-scm.com/downloads) for version control
#### Install [SourceTree](http://www.sourcetreeapp.com/download/) (Optional for Windows and Mac) Provides easy to use and understand Git UI. Suggested this for new Gitters 👍
#### Install [Intellij](http://www.jetbrains.com/idea/download/) (Optional) Interactive IDE that integrates gradle build system. Caveat, any modern IDE should work.
#### Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) Provides a consistent virtual machine development environment.
#### Via Intellij *NOTE: This requires you to have Collaborator access to this project*
- Open Intellij application. You will be directed to Welcome to Intellihj IDEA welcome screen.
- Select Check out from Version Control
- A drop down will appear, select Github.
- You may be asked for your credentials. Provide your Github credentials.
- Under Vcs Repository URL: select https::github.com/mhotan/CityBikeDataExplorer.git
- Under Parent Directory: Use the directory where you store your local checked out version of your repositories
- Leave Directory Name: as the default if you can. If not rename to whatever
- Select the Add Repository Button
- Select Clone Repository Tab
- Under Source Path / URL: paste https://github.com/mhotan/CityBikeDataExplorer.git
- hit enter fource Source Tree to validate the repository
- Set Destination Path: to be the empty directory you wish to check out the repository into
- Hit Clone
- In Intellij select Open Project and select the path you used for Destination Path:
- Create a new directory where ever you want to place the project.
- type > git clone https://github.com/mhotan/CityBikeDataExplorer.git
- In Intellij select Open Project and select the path stored the repository at.
###Building
#### Building in Intellij
- Build -> Rebuild Project
#####Might have to setup your JDK * Set your JDK. File -> Configure Project SDK to point to your Java 8 Home directory
#####Might have to refresh
- Refresh Gradle Dependencies. View -> Tool Windows -> Gradle. Select the Refresh button. The two arrows in a circle.
###Executing
####Running specific classes
Within intellij right clicking on any class with the Java main function will run that specific class.
* Build using "./gradlew clean build" from the project root directory (if needed) * run "java -jar graph-db-driver/build/libs/citibike-graph-driver-0.1.0.jar"
####Running the RESTful web service
* To run the web server. Execute "./gradlew clean build && java -jar server/build/libs/gs-rest-service-0.1.0.jar" while in the root directory of the project in your terminal. This will rebuild the project and run an embedded tomcat server. * Now the you can connect to http://localhost port: 8080. Try http://localhost:8080/greeting?name=Your_Name to make a rest call and get a response.
- To start the VM, run
vagrant up
in the project directory. The first time, this will initialize the VM, which might take 10-30 minutes and ~500MB bandwidth. - To open an SSH session into the VM, run
vagrant ssh
. The project directory is available as/vagrant/
in the VM. - Ports 5432 (PostgreSQL), 7474 (Neo4j), and 8080 (web server) are forwarded from the host machine to the VM. For PostgreSQL, use the username/password
vagrant
/vagrant
. - Stop the VM using
vagrant halt
.
- Build using "./gradlew clean build" from the project root directory (if needed)
- run "java -jar graph-base/build/libs/graph-base-execjar-1.0.jar [path directory of csv or zip files]"
From vagrant command line terminal
- run "createdb citibike"
- run "psql citibike"
- From within psql run "create extension postgis;" You should see "CREATE EXTENSION" in the console
- Exit psql with "\q"
- Run ./gradlew build
- Run "java -jar st-db-driver/build/libs/st-db-driver-execjar-1.0.jar [path directory of csv or zip files]"