The source code for the DingNet simulator.
ATTENTION: Due to time constraints, the implementation of this version is not guaranteed to be bug-free and is not fully tested. Please try to follow the request example under the ./http/
for your experience.
- Install Maven
- Clone the repository
- Navigate to the root of the repository
- Run
mvn compile
to build the simulator
- Install Docker
- Clone the repository
- Navigate to the root of the repository
- Run
mvn package -DskipTests
to build the simulator, this will generate a jar file under the target directory:DingNet-{version}.jar
- Run
docker build -t dingnet .
to build the docker image
- Navigate to the root of the repository
- Run
mvn exec:java -Dexec
to run the simulator - Or run
java -jar target/DingNet-{version}.jar
to run the simulator
- Run
docker run -p 8080:8080 -it dingnet
to run the simulator in front-end mode, ordocker run -d -p 8080:8080 -it dingnet
to run the simulator in headless mode - At this point, the simulator is not running yet, to start the simulator, run
docker exec -it $(docker ps -a -q --filter ancestor=dingnet --format="{{.ID}}") java -jar app.jar
- To stop the simulator, run
docker stop $(docker ps -a -q --filter ancestor=dingnet --format="{{.ID}}")
- To remove the simulator, run
docker rmi dingnet
- Before start by UPISAS, make sure the docker image is built
- Navigate to the root of the UPISAS repository
- Install UPISAS dependencies as README.md in UPISAS repository
- Run
python run.py
to run the simulator from UPISAS
After starting the simulator, the rest API can be accessed at http://localhost:8080/
.
Swagger documentation can be found at http://localhost:8080/swagger-ui.html
.
Json API documentation can be found at http://localhost:8080/v3/api-docs
.
Http requests examples can be found at ./http/