{"id":19888268,"url":"https://github.com/project-codeflare/instascale","last_synced_at":"2025-05-02T17:31:57.862Z","repository":{"id":78499629,"uuid":"577424214","full_name":"project-codeflare/instascale","owner":"project-codeflare","description":"On-demand Kubernetes/OpenShift cluster scaling and aggregated resource provisioning","archived":false,"fork":false,"pushed_at":"2024-02-21T09:35:33.000Z","size":69548,"stargazers_count":7,"open_issues_count":42,"forks_count":19,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-02-21T10:33:53.061Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/project-codeflare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-12-12T17:51:52.000Z","updated_at":"2024-01-04T14:53:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"eec806e4-bbbc-4ade-b9ac-b0cd03386640","html_url":"https://github.com/project-codeflare/instascale","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-codeflare%2Finstascale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-codeflare%2Finstascale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-codeflare%2Finstascale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-codeflare%2Finstascale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/project-codeflare","download_url":"https://codeload.github.com/project-codeflare/instascale/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224324498,"owners_count":17292521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-12T18:06:47.043Z","updated_at":"2024-11-12T18:06:47.107Z","avatar_url":"https://github.com/project-codeflare.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=https://user-images.githubusercontent.com/10506868/216672268-12630923-d9a4-4298-82d3-d07d28b8a234.png alt=InstaScale width=373 height=146 title=InstaScale\u003e\n\n[![Go](https://github.com/project-codeflare/instascale/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/project-codeflare/instascale/actions/workflows/go.yml)\n\nInstaScale is a controller that works with Multi-cluster-app-dispatcher (MCAD) to get aggregated resources available in the kubernetes cluster without creating pending pods. It uses [machinesets](https://github.com/openshift/machine-api-operator) to launch instances on cloud provider to be added to the Kubernetes cluster.\n\nKey features:\n- Acquires aggregated heterogenous instances needed for workload execution.\n- Does not clog Kubernetes control plane.\n- Works with your Kubernetes scheduling system to schedule pods on aggregated resources.\n- Terminates instances on workload completion.\n\n\n# InstaScale and MCAD interaction\n- User submits Multi GPU job(s)\n- Job(s) lands in MCAD queue\n- When resources are not available it triggers scaling i.e. calls InstaScale\n- InstaScale looks at resource requests specified by the user and matches those with the desired Machineset(s) to get nodes.\n- After InstaScal-ing, when aggregate resources are available to run the job MCAD dispatches the job.\n- When job completes, resources obtained for the job are released.\n\n# Development\n\n## Pre-requisites\n-  Installed Go version 1.19\n-  Running OpenShift cluster\n\n## Building\n- To build locally : `make build`\n- To run locally : `make run`\n## Image creation\n- To build and release a docker image for controller : `make IMG=quay.io/project-codeflare/instascale:\u003cTAG\u003e image-build image-push`\n- Note that the other contents of the Makefile (as well as the `config` and `bin` dirs) exist for future operator development, and are not currently utilized\n## Deployment\n- Deploy InstaScale (latest) using: `make deploy`\n\n- Optionally, to deploy a custom image of InstaScale you can use the `custom-deploy` make target to build, push, and deploy your image of InstaScale on your Kubernetes cluster:\n```\nmake custom-deploy ENGINE=\u003cpodman or docker\u003e IMG=quay.io/\u003cusername\u003e/instascale:\u003cimage tag\u003e\n```\nNote: This assumes you are logged into your quay.io account on your local machine, and your kubeconfig is pointing to the cluster you want to deploy InstaScale on.\n\n## Running an InstaScale deployment locally with Visual Studio Code\n- Deploy MCAD using steps [here](https://github.com/project-codeflare/multi-cluster-app-dispatcher/blob/main/doc/deploy/deployment.md).\n\n- In Visual Studio Code update `.vscode/launch.json` so that `\"KUBECONFIG\"` points to your Kubernetes config file.\u003cbr\u003e\n- If you changed the namespace in `config/default/kustomization.yaml` update the `args[]` in `launch.json` to include `\"--configs-namespace=\u003cYOUR_NAMESPACE\u003e\", \"--ocm-secret-namespace=\u003cYOUR_NAMESPACE\u003e\"`.\u003cbr\u003e\n- You can now run the local deployment with the debugger.\n## Running locally with a OSD cluster\nRunning InstaScale locally to an OSD cluster requires extra steps from the above.\n- Add the `instascale-ocm-secret` \n    - Get your API token from [here](https://console.redhat.com/openshift/token)\n    - Navigate to Workloads -\u003e secrets\n    - Select your project to `instascale-system`\n    - Click Create -\u003e Key/value secret\n    - Secret name: `instascale-ocm-secret`\n    - Key: `token`\n    - Value: `\u003cYOUR_API_TOKEN\u003e`\n    - Click Create\n## Scaling Machines with a Self-Managed OCP Cluster using AWS\nTo scale machines of a certain type you need to create a `MachineSet` by following this guide [here](https://docs.openshift.com/container-platform/4.11/machine_management/creating_machinesets/creating-machineset-aws.html).\n- On your Cluster Dashboard go to `Compute` -\u003e `Create MachineSet`.\n- Paste in your new `MachineSet` you created based off of the guide and click `Create`.\n- Your `MachineSet` should now appear.\n- Attempt to scale machines of the same machine type as your `MachineSet` template using `InstaScale`.\n- The `MachineSet` replicas should increase by the number of replicas you have specified.\n\n## Testing\n\nRun tests with command: \n``` \ngo test -v ./controllers/\n\n```\n\n## Release process\n\n\nPrerequisite:\n- Build and release [MCAD](https://github.com/project-codeflare/multi-cluster-app-dispatcher)\n- Make sure that MCAD version is published on [Go package site](https://pkg.go.dev/github.com/project-codeflare/multi-cluster-app-dispatcher?tab=versions)\n\n\n1. Run [instascale-release.yml](https://github.com/project-codeflare/instascale/actions/workflows/instascale-release.yml) action.\n2. Verify that [instascale-release.yml](https://github.com/project-codeflare/instascale/actions/workflows/instascale-release.yml) action passed successfully.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-codeflare%2Finstascale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproject-codeflare%2Finstascale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-codeflare%2Finstascale/lists"}