Skip to content

GTkernel/krios

Repository files navigation

Code repository with modifications to kubernetes (k8s) to use it for LEO compute cloud.

Requirements to run Krios

Currently, to run Krios, you need at least 6 ubuntu nodes that can all talk to each other. Amongst these nodes, one node will be Krios orchestrator, one will be the client and the rest will be Krios satellite nodes.

Installation steps:

  1. Recursively pull the emulator submodule:

    git submodule update --init --recursive
  2. Install Go, Docker, Kubernetes, python3, and pip from the official sources. This needs to be done on all the nodes. If you are using CloudLab nodes, you can use this script to install all the necessary software on all the CloudLab nodes.

  3. Install all the Python requirements listed in requirements.txt. This needs to be done on the orchestrator and client:

    pip install -r requirements.txt
  4. Create an ip_mapping.json file that maps each node's fully-qualified hostname to its IP address. Place this file in the krios-emulator directory (where krios_setup.py is run from). The format is:

    {
        "node1.user-123.project.utah.cloudlab.us": "128.110.218.50",
        "node2.user-123.project.utah.cloudlab.us": "128.110.218.53",
        ...
    }

    Hostnames must contain a numeric index (e.g. node1, node2) as the setup script uses these indices to assign control and worker roles.

    Both krios_setup.py and script-main.py will load from ip_mapping.json when it is present. If the file is not found, script-main.py falls back to parsing a CloudLab manifest.xml via cloudlab_fetch_ip_mapping().

Steps to run

Option A: Automated setup with krios_setup.py (recommended)

The krios_setup.py script in krios-emulator automates cluster initialization, Krios component deployment, emulator launch, and latency measurement.

  1. cd into the krios-emulator directory and ensure ip_mapping.json is present there.

  2. Run the setup script with a scenario and a base node index. The base index selects the control node; workers are assigned to the subsequent indices:

    cd krios-emulator
    python krios_setup.py <scenario> <base_node_idx>

    Available scenarios:

    • sf_4workers — San Francisco (37.7749, -122.4194), 4 workers
    • seattle_4workers — Seattle (47.6062, -122.3321), 4 workers
    • tokyo_6workers — Tokyo (35.6762, 139.6503), 6 workers

    For example, python krios_setup.py sf_4workers 1 uses node1 as the control node and node2–node5 as workers.

  3. The script will:

    • Reset and initialize the Kubernetes cluster via kubeadm on the control node
    • Join all worker nodes to the cluster
    • Install the Calico CNI
    • Deploy the Krios scheduler, Krios controller, and nginx service from the yamls directory
    • Deploy an nginx test pod with the scenario's location as the leozone label

    Note: The Krios scheduler and controller require worker nodes to have a sat_id label (set by the emulator). They will be in CrashLoopBackOff until the emulator runs and assigns satellite IDs. Use --run-emulator to start the emulator after setup, which will label the nodes and allow the scheduler/controller to recover automatically.

  4. Optional flags:

    • --reuse-cluster — skip cluster creation and reuse an existing cluster (validates that all expected nodes are Ready)
    • --skip-deploy — skip deploying Krios components (useful if they are already running)
    • --run-emulator — launch the satellite emulator (script-main.py) after setup
    • --emulator-time SEC — emulator experiment duration in seconds (default: 60)
    • --measure — run scheduling/deployment/deletion latency benchmarks after setup
    • --latency-ms MS — inject a single latency value in ms for measurement (requires --measure)
    • --samples-per-latency N — number of samples per latency value (default: 10)

    Example with emulator and measurements:

    python krios_setup.py sf_4workers 1 --run-emulator --emulator-time 120 --measure

Option B: Manual setup

  1. On the client node (alphabetically the last node), run the client script using python script-client.py from the krios-emulator directory.
  2. On the orchestrator node (alphabetically the first node), setup the cluster using kubeadm and install a CNI.
  3. Deploy the Krios scheduler and the Krios Controller from the yaml files provided in the yamls directory.
  4. Install the nginx pod from yamls directory using kubectl apply -f nginx_pod.yaml. Ensure that the client location specified in the client and server scripts matches the one provided in this yaml file.
  5. Ensure ip_mapping.json is present in the krios-emulator directory (see Installation step 4). Both krios_setup.py and script-main.py will use it.
  6. On the orchestrator, run the emulator using python script-main.py <yaml_location> <experiment_time> from the krios-emulator directory. This labels worker nodes with satellite IDs, which the scheduler and controller require to function.

Post this, you should start seeing the client getting responses, and also logging the latency values.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors