Tenancy Primitives#
Note
Tenants, tenancies, and other features are available if you have paid for multi-tenant support. Contact Penguin Computing to learn more.
The ICE ClusterWare ™ tenancy primitives represent the leased subsection of a larger cluster that includes bare metal compute nodes, a head node, and other supporting infrastructure. Tenancies are owned by a tenant. A multi-tenant cluster has multiple tenancies.
Most tenancy-related API calls are made by either the superadministrator, but select API calls can be made by the tenancy administrator. When calls are made by the tenancy administrator, authorization is provided by the tenancy token that was assigned when the tenancy was created. API calls by the superadministrator use standard user authorization tokens.
Data Fields#
Tenancy primitives can have several fields:
name
Required: Name of the tenancy within the ClusterWare software.
Names must start with an alphabet character, not a number.
description
Optional: A text string with descriptive information.
tenant
Required: Name of the tenant that owns the tenancy.
Additional Endpoints: From Tenancy#
There are several endpoints intended to be used by internal tenancy scripts and automated processes. The endpoints originate from the tenancy and are sent to the super-cluster with the tenancy token for authorization.
GET /tenancy/members
List the compute nodes within the tenancy.
GET /tenancy/power/<mac address>
Returns the power information for the node specified by the mac address.
POST /tenancy/power/<mac address>
Sets the power control for the node specified by the mac address.
Additional Endpoints: From Super-Cluster#
Creating a tenancy is done from the super-cluster, but should be handled via the Tenant Primitives API and a terraform file.
Several endpoints provide details and control over the compute nodes within the
tenancy and are intended for use by the superadministrator. For example,
POST /tenancy/<UID>/nodes allows you to assign compute nodes to the tenancy.
POST /tenancy/<UID>/nodes
Assign new nodes to the tenancy.
DELETE /tenancy/<UID>/nodes
Remove nodes from the tenancy.
Tenancy administrator access to certain actions requires the use of a token for authentication.
POST /tenancy/<UID>/newtoken
Create a tenancy token.
There is a special endpoint used to delete a tenancy and remove all nodes and associated infrastructure.
DELETE /tenancy/teardown/<UID>
Removes the infrastructure nodes, moves tenancy compute nodes to the
Quarantine tenancy, and deletes the tenancy from the ClusterWare database.
Example: From Tenancy#
List the compute nodes within the tenancy:
curl -X GET https://super1.cluster.local/api/v1/tenancy/members \
-H "Authorization: Bearer $token"
Power off a node within the tenancy:
curl -X POST https://super1.cluster.local/api/v1/tenancy/power/11:22:33:44:55:66 \
--data '{"state":"power off"}' -H "Authorization: Bearer $token"
Example: From Super-Cluster#
List all tenancies:
curl -X GET https://super1.cluster.local/api/v1/tenancies \
-H "Authorization: Bearer eyJhbGciOiJIUzI1Ni…"
{"success": true, "data": ["a1784dca68fc4d4a8ded294d4d3e43ee", \
"7b9b0a83020b4bf4a94df723f6c93eab", "4d4cfd4ed0e746378cc68dbb81bc7373", \
"68fecf6ad1084c94ac1f5b97bbbc9ec4", "a9e6642e7538490a97acc88667d67b49"]}
List details about the Available tenancy, including a list of node members:
curl -X GET https://super1.cluster.local/api/v1/tenancy/Available/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1Ni…"
{"success": true, "data": {"name": "Available", "last_modified": 1758749898.1258032, \
"last_modified_on": "head1", "last_modified_by": "admin", \
"nodes": ["n6", "n5", "n3", "n4", "n2"], "vlans": [5], "vnis": [4099], \
"pkeys": [4], "tenant": "cw-management", \
"uid": "4d4cfd4ed0e746378cc68dbb81bc7373"}}
Add nodes to a tenancy:
curl -X POST https://super1.cluster.local/api/v1/tenancy/CustomerTenancy/nodes \
--data '{"mac":"11:22:33:44:55:66","mac":"66:55:44:33:22:11"}' \
-H "Authorization: Bearer eyJhbGciOiJIUzI1Ni…"
{"success": true, "data": {"success": true, \
"data": {"521273c5fa0c4b579a472ec8940025f0": {"success": true}}}}
Remove a node from a tenancy:
curl -X DELETE https://super1.cluster.local/api/v1/tenancy/CustomerTenancy/nodes \
--data '{"mac":"11:22:33:44:55:66"}' -H "Authorization: Bearer eyJhbGciOiJIUzI1Ni…"
{"success": true, "data": {"success": true, \
"data": {"521273c5fa0c4b579a472ec8940025f0": {"success": true}}}}