Skip to content
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

Closed
wants to merge 23 commits into from
Closed

Conversation

1yam
Copy link
Collaborator

@1yam 1yam commented Jun 12, 2024

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:

  1. Notify Instance:

    aleph instance notify {vm_id} {domain}

    Sends a notification to the specified VM instance within the given domain.

  2. Stop Instance:

    aleph instance stop {vm_id} {domain}

    Stops the specified VM instance within the given domain.

  3. Reboot Instance:

    aleph instance reboot {vm_id} {domain}

    Reboots the specified VM instance within the given domain.

  4. Erase Instance:

    aleph instance erase {vm_id} {domain}

    Erases the specified VM instance within the given domain, securely deleting all data.

  5. Expire Instance:

    aleph instance expire {vm_id} {domain}

Copy link

Failed to retrieve llama text: POST 504:

504 Gateway Time-out


The server didn't respond in time.

@Psycojoker
Copy link
Collaborator

@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
Copy link
Collaborator

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)
Copy link
Collaborator

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",
Copy link
Collaborator

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)
Copy link
Collaborator

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")
Copy link
Collaborator

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")
Copy link
Collaborator

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.

@hoh
Copy link
Member

hoh commented Jun 28, 2024

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 ?

@1yam
Copy link
Collaborator Author

1yam commented Jun 28, 2024

Gonna fix conflicts and gonna squash those commit

@1yam
Copy link
Collaborator Author

1yam commented Jul 1, 2024

well was more simple to just re open new one: PR

@1yam 1yam closed this Jul 1, 2024
@Psycojoker Psycojoker deleted the 1yam-instance-manager branch July 24, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants