This week we have been working on defining the scope to enhance our Tag management feature in the UI. MAAS tag is a powerful feature, especially, the automatic tags. This feature is already available in the CLI via our REST API and in the up coming release, our goal is to expose this feature in the UI.
What are automatic tags?
In short, automatic tags are tags with a definition. The capabilities of MAAS’ Tag are powerful because it can be used to categorise machines, acquire machines, and configure kernel parameters.
To create a tag via the CLI, the REST API needs:
//Tag parameter. name:[string] comment (optional): [string] definition (optional): // XPath Expresion (the rule to define which HW or characteristics of the machine to apply the name to.) kernel_opts (optional): [string]
An example of automated tag usage can be described as the CLI input example below:
This tag will enable passthrough for Nvidia Tesla v100 PCIe series 16GB GPUs on Intel VT-d
maas $PROFILE tags create name=gpgpu-tesla-vi comment="Enable passthrough for Nvidia Tesla V series GPUs on Intel" \ definition='//node[@id="cpu:0"]/capabilities/capability/@id = "vmx" and //node[@id="display"]/vendor[contains(.,"NVIDIA")] and //node[@id="display"]/description[contains(.,"3D")] and //node[@id="display"]/product[contains(.,"Tesla V100 PCIe 16GB")]' \ kernel_opts="console=tty0 console=ttyS0,115200n8r nomodeset modprobe.blacklist=nouveau,nvidiafb,snd_hda_intel nouveau.blacklist=1 video=vesafb:off,efifb:off intel_iommu=on rd.driver.pre=pci-stub rd.driver.pre=vfio-pci pci-stub.ids=10de:1db4 vfio-pci.ids=10de:1db4 vfio_iommu_type1.allow_unsafe_interrupts=1 vfio-pci.disable_vga=1"
As such, creating this tag will auto-apply the tag
gpgpu-tesla-vi to all machines that match the hardware definition and apply kernel parameters at deployment time.
How does this work in the UI?
At the moment we are drafting different scenarios to show how we can expose this experience.
Some example scenarios can be described as below:
How might we list all the tags?
This picture above is a rough wireframe of our initial idea.
Because automatic tags currently work with machines only, we will only focus on the machine story instead of all nodes. So a
Tag tab will be added to the Machine listing page.
Tag Tab, you should be able to
- see all the existing tags
- distinguish between manual tags and automatic tags
- how many machines are associated with that tag
- the comment
- all the kernel parameters
- last updated date
By default tags are sorted alphabetically.
- A user can create a new tag (manual or automatic) from this page
- edit the existing tag
- delete the existing tag
- ability to search for tags
- ability to sort by last updated date
How might we create/assign/un-assign tags from the Machine listing page?
One of the biggest pain points in the UI is that people are able to tag multiple machines very easily, but when they need to un-assign the tag, they need to go into individual machines to untag them. We want to solve this problem in the UI as well, to make this feature more complete.
Let’s imagine that there are 4 machines selected in the Machine listing page
|Machine 1||TagA, AutoTag||Deployed|
|Machine 2||TagA, TagB, AutoTag||Ready|
|Machine 4||TagA, TagC||Deployed|
When you select
Take action from the header menu the new
Tag form should allow you to work like the image below:
The tag field should allow you to see all assigned tags.
You should be able to :
- See the number of the selected machines associated with that tag.
- The automatic tag is disabled because you cannot un-assign automatic tags manually.
- You should be able to create a new tag with comments and add kernel options from this view.
- If a new tag is created with kernel options a user will get a warning that the deploy machines needs to be redeployed to apply the new kernel options.
A similar experience should also be in the machine/configuration page.
How might we an automatic tag in the UI?
Since automated tags will auto-apply to machines that fit in with the definition, we think that it should live under the Tag listing page.
When you click
Create new tag the form below will slide down.
This form has an extra field, definition, where you can add an XPath expression as a rule for tagging machines in your MAAS environment. When new machines are added to your environment and they match with this definition, it will automatically tag the new machines as well.
In this form, you should be able to:
- create a manual or an automatic tag.
- if the XPath expression is invalid, we will show an error and guide you towards the documentation.
- if the XPath is valid we want to be able to show which machines this tag could apply to.
- if kernel options are specified in the tag, we will provide a warning message that deployed machines need to be redeployed to have a new kernel option.
Last but not the least
This is the not the final version of our UI, we are still experimenting different interactions and different constraints. I hope that this new feature in the UI will get you excited for what’s coming in the new release. As usual, your feedback is a gift. Please tell us what you think about this feature (what you like, what you wish it could also do), add comments, tell us what is your understanding of XPath expression and what guiding materials can help you create these expressions efficiently.
See you in the next MAAS UI update!