Add tags to virtual machines #114

Closed
opened 2020-11-25 01:47:00 -05:00 by JoshuaBoniface · 4 comments
JoshuaBoniface commented 2020-11-25 01:47:00 -05:00 (Migrated from git.bonifacelabs.ca)

As part of , with group support, we will want functionality to limit a group to a particular subset of VMs, for instance allowing a group to only manage a specific set of VMs.

Implement tags for VMs, which will provide groupings usable by the cluster for other purposes.

This can also have wider uses, for instance allowing search limits to be based off tags instead of VM names/UUIDs to simplify a larger fleet of VMs.

As part of #113, with group support, we will want functionality to limit a group to a particular subset of VMs, for instance allowing a group to only manage a specific set of VMs. Implement tags for VMs, which will provide groupings usable by the cluster for other purposes. This can also have wider uses, for instance allowing search limits to be based off tags instead of VM names/UUIDs to simplify a larger fleet of VMs.
JoshuaBoniface commented 2020-11-25 01:53:26 -05:00 (Migrated from git.bonifacelabs.ca)

mentioned in issue

mentioned in issue #113
JoshuaBoniface commented 2020-11-25 01:54:36 -05:00 (Migrated from git.bonifacelabs.ca)

Should probably be implemented before , done based on existing VM meta configs. Worry about the integration with user RBAC later.

Should probably be implemented before #114, done based on existing VM meta configs. Worry about the integration with user RBAC later.
JoshuaBoniface commented 2021-07-14 01:07:39 -04:00 (Migrated from git.bonifacelabs.ca)

Tag support for VMs implemented in the forthcoming 0.9.26.

Tags can be manipulated like any other VM metadata feature via their own API endpoint (/vm/{vm}/tags) and CLI interface (pvc vm tag). Tags can be added (pvc vm tag add) or removed (pvc vm tag remove) one-at-a-time, and in the CLI can be shown independent of other information with pvc vm tag get. They can also be specified at VM definition time with the -g/--tag or -G/--protected-tag options which can be specified any number of times for multiple tags.

Tags names are included in the main pvc vm list output, and more detailed information (identical to the pvc vm tag get output) is shown in the pvc vm info output if any tags are configured.

Tags themselves are divided into two "types": "user" tags are all those set by the user via the API; "system" tags are not yet used, and will be reserved for those tags added by PVC itself. Only "user" tags can be manipulated via the API; "system" tags imply "protected" (below).

An additional field, "protected", allows users to define tags which cannot be removed except by very low-level manipulation of Zookeeper, or by undefining/removing the VM. The usecase here would be, for instance, tags to mark authorization, or immutable facts about the VM.

VM lists can be filtered by tag, similar to how they can be filtered by node or by state. The API field "tag" to the /vm endpoint provides this function, and the CLI exposes it via the -g/--tag option to pvc vm list.

This fairly simple setup should provide plenty of flexibility for the use of tags going forward.

Tag support for VMs implemented in the forthcoming 0.9.26. Tags can be manipulated like any other VM metadata feature via their own API endpoint (`/vm/{vm}/tags`) and CLI interface (`pvc vm tag`). Tags can be added (`pvc vm tag add`) or removed (`pvc vm tag remove`) one-at-a-time, and in the CLI can be shown independent of other information with `pvc vm tag get`. They can also be specified at VM definition time with the `-g`/`--tag` or `-G`/`--protected-tag` options which can be specified any number of times for multiple tags. Tags names are included in the main `pvc vm list` output, and more detailed information (identical to the `pvc vm tag get` output) is shown in the `pvc vm info` output if any tags are configured. Tags themselves are divided into two "types": "user" tags are all those set by the user via the API; "system" tags are not yet used, and will be reserved for those tags added by PVC itself. Only "user" tags can be manipulated via the API; "system" tags imply "protected" (below). An additional field, "protected", allows users to define tags which cannot be removed except by very low-level manipulation of Zookeeper, or by undefining/removing the VM. The usecase here would be, for instance, tags to mark authorization, or immutable facts about the VM. VM lists can be filtered by tag, similar to how they can be filtered by node or by state. The API field "tag" to the `/vm` endpoint provides this function, and the CLI exposes it via the `-g`/`--tag` option to `pvc vm list`. This fairly simple setup should provide plenty of flexibility for the use of tags going forward.
JoshuaBoniface commented 2021-07-14 01:07:39 -04:00 (Migrated from git.bonifacelabs.ca)

closed

closed
Sign in to join this conversation.
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: parallelvirtualcluster/pvc#114
No description provided.