-
Notifications
You must be signed in to change notification settings - Fork 15
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: Instances operator commands #214
Conversation
Failed to retrieve llama text: POST 504: 504 Gateway Time-outThe server didn't respond in time. |
The project still used `setup.py` and `setup.cfg`. This branch: 1. Migrates to pyproject.toml and `hatch`. 2. Updates workflows accordingly. 3. Changes README from reStructuredText to the easier Markdown. 4. Updates dependencies.
Solution: Use `importlib.metadata.version` instead.
@1yam when you have some time, can you rebase this PR? It conflics with master |
@@ -31,7 +31,7 @@ package_dir = | |||
setup_requires = pyscaffold>=3.2a0,<3.3a0 | |||
# Add here dependencies of your project (semicolon/line-separated), e.g. | |||
install_requires = | |||
aleph-sdk-python~=0.9.1 | |||
aleph-sdk-python@git+https://github.com/aleph-im/aleph-sdk-python.git@1yam-vm-client#egg=aleph-sdk-python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: remove this once the SDK has been released
vcpus = validated_int_prompt( | ||
f"Number of virtual cpus to allocate", vcpus, min_value=1, max_value=4 | ||
) | ||
vcpus = validated_int_prompt(f"Number of virtual cpus to allocate", vcpus, min_value=1, max_value=4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this to be a f-string '-'
|
||
memory = validated_int_prompt( | ||
f"Maximum memory allocation on vm in MiB", memory, min_value=2000, max_value=8000 | ||
f"Maximum memory allocation on vm in MiB", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this to be a f-string '-'
rootfs_size = validated_int_prompt( | ||
f"Disk size in MiB", rootfs_size, min_value=20000, max_value=100000 | ||
) | ||
rootfs_size = validated_int_prompt(f"Disk size in MiB", rootfs_size, min_value=20000, max_value=100000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this to be a f-string '-'
typer.echo(f"Status : {status}") | ||
typer.echo(result) | ||
else: | ||
typer.echo("Invalid private key format") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you probably want to display which kind of key format you expect for easier debugging.
typer.echo(f"Status : {status}") | ||
typer.echo(result) | ||
else: | ||
typer.echo("Invalid private key format") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you probably want to display which kind of key format you expect for easier debugging.
Not sure what happened, but the history of this branch seems messed up (some commits from main reappear in the history), and I see many conflicts. What is the plan regarding that ? Squash everything or cleanup ? |
Gonna fix conflicts and gonna squash those commit |
well was more simple to just re open new one: PR |
Note: This pull request depends on the following PR and should not be merged before it:
aleph-im/aleph-sdk-python#124
Summary
This PR introduces new commands for managing virtual machine instances. These commands provide users with enhanced control over their VMs.
New Commands
The following commands have been added:
Notify Instance:
Sends a notification to the specified VM instance within the given domain.
Stop Instance:
Stops the specified VM instance within the given domain.
Reboot Instance:
Reboots the specified VM instance within the given domain.
Erase Instance:
Erases the specified VM instance within the given domain, securely deleting all data.
Expire Instance: