Skip to content
Alessandro Gubitosi edited this page Aug 28, 2018 · 5 revisions

This guide allow you to run Crop Ontology local or remotely.
The difference between "run" and "deploy" is that with the first one the webserver is active until the command is active, the second one uses Google App Engine scripts to deploy.

Both local and remote environments need the App Engine Java SDK and the Crop Ontology sources.


Note

The official appengine-java-sdk-1.9.64 has a bug when it recognizes the java version >= 10.
This produces a lot of errors during the execution and the app will not launch.
Please follow this repository for fixed version.
The issue is also reported here.

So, if you have Java v.10 please clone the fixed one instead:

$ git clone https://github.com/gubi/Google-App-Engine-1.9.64-FIXES.git


In a local terminal, or in a remote shell (such as Google Cloud Shell), type following commands:

Download the App Engine Java SDK
$ wget https://storage.googleapis.com/appengine-sdks/featured/appengine-java-sdk-1.9.64.zip
Unzip and remove the archive
$ unzip appengine-java-sdk-1.9.64.zip && rm appengine-java-sdk-1.9.64.zip
$ mv appengine-java-sdk-1.9.64 appengine-sdk
Clone this repo
$ git clone https://github.com/bioversity/Crop-Ontology.git


Run

After download the appengine-sdk (remember the patched version), in the same directory that contains it type in the terminal:

The default port is 3000, you can change it if you have different needs.

$ sh appengine-sdk/bin/dev_appserver.sh --port=3000 Crop-Ontology

The application is now active on http://localhost:3000

Deploy

Open a Google Cloud Shell and type following commands:

Deploy

$ sh appengine-sdk/bin/appcfg.sh update Crop-Ontology