{"id":49577145,"url":"https://github.com/panastasiadis/static-interference-aware-orchestration","last_synced_at":"2026-05-03T17:36:38.397Z","repository":{"id":145074980,"uuid":"603081963","full_name":"panastasiadis/static-interference-aware-orchestration","owner":"panastasiadis","description":"This project aims to orchestrate resource allocation in a Kubernetes cluster for a known set of containerized applications. The project utilizes infrastructure monitoring to allocate resources such that interference between applications is minimized.","archived":false,"fork":false,"pushed_at":"2023-02-17T15:26:20.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-09-11T10:28:54.596Z","etag":null,"topics":["containerization","cpu-testing","flask","grafana","infrastructure-monitoring","kubernetes","memory-testing","prometheus","python","resource-orchestration","static-infrastructure","stress-testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panastasiadis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-17T15:24:57.000Z","updated_at":"2023-09-11T10:28:57.069Z","dependencies_parsed_at":"2023-09-11T10:28:56.894Z","dependency_job_id":"64cf63a7-d5ec-4e50-9efb-766625ecb851","html_url":"https://github.com/panastasiadis/static-interference-aware-orchestration","commit_stats":null,"previous_names":["panastasiadis/static-interference-aware-orchestration"],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/panastasiadis/static-interference-aware-orchestration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panastasiadis%2Fstatic-interference-aware-orchestration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panastasiadis%2Fstatic-interference-aware-orchestration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panastasiadis%2Fstatic-interference-aware-orchestration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panastasiadis%2Fstatic-interference-aware-orchestration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panastasiadis","download_url":"https://codeload.github.com/panastasiadis/static-interference-aware-orchestration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panastasiadis%2Fstatic-interference-aware-orchestration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32579079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containerization","cpu-testing","flask","grafana","infrastructure-monitoring","kubernetes","memory-testing","prometheus","python","resource-orchestration","static-infrastructure","stress-testing"],"created_at":"2026-05-03T17:36:38.234Z","updated_at":"2026-05-03T17:36:38.375Z","avatar_url":"https://github.com/panastasiadis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Static interference-aware resource orchestration using infrastructure monitoring for a known set of containerized apps  \n\n## Introduction\n\nThis project aims to orchestrate resource allocation in a Kubernetes cluster for a known set of containerized applications. The project utilizes infrastructure monitoring to allocate resources such that interference between applications is minimized.\n\n## Prerequisites\n\nThe following tools must be installed:\n\n* kind\n* docker\n* kubectl\n* helm\n* python (Flask)\n\n## Setup\n\n### Creating a Kubernetes Cluster\n\n1. Delete any previously created clusters by running:\n\n```\nkind delete clusters --all\n```\n\n2. Create a new local cluster with one master and two worker nodes by running the following command inside the project's root directory:\n\n```\nkind create cluster --name=cluster-kind --config=create_cluster.yaml\n```\n\nThe name of our cluster will be `cluster-kind`, and the name of the worker nodes will be `cluster-kind-worker` and `cluster-kind-worker2`, respectively.\n\n## Assigning labels to nodes\n\nTo influence the scheduler into choosing specific nodes for deploying our apps, we need to assign specific labels to the worker nodes.\n\n1. For the first worker node `cluster-kind-worker`, run:\n\n```\nkubectl label nodes cluster-kind-worker group=node1\n```\n\n2. For the second worker, cluster-kind-worker2, run:\n\n```\nkubectl label nodes cluster-kind-worker2 group=node2\n```\n\n## Installing Prometheus and Grafana\n\n1. Install the kube-prometheus-stack ([Github](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack)) package containing both Prometheus and Grafana using the helm package manager. Run the following commands:\n\n```\nhelm repo update\n```\n\n```\nhelm install kube-prometheus-stack prometheus-community/kube-prometheus-stack\n```\n\n2. Forward the Grafana Pod to port 3000 to access the Grafana page from the browser:\n\n```\nkubectl --namespace default port-forward \u003ckube-prometheus-grafana-pod-name\u003e 3000\n```\n\nReplace `\u003ckube-prometheus-grafana-pod-name\u003e` with the exact name of the Grafana Pod. You can check the name of the pod by checking the detailed information about Pods by running:\n\n```\nkubectl get pods -A -o wide\n```\n\n## Testing Apps\n\nFor this experiment, we use the **Phoronix Test Suite**.\n\nUsing the docker image **phoronix/pts** as a base, we managed to create four new images for stress testing CPU and memory. Each image has one test app installed from the Phoronix Test Suite.\n\n### Installed Tests\n\nCPU-heavy Tests\n\n* [pts/compress-7zip](https://hub.docker.com/r/paanastasiadis/pts-compress7zip)\n* [pts/c-ray](https://hub.docker.com/r/paanastasiadis/pts-cray)\n\nRAM-Heavy Tests\n\n* [pts/mbw](https://hub.docker.com/r/paanastasiadis/pts-mbw)\n* [pts/stressapptest](https://hub.docker.com/r/paanastasiadis/pts-stressapptest)\n\n## About Script\n\n### Static Orchestrator\n\n* `static_orchestrator.py`\n\nThis is a Python script that deploys containerized applications to two nodes. The script is built using Flask and uses Kubernetes for deployment.\n\n### Getting Started\n\nTo run the script, execute the following command:\n\n```\npython static_orchestrator.py\n```\n\n### Deployment\n\nTo deploy a new application, send an HTTP POST request to the `/deploy` endpoint with the following JSON payload:\n\n```\n{\n    \"name\": \"myapp\",\n    \"type\": \"CPU or Memory\",\n    \"image\": \"myregistry/myapp:latest\"\n}\n```\n\nThe `name` field is the name of the application, `type` is the resource type that the application requires, and `image` is the Docker image that will be deployed.\n\nIf the deployment is successful, the server will respond with an HTTP 200 status code and a success message. If there is a problem with the deployment, the server will respond with an HTTP 500 status code and an error message.\n\n### Monitoring\n\nTo monitor the status of the deployed apps, use a tool like Postman to make an HTTP request to the `/deploy` endpoint with the desired app name.\n\nAfter deploying one or more apps to the cluster, run the following command to see the status of the pods:\n\n```\nkubectl get pods -A -o wide\n```\n\nEach CPU-intensive app should be deployed to a separate node, and the same should be true for the memory-intensive apps.\n\n### Limitations\n\nThis script is designed for a static infrastructure with two nodes and may not work well in dynamic environments. It also assumes that the Kubernetes cluster is set up properly with `kubectl` configured on the machine where the script is executed.\n\n## Running Tests\n\nAfter deploying one or more apps to the cluster, you can access the bash terminal of an app and run a corresponding test.\n\n### Accessing the Bash Terminal\n\nTo access the bash terminal of an app, run the following command, replacing `\u003capp-pod-name\u003e` with the name of the Pod for the desired app:\n\n```\nkubectl exec --stdin --tty \u003capp-pod-name\u003e -- /bin/bash\n```\n\n### Running a Test\n\nAfter accessing the bash terminal of an app, run the corresponding test using the following command, replacing `\u003cinstalled-test\u003e` with one of the following depending on the app:\n\n* pts/c-ray\n* pts/compress-7zip\n* pts/stressapptest\n* pts/mbw\n\n```\n./phoronix-test-suite/phoronix-test-suite run \u003cinstalled-test\u003e\n```\n\n## Performance Monitoring with Grafana\n\nAfter deploying the apps to the cluster and running the tests inside them, you can use the Grafana page to monitor their performance. To access the Grafana page, use the following credentials:\n\n* `username`: admin\n* `password`: prom-operator\n\nOnce you have logged in, navigate to `Dashboards` \u003e `Browse` and select any of the available options for Kubernetes monitoring, such as \"Kubernetes / Compute Resources / Node (Pods)\".\n\n## Deploying apps manually\n\nIf you want to deploy any of the apps manually to a specific node, you can use a YAML configuration. For example, to deploy the **MBW** app specifically to **cluster-worker2**, use the following YAML configuration:\n\n```\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: mbw-deployment\nspec:\n  selector:\n    matchLabels:\n      app: mbw-app\n  template:\n    metadata:\n      labels:\n        app: mbw-app\n    spec:\n      nodeSelector:\n        group: node2\n      containers:\n      - name: mbw-container\n        image: docker.io/paanastasiadis/pts-mbw\n```\n\nSave this configuration to a file named `deployment_mbw.yaml` and run the following command to deploy the app:\n\n```\nkubectl apply -f deployment_mbw.yaml\n```\n\nNote that you can replace MBW with any other app that you want to deploy manually.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanastasiadis%2Fstatic-interference-aware-orchestration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanastasiadis%2Fstatic-interference-aware-orchestration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanastasiadis%2Fstatic-interference-aware-orchestration/lists"}