Sign inSign up

jamiec1998/fyp-registration-service

By jamiec1998

Updated over 6 years ago

Image
0

842

jamiec1998/fyp-registration-service repository overview

Registration Microservice

This microservice is a component of a larger application that is currently in development.

The super project can be found here https://github.com/JamieC1998/FYP_Contest_Management_System
Below are the currently listed components of this larger application.

PURPOSE

This microservice is responsible for receive a solution along with an array of input files and expected output files. The microservice will then query all available grader services to see if any are free to accept the job, it will then schedule the job and return results.

HOW TO RUN

You have two options:

  • Pull the repository and build it using maven
  • Pull down the super repository and orchestrate the application using docker-compose
Building and running via Maven
Pre-requisites:
  • Kotlin is installed on your machine
  • Open JDK 13 is installed
  • No other applications operating on port 8090, 8080 or 8761
Installation process
  • Pull down the repo git clone --recursive https://github.com/JamieC1998/FYP_Contest_Management_System.git
  • CD into the eureka server cd FYP_Eureka_Server
  • Run the application using mvnw ./mvnw spring-boot:run
  • Create an environment variable EUREKA_CLIENT_SERVICEURL_DEFAULTZONE the value of this variable should contain the IP and port on which the eureka server is operating, the default port is 8761. If you're hosting this all on one machine then the value of the variable will be as follows http://localhost:8761/eureka
  • Now you can cd into the other directories and run the following command for each microservice ./mvnw spring-boot:run
Docker-Compose
Pre-requisites:
  • Docker is installed on your machine
  • Docker-Compose is installed on the machine
Installation Process
  • Pull down the repository
  • Enter the repo direcotry cd FYP_Contest_Management_System
  • Open the docker-compose.yml file, on line 29 you'll see the following line replicas: 6 this value represents how many instances of the grader service you want running.
  • Once done execute the following command to run it docker-compose --compatibility up

ENDPOINTS

Below is our documented list for this micro-service, all endpoints operate on port 8080

EndpointRequest TypeUtilityExample
/swagger-ui.htmlGETAllows you to access our swagger docs where you can test the endpointscurl --location --request GET 'localhost:8080/swagger-ui.html'
/grader/instancesGETQueries the eureka server for all information it has on grader servicescurl --location --request GET 'localhost:8090/grader/instances'
/graderGETQueries all grader services running to get their current task statuscurl --location --request GET 'localhost:8090/grader'

For a more detailed analysis of the inputs and outputs of each end-point please refer to the swagger docs which are accessible by pulling down and running the application and accessing /swagger-ui.html.

Tag summary

Content type

Image

Digest

Size

231.8 MB

Last updated

over 6 years ago

docker pull jamiec1998/fyp-registration-service