zededa:tagging
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| zededa:tagging [2026/08/11 12:14] – mc | zededa:tagging [2026/08/11 12:14] (current) – old revision restored (2026/06/28 20:01) mc | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | How an edge node gets a whole site — network, storage, apps — without anyone | + | Tags in ZEDEDA Cloud are name/value pairs used to categorize resources and to target groups of edge nodes, for example '' |
| - | naming | + | |
| - | ===== What a deployment is ===== | + | ===== Tag constraints |
| - | A **deployment** is a saved recipe for a site: the network to create, the | + | These limits are identical across |
| - | storage to create, the apps to run. It lives inside a project. | + | |
| - | It never names an edge node. Instead, nodes //qualify// for it. That is the | + | * Tag **name** (key) is case **insensitive**, min length 3, max length 512. |
| - | whole idea: you add a site by tagging hardware, not by editing a deployment | + | * Tag **value** |
| - | project. | + | * A tag is a single key:value pair; an object carries |
| - | **Watch out:** the project holding a deployment must be of type | + | ===== Tag taxonomy (do not conflate these) ===== |
| - | '' | + | |
| - | common setup mistake, and the error message points at the deployment rather | + | |
| - | than the project. | + | |
| - | ===== How a node qualifies ===== | + | ^ Concept ^ What it is ^ Used for ^ ZCLI flag / TF field ^ |
| + | | Object tags | key:value map on an object | Categorization, | ||
| + | | Adapter labels (shared labels) | free-form string(s) on a network port | Group ports so a network instance can select a port group instead of one named port | '' | ||
| + | | Port tags | key:value map on a port | Categorize/ | ||
| + | | Network tag | key:value used to associate a node with networks | Select/ | ||
| + | | Edge-node-pool tag | key:value used to pick which nodes form a K3s cluster pool | Cluster membership selection | '' | ||
| + | | Deployment tag | key:value on a deployment version, matched to node tags | ZTD: pick which deployment version applies to a node | '' | ||
| - | Two things must line up, and a third wires the app to its network. Each is a | + | The most important split: **object tags** are metadata you attach |
| - | pair that must be //equal// on both sides — nothing matches by name. | + | |
| - | ==== First, membership | + | ===== Tags in the UI ===== |
| - | The edge node has to be moved **into the deployment' | + | ==== Where you set object tags ==== |
| - | to exactly one project at a time, so this is a move, not an addition. Nothing | + | |
| - | below is even evaluated until this is true. | + | |
| - | ==== Match 1 — picks which deployment ==== | + | You are prompted to enter Tags during creation of, and can edit them on, these objects: |
| - | ^ On the node ^ ^ On the deployment | + | * Edge nodes (onboarding flow and Basic Info tab). |
| - | | '' | + | * Projects (Details / Basic Info). |
| + | * Edge applications and edge app policies. | ||
| + | | ||
| + | * Network instances. | ||
| + | * Edge Kubernetes Service clusters and cluster instances. | ||
| - | A project can hold more than one recipe. This says which one this node gets. | + | In the GUI a tag is entered as a key field plus a value field, then committed with the plus (+) sign, e.g. key '' |
| - | ==== Match 2 — picks which policies | + | ==== Zero-Touch Deployments (the main reason object tags matter) |
| - | ^ On the node — tags ^ ^ On each policy — target condition | + | ZTD is the automation built on tagging plus projects. The mechanics, as documented: |
| - | | '' | + | |
| - | One deployment | + | * When you onboard a node, add an application, |
| - | only the ones whose condition its tags satisfy. | + | * ZEDEDA Cloud matches the tags on edge nodes to the tags on deployments and applications **within the same project**. |
| + | * Matching | ||
| + | * To change what runs on a node, you change | ||
| - | ==== Match 3 — plumbing, never touched in a demo ==== | + | Versioning and rollback ride on the same mechanism: |
| - | ^ On the network policy — tags ^ ^ On the app' | + | * Existing deployments are immutable; you create new **versions** instead. A project retains up to 100 of its most recent deployments. |
| - | | '' | + | * To roll a node back (or forward) to a specific version, edit the node' |
| - | The network | + | Note: the public documentation states that node tags are " |
| - | by name. It finds it by tag instead. | + | |
| - | **Tip:** matches 2 and 3 both use the key '' | ||
| - | makes them look related when they are not. Renaming the network tag key to | ||
| - | something like '' | ||
| - | nodes, '' | ||
| - | Only matches 1 and 2 are set on the node. | + | ==== Cluster |
| - | ===== What you actually do ===== | + | * When adding nodes to an Edge Kubernetes Service cluster in the GUI, you supply existing **Edge Node Tags** and existing **Edge Node Network Adapter Tags** to pick the nodes and the adapters used for cluster routing. |
| + | * For the cluster network, choosing **Tag** (instead of Default) means you specify a tag that must match the tag used when creating the switch network instances on the nodes. Network instances carrying that tag are picked up on all cluster nodes to form the cluster network. | ||
| - | - Move the node into the project. In ZedControl, change the node's project to the deployment project. | + | {{ : |
| - | - Set its deployment | + | |
| - | - Set its tags: '' | + | |
| - | That is the entire action. No Terraform run, no touching the node. Within | + | * Adapter labels (shared labels) let you assign |
| - | minute | + | |
| - | and the app comes up. | + | |
| - | Instances are named from the project, the app and the device, so two nodes under | + | **For non-clustered - EVE-KVM based edge nodes** |
| - | one deployment never collide: | + | |
| + | {{ : | ||
| + | ===== Tags in the API ===== | ||
| + | |||
| + | The public API exposes object tags as a '' | ||
| + | |||
| + | ZCLI, which sits on the same API, exposes tags as repeatable '' | ||
| < | < | ||
| - | cisco-policy-demo.nginx.TF-CISCO-UCS-130C-M8-32 | + | zcli edge-node create < |
| + | [--tags=< | ||
| + | [--network-tag=< | ||
| + | [--deployment-tag=< | ||
| + | [--activate] | ||
| + | |||
| + | zcli edge-node update < | ||
| + | |||
| + | zcli project update < | ||
| + | |||
| + | zcli cluster-instance create < | ||
| + | --edge-node-pool-tag=< | ||
| + | [--network-tag=< | ||
| + | [--tags=< | ||
| </ | </ | ||
| - | To drain a node, clear its deployment tag. To reset between runs, set it again. | + | A concrete cluster-instance example from the docs: |
| - | ===== Changing the recipe ===== | + | < |
| + | zcli cluster-instance create test_instance --k3s-edge-app=k3s_on_ubuntu_with_logs \ | ||
| + | --project=adarsh-dev --edge-node-pool-tag=adarsh-k3s: | ||
| + | --cluster-config="/ | ||
| + | --title="test title" --description="test description" | ||
| + | --tags=clusterTagKey: | ||
| + | </ | ||
| - | **A deployment cannot be edited in place.** Terraform will report a successful | + | Full API endpoint |
| - | apply and the controller | + | |
| - | even goes clean afterwards. | + | |
| - | Any change to a deployment needs a destroy | + | ===== Tags in Terraform ===== |
| - | refused while a node is still attached, so unbind first: | + | |
| + | The '' | ||
| + | |||
| + | |||
| + | ==== Object tags on resources ==== | ||
| + | |||
| + | '' | ||
| < | < | ||
| - | 1. clear the node's deployment_tag, | + | resource " |
| - | 2. terraform apply -replace='...zedcloud_deployment.demo' | + | |
| - | 3. set the deployment_tag back, apply | + | title |
| + | project_id = zedcloud_project.cruise.id | ||
| + | model_id | ||
| + | |||
| + | tags = { | ||
| + | location | ||
| + | vertical | ||
| + | role = " | ||
| + | } | ||
| + | } | ||
| </ | </ | ||
| - | If you edited a deployment and nothing changed | + | ==== Port tags vs object tags on a network instance ==== |
| - | always why. | + | |
| - | ===== Nothing deployed — what to check ===== | + | A network instance carries both an object-level '' |
| - | Every one of these fails // | + | < |
| - | the list. | + | resource " |
| + | name = " | ||
| + | project_id = zedcloud_project.cruise.id | ||
| + | kind = " | ||
| - | | + | |
| - | | + | purpose = " |
| - | | + | |
| - | * Do the node's tags satisfy every policy's target condition? | + | |
| - | * Does the controller still hold policies you thought you deleted? | + | |
| - | * Does the app rely on a default | + | uplink = " |
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Adapter / interface tags on the node ==== | ||
| + | |||
| + | The edge node' | ||
| + | |||
| + | < | ||
| + | " | ||
| + | " | ||
| + | </ | ||
| + | |||
| + | ==== Importing existing tagged objects ==== | ||
| + | |||
| + | < | ||
| + | terraform import zedcloud_edgenode.ship_42 3ab53292-ad51-4807-9ae7-d2882cc3c600 | ||
| + | </ | ||
| - | ==== Two red herrings | + | ===== Worked ZTD example ===== |
| - | A node reading | + | Goal: run app version v2 on the " |
| - | too. It does not mean the node is inactive. | + | |
| - | Testing a published port // | + | * Tag the canary nodes '' |
| - | originating on the host skips the rule that redirects it. Test from another | + | * Create deployment version that targets '' |
| - | machine. | + | * The controller deploys v2 to canary nodes and v1 to stable nodes, all within |
| + | * To promote: change a node's '' | ||
| + | * To roll back a node: set its Deployment Tag Name to the tag of the earlier stored version. | ||
| - | ---- | + | ===== Gotchas ===== |
| - | Verified end to end on a Cisco UCS edge node: network instance, volume | + | * '' |
| - | all created by policy, reachable | + | * Object tags ('' |
| + | * Tag **names** are case-insensitive but **values** are case-sensitive, | ||
| + | * Minimum length is 3 for both key and value, which rules out short codes like '' | ||
| + | * Cluster network selection by Tag requires the network-instance tag to match exactly the tag used when the switch NIs were created | ||
| + | * Deployments are immutable and versioned (max 100 retained per project); you re-target nodes by changing tags, not by editing a deployment in place. | ||
| - | Terraform reference: '' | + | ===== Sources ===== |
| - | '' | + | |
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
zededa/tagging.1786450470.txt.gz · Last modified: by mc
