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

Enable using hostnames as VM IDs #124

Open
tdviet opened this issue Nov 9, 2021 · 2 comments
Open

Enable using hostnames as VM IDs #124

tdviet opened this issue Nov 9, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@tdviet
Copy link
Owner

tdviet commented Nov 9, 2021

OpenStack commands for interaction with VMs usually require local VM IDs/names. However, these VM IDs/names are not memorable or fully-qualitfied.

If the VMs have their own DNS hostnames (e.g. from Dynamic DNS service or any other DNS services), it is desirable if the hostnames can be used as alternatives for VM IDs, something like:

fedcloud openstack server show--site <SITE> --vo <VO> --vm-hostname demo.vm.fedcloud.eu

At the result, users can manipulate with VM hosting their services using the service names and don't have to use/remember any additional local VM IDs/name.

Implementation can be realized in three steps:

  • get IP address from the hostname
  • get ID of the VM with the IP address
  • replace the option --vm-hostname in the OpenStack command with the VM ID then execute the command
@tdviet tdviet added the enhancement New feature or request label Nov 9, 2021
@sebastian-luna-valero
Copy link
Collaborator

Good idea!

A couple of other aspects that comes to mind, in case you want to consider them as well:

  • Sometimes instead of deploying a single VM you could deploy a cluster (e.g. with Infrastructure Manager).

  • On the other hand, deleting the VM may also leave behind the associated/specific security groups, floating IP or storage volumes.

In both cases, additional cleaning may be desirable when you delete the VM(s).

@tdviet
Copy link
Owner Author

tdviet commented Nov 11, 2021

The openstack server delete is a bad example, I changed it to openstack server show.

Regarding removing resource left after deleting VMs, we can create some external scripts (like the list-my-own-vms.sh) e.g. delete-unused-security-group.sh, release-unused-floating-ips.sh, etc., that will do the cleaning. That will be easier to develop and maintain. We follow the Unix approach "do one thing and do it well", each command of fedcloudclient should do only one thing (e.g. only deleting VM) and more complex tasks (deleting all resources related to the VM) will be performed as scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants