Tenant Primitives#

Note

Tenants, tenancies, and other features are available if you have paid for multi-tenant support. Contact Penguin Computing to learn more.

ICE ClusterWare ™ tenants primitives represent customers who lease a subsection of a larger cluster. A multi-tenant cluster can have one or more tenants.

Tenant API calls can only be made by the superadministrator.

Data Fields#

Tenant primitives can have several fields:

name
      Required: Name of the tenant within the ClusterWare software.
                Names must start with an alphabet character, not a number.

description
      Optional: A text string with descriptive information.

tenancies
      Updated by ClusterWare. List of tenancies owned by the tenant. Each
                tenant can own one or more tenancies.

Additional Endpoints#

The following basic endpoints allow control over the tenant:

POST /tenants
    Creates a new tenant with the name specified.

GET /tenant/<UID>
    Returns the details of the tenant, including any tenancies the tenant owns.

POST /tenant/<UID>/newtoken
    Create a tenant token.

The tenant primitive is also used for tenancy actions, such as creating a new tenancy owned by that tenant.

POST /tenant/<UID>/tenancies
    Creates a new tenancy based on the provided Terraform file.

GET /tenant/<UID>/tenancies
    List the tenancies associated with the tenant. Accepts the
    "show_details=true" parameter.

DELETE /tenant/<ident>/tenancy/<tenancy>
   Deletes the existing tenancy owned by the tenant by removing the tenancy
   infrastructure nodes, moving tenancy compute nodes to the Quarantine
   tenancy, and deleting the tenancy from the ClusterWare database.

Example#

Create a new tenant:

curl -X POST https://super1.cluster.local/api/v1/tenants \
    --data '{"name":"TenantCustomer"}' -H "Authorization: Bearer $token"
{"success": true, "data": "341b9947f6e644b78f6d88f5d7f898f4"}

Create a new tenancy:

curl -X POST https://super1.cluster.local/api/v1/tenant/TenantCustomer/tenancies \
    -F "file=@main.tf" -H "Authorization: Bearer $token" -H "Tenancy: CustomerTenancy"
{"success": true, "result": "Tenancy CustomerTenancy request is submitted \
      successfully. Please try GET /tenancy/CustomerTenancy later."}