-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Provide a public API to scale services #1762
Comments
This is related to supporting updating the service |
Not sure. The issue is about providing an API that does what the server already does with auto-scaling of a running service based on the |
@peterschmidt85, We have a public API that allows specifying |
This issue is stale because it has been open for 30 days with no activity. |
After #1958, users can change replicas and scaling parameters via import os
from dstack.api.server import APIClient
url = os.environ["DSTACK_URL"]
token = os.environ["DSTACK_TOKEN"]
project = os.environ["DSTACK_PROJECT"]
client = APIClient(base_url=url, token=token)
run = client.runs.get(project, "my-run")
new_run_spec = run.run_spec
new_run_spec.configuration.replicas = 3
plan = client.runs.get_plan(project, new_run_spec)
updated_run = client.runs.apply_plan(project, plan) |
Use-case: up-scale and down-scale services programmatically via an API
The text was updated successfully, but these errors were encountered: