Open tdviet opened 2 years ago
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).
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.
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:
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:
--vm-hostname
in the OpenStack command with the VM ID then execute the command