Orka 2.0 has arrived, and with it, several new features have been introduced including the ability to tag nodes and deploy VMs to nodes with that tag!
Node tagging gives you the option to put as many tags on an Orka node as you want and then use those tags to tell VMs where to deploy. These tags can be almost any set of words you want them to be. For example, you might choose “ci” for your CI runners, or you might choose “devteam” if you want to give your dev team specific nodes to target without completely locking them down with groups, etc.
Imagine your Orka cluster has 3 worker nodes with 12 vCPU each.
On a regular day, you have 6 VMs with 3 vCPUs each spread over those 3 worker nodes, and you don’t really need to know which nodes are which. However, the day before a code freeze, suddenly your developers are running dozens of CI processes and you run out of space on your nodes for other work!
You could create a group and dedicate some nodes to CI and only deploy CI runners there, but then you can’t use those nodes for anything else.
Instead of dedicating some nodes to CI, you can tag a few nodes with “ci-pool”, for example, and then use that tag when deploying CI VMs. Additionally, you can choose if the VM must deploy to that tag, or if it just prefers to deploy to that tag.
When the CI VM attempts to deploy to “ci-pool”, one of 3 things will happen:
For our above example, we’ll need to tag one or more nodes with the tag “ci-pool.”
See CLI Docs
// Note: CLI tagging requires an administrative user license
// add the tag to the node
orka node tag -n mini-1 --tag ci-pool -y
// verify the tag
orka nodes
// Ex Output:
orka nodes
┌────────┬───────────────┬─────────┬─────────────────┬───────┬───────┬─────────┐
│ Node │ IP │ CPU │ Memory │ State │ Group │ Tags │
├────────┼───────────────┼─────────┼─────────────────┼───────┼───────┼─────────┤
│ mini-1 │ 10.221.188.11 │ 9 / 12 │ 47.33G / 62.63G │ READY │ │ ci-pool │
├────────┼───────────────┼─────────┼─────────────────┼───────┼───────┼─────────┤
│ mini-2 │ 10.221.188.12 │ 9 / 12 │ 47.33G / 62.63G │ READY │ │ │
├────────┼───────────────┼─────────┼─────────────────┼───────┼───────┼─────────┤
│ mini-3 │ 10.221.188.13 │ 12 / 12 │ 62.43G / 62.63G │ READY │ │ │
├────────┼───────────────┼─────────┼─────────────────┼───────┼───────┼─────────┤
│ mini-4 │ 10.221.188.14 │ 11 / 12 │ 62.30G / 62.63G │ READY │ │ │
└────────┴───────────────┴─────────┴─────────────────┴───────┴───────┴─────────┘
See API Docs
curl --location --request POST '<orka api url>/resources/node/tag/ci-pool' \
--header 'Content-Type: application/json' \
--header 'orka-licensekey: <license-key>' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"orka_node_name": "macpro-1"
}'
See CLI Docs
// Deploy an existing VM
// Don't require the tag
orka vm deploy -v <vm name> --tag ci-pool -y
// Require the tag
orka vm deploy -v <vm name> --tag ci-pool -y --tagRequired=true
// Create a new VM and save the tag to the configuration
orka vm create -v <vm name> --tag ci-pool -y
See API Docs
curl --location --request POST '<orka api url>/resources/vm/deploy' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"orka_vm_name": "myorkavm",
"tag": "ci-pool",
"tag_required": true
}'
Node tagging is one of the many exciting feature additions to Orka 2.0. It allows teams granular control over which processes are deployed to particular nodes or groups of nodes, which will allow your team much more flexibility in the way that they utilize the compute resources provided by an Orka cluster.
There two fundamental options teams can choose from when employing node tagging in Orka. They can require that a specific process be deployed to a node with a matching tag, or they can give preference to a node that with a matching tag, but still execute the process on any available node should a preferred node not be available.