tdviet / fedcloudclient

EGI FedCloud Client
https://fedcloudclient.fedcloud.eu
MIT License
8 stars 9 forks source link

Enable using hostnames as VM IDs #124

Open tdviet opened 2 years ago

tdviet commented 2 years ago

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:

sebastian-luna-valero commented 2 years ago

Good idea!

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

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

tdviet commented 2 years ago

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.