Welcome to EpiCURE, a solution for restaurants struggling due to COVID-19!
- Login to Google Cloud Shell
- Clone this repo
- In your GCP project, set up a VM instance for Elasticsearch
- Navigate into the
capstone
directory- Edit line 146 of the
pom.xml
by replacingPROJECT-ID-HERE
with the ID of your GCP project - Deploy necessary Datastore indices by running
mvn appengine:deployIndex
- Deploy the project by running
mvn package appengine:deploy
- You may have to run
gcloud auth login
and/orgcloud config set project YOUR-PROJECT-ID
before deploying
- You may have to run
- Edit line 146 of the
In order to set up Elasticsearch to work with App Engine, a server running Elasticsearch must be set up. The following information will be for if the server is set up to run run on Google Compute Engine.
- Create a VM Instance
- Install Elasticsearch
- Go to the directory in which Elasticsearch was installed
- Open
./elasticsearch.yml
- Change the settings according to the guide at GCE Discovery Plugin
- Configure the Elasticsearch VM instance for Serverless VPC Access
- Set up App Engine to use the VPC Access connector
- Edit the
vpc-acccess-connector
tag inappengine-web.xml
to include your GCP project ID, location, and search connection
- Edit the
- Edit the
context-param
tag inweb.xml
to be the hostname of your VM instance- To get the hostname of the VM instance, SSH into the instance and type
hostame -f
into the prompt.
- To get the hostname of the VM instance, SSH into the instance and type
- Navigate into the
capstone
directory- Run
mvn install
to ready the dependency tree
- Run
- Navigate into the
remote
directory- Run
mvn clean package
to create ajar
file - Run
cd target/
to navigate to the directory with thejar
- Run
java -jar remote-1.0-SNAPSHOT-jar-with-dependencies.jar "YOUR-PROJECT-ID"
- Ensure that "success" is printed!
- Run
In order to implement the scheduler needed to update a restaurant's score, you will need to complete the following steps:
- Go to your deployed Google Cloud Project's dashboard.
- Enter the navigation menu and look for Cloud Scheduler under the Tools section.
- Select 'Create Job'.
- Complete all the fields needed to create the job.
- Choose the name for the job.
- Put the frequency as: "0 6 * * 7" (this means the job will run every Sunday at 6:00 AM).
- Select your desired TimeZone.
- The endpoint for the job is "/update-score" (that's what should go at the end of the rest of the URL for your site).
- The method should be a POST request and body should be empty.