Skip to content

Isolated coding with Docker, VXLAN, and NGINX, enabling secure student environments in ASP.NET Core

Notifications You must be signed in to change notification settings

AhmedHosny2/Overlay-Lab

Repository files navigation

Overlay Lab

High-Level System Architecture

A platform for isolated programming exercises using Docker containers and a secure VXLAN overlay network.


Table of Contents

  1. Project Overview
  2. Installation Guide
  3. Usage Instructions
  4. Key Features
  5. Configuration
  6. Contributing Guidelines
  7. Visual Enhancements
  8. Additional Resources

Project Overview

Overlay Lab provides an environment where students complete programming exercises in isolated Docker containers connected via a secure VXLAN overlay network.

Core Goals:

  • Isolation: Containerized exercises prevent interference between users
  • Security: VXLAN network encrypts inter-container communication
  • Flexibility: JSON-configurable exercises for client/server challenges

Installation Guide

Prerequisites

Setup Steps

  1. Clone the repository:

    git clone https://github.com/AhmedHosny2/testbed-distributed-system.git
    cd projectname
  2. Install dependencies (Ubuntu example):

    sudo apt update && sudo apt install docker.io multipass nginx
  3. Launch the agent VM:

    multipass launch -n agent --cloud-init https://ovl.st.hs-ulm.de:4001/conf/user-data-mp.yaml jammy
    multipass shell

Usage Instructions

  1. Register VM in Overlay Network:

    sudo vx register -o  # Register VM
    sudo vx start        # Start overlay service
    ping 10.1.0.2        # Test connectivity
  2. Configure NGINX:

    curl -o init_nginx.sh https://ulm.ahmed-yehia.me/init_nginx && chmod +x init_nginx.sh && sudo ./init_nginx.sh
    curl -o update_srv_ip.sh https://ulm.ahmed-yehia.me/update_srv_ip && chmod +x update_srv_ip.sh && sudo ./update_srv_ip.sh
  3. Finalize Setup:

    curl -o agent_vm_ulm.ps1 https://ulm.ahmed-yehia.me/download && pwsh -ExecutionPolicy Bypass -File ./agent_vm_ulm.ps1
  4. Access the portal at:

    http://server.local
    

Key Features

  • Container Isolation: Dedicated Docker containers per exercise
  • VXLAN Security: Encrypted overlay network layer
  • NGINX Proxy: IP preservation, load balancing, and DNS resolution
  • JSON Configuration: Define exercises with custom parameters

Configuration

Example JSON exercise definition:

{
    "ExerciseName": "grpc-app",
    "ExerciseReqConnectionType": "grpc",
    "ExerciseTile": "gRPC Adventure",
    "ExerciseDescription": "Dive into the world of gRPC! Build a client that connects to a gRPC server and interacts with it to create, fetch, list, and delete users.",
    "ExerciseDifficulty": "2",
    "DockerImage": "ahmedyh1/grcp_server",
    "port": "5015",
    "DisplayFields": [
      "Name",
      "State.Status",
      "Config.Hostname",
      "NetworkSettings.Networks.bridge.NetworkID"
    ],
    "ClientSide": false,
    "Variables": {
      "host": "",
      "exposedPort": ""
    }
}

Contributing Guidelines

  1. Fork the repository
  2. Create a feature branch:
    git checkout -b feature/your-feature
  3. Follow existing code style
  4. Submit a PR with detailed description

Visual Enhancements

Client-Side Exercise Example

Portal Interface

Homepage showing available exercises with difficulty levels and descriptions:

HOMe page


1. Exercise Overview
Students select client-side exercises from the portal. The system provides server container details (IP/port) for connection.
grcp example detials

2. Container Details
Real-time container networking information including IP address (10.1.0.2), exposed port (5015), and status:
ex container details

3. Code Implementation
Students write client code to interact with the server container, with immediate feedback shown:
user's things


Server-Side Exercise Example

1. Exercise Setup
Students launch server-side exercises and receive endpoint details (10.1.0.3:8080) to implement server logic:
Server Exercise Interface

2. Container Monitoring
Live view of client containers sending test requests to student servers:
Client Container Monitor

3. Server Implementation
Students write server code and see validation results from test containers:
Server Code Validation


Additional Resources

This section contains links to supporting documentation and repositories that complement the Educational Programming Platform.


📄 Documentation

  1. Admin Setup:
  2. Student Workflow:

🛠️ Supporting Repositories

  1. Gateway VM Scripts:

    • Repository: gateway-vm-scripts
    • Contains scripts to initialize NGINX and launch the VM gateway into the VXLAN overlay network.
  2. Docker Images for Exercises:


🧩 Example Solutions


About

Isolated coding with Docker, VXLAN, and NGINX, enabling secure student environments in ASP.NET Core

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published