Skip to content
/ ranna Public
forked from ranna-go/ranna

Experimental code execution microservice based on Docker containers.

License

Notifications You must be signed in to change notification settings

Addy184/ranna

 
 

Repository files navigation

ranna

ランナー - Experimental code runner microservice based on Docker containers.

⚠ PLEASE READ BEFORE USE

First of all, this project is currently work in progress and not fully finished.
Also, this service allows arbitrary code execution in Docker containers. This will be a high security risk! If you want to use this service, only use this on a separate, encapsulated server environment!

📃 Todo

👉 Take a look in the issue tracker.

🛠 Architecture

Maybe, to make my thoughts behind the project more clear, here is a little introduction into the project's architecture.

As you can see, the project is split up in different services.

  • REST API: The REST API service is the main entrypoint for code execution.
  • Config Provider: All services need specific configuration. These are obtained by this service.
  • Spec Provider: ranna works with specs, which describe the runner environments for the Sandbox Provider. It provides a map of language specifiers (like go, or python3) with their specific runner specs.
  • Sandbox Manager: A higher levbel abstraction to execute code in sandboxes. Also keeps track of running containers to clean them up after teardown.
  • Sandbox Provider: This is the high level API to create a sandbox environment where the passed code can be run inside and the output can be obtained from.
  • Namespace Provider: This service is responsible for generating unique namespace identifiers which can be used to pass the provided code as file into the sandbox.
  • File Provider: This service is responsible for creating the nessecary directory structure and the file, containing the code, which is then passed to the sandbox to be executed.

🚀 Setup

👉 Take a look in the wiki.

📡 REST API

👉 Take a look in the wiki.

📦 Client Package

ranna also provides a Go client package available in pkg/client.

See the simple example implementation how to use the client package.

Here you can find some handy documentation for the provided packages.


© 2021 Ringo Hoffmann (zekro Development).
Covered by the MIT License.

About

Experimental code execution microservice based on Docker containers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.7%
  • Shell 1.9%
  • Dockerfile 0.4%