Skip to content

LeoAlex0/dualoj-judge

Repository files navigation

DualOJ-Judge

123

DualOJ-Judge is the judge module of DualOJ (WIP), basically written in Rust language.

WARNING:

  • This component DO NOT need to be exposed.
  • This project are still Work In Progress.

Introduction & final goal

This module can make DualOJ able to let problem-solvers & judgers to use Dockerfile customize environment and dependencies.

This means it is no longer necessary to use some extreme methods to optimize performance in most case, or copy & paste code for reusing.

Quick develop guide

Dependencies

  • kubernetes cluster, can use kubectl to manage, with an ingress-controller and an inner registry.
    • recommended to use minikube with ingress and registry addons for dev.
    • or if you use a bare metal cluster, setting up registry domain with inner network & outter network in manifests/01-registry.yml
  • OpenSSL or something can be used to generate Self-signed SSL Certifications.

And next steps will consider you using a recommended configuration.

Generate self-signed certification

Cause for using BuildKit securely, must generate a self-signed certification first.

You can simply do tools/mkcerts.sh for this step.

Start a local minikube cluster

It is recommended to assign at least 4 CPU cores and 8 GB of memory, with embeded certification be generated in last step: minikube start --cpus=4 --memory=8192 --embed-certs

Build & Load image

For minikube user, you can easily do tools/minikube-update.sh for this step.

Apply manifests

Just kubectl apply -f ./manifests.

Update pod

So if you complete a new feature or just for test, you can use tools/minikube-update.sh to build and update using changed new sources.

(For minikube only)

Interface debug

If you need to invoke some commands, you can use cargo run --bin=client to run a client.

And you may need to add --tls-ca-cert=".cert/client/ca.pem" flag to trust CA Certificate generated above.

Builder support

Build Judger image & Solver image

Some Option should be tested:

Internal registry support

Some Option should be tested:

Known BUGS

About

[WIP] judge module of DualOJ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •