Skip to main content

Admin cmdlets

The Clustron.Zaris.AdminShell PowerShell module provides administrative commands for managing Clustron Zaris stores and their instances across a cluster's Management Services.

These cmdlets let administrators and DevOps engineers:

  • Create and configure distributed stores
  • Start and stop stores and individual instances
  • Scale the cluster and manage individual nodes
  • Configure token security, users, and roles
  • Configure transport TLS and manage the cluster CA
  • Inspect store and node status, and run cluster diagnostics
  • Monitor live runtime metrics

Prerequisites

Import the module, then confirm the commands are available.

Import-Module Clustron.Zaris.AdminShell
Get-Command -Module Clustron.Zaris.AdminShell

Most cmdlets act on one or more Management Service endpoints. You can either activate a workspace (see the workspace cmdlets below) or pass -Managers directly on each call.

Cmdlets

Every AdminShell cmdlet has a full reference page. They fall into the groups below, which mirror the categories in the sidebar.

Workspaces

A workspace is a named binding to the cluster's managers. Activate one before running store, server, or node commands (or pass -Managers per call).

CmdletDescription
New-ZrWorkspaceCreates a workspace targeting one or more managers; pass -Activate to make it the session's target.
Use-ZrWorkspaceReactivates a saved workspace, or joins an existing one from a seed manager.
Connect-ZrManagerSigns the shell in with a username/password (-Credential) so admin cmdlets are authenticated when security is enabled.
Get-ZrWorkspaceLists saved workspaces and marks the active one.
Set-ZrWorkspaceUpdates a saved workspace's name, managers, or token.
Remove-ZrWorkspaceDeletes a saved workspace.

Stores

CmdletDescription
New-ZrStoreCreates a new distributed store from a partitions-per-node and replication-factor layout (supervisor mode).
Register-ZrStoreAdopts an externally-run (attach-mode) store on the manager without starting any processes.
Get-ZrStoreShows stores and their per-node status.
Start-ZrStoreStarts all instances of a store, or a single named instance.
Stop-ZrStoreStops all instances of a store, or a single named instance.
Remove-ZrStoreRemoves a store from the cluster.
Watch-ZrStoreMetricsContinuously displays live per-node metrics for a store.

Servers and nodes

The scaling unit is the server, never a single store. Adding or removing a server grows or shrinks the whole workspace's cluster, and every store's partitions redistribute across the new membership.

CmdletDescription
Add-ZrServerAdds a server to the workspace, growing the cluster so every store takes on the new server's share (lossless scale-out).
Remove-ZrServerRemoves a server from the workspace, shrinking the cluster across every store (scale-in).
Get-ZrNodeShows a store's nodes and their roles, or a single node in detail.
Get-ZrNodeRoleReports the current role of a node in a store.
Start-ZrNodeStarts one or more named nodes of a store.
Stop-ZrNodeStops one or more named nodes; a single-node stop drains and leaves the cluster by default.
Restart-ZrNodeRestarts one or more named nodes (a stop followed by a start).

Security

Token-based authentication and role-based access, backed by the cluster's signing keys. See Authentication and tokens and Authorization and RBAC for the concepts.

CmdletDescription
Initialize-ZrSecurityProvisions security across managers, creates the bootstrap admin, and enables enforcement.
Enable-ZrSecurity / Disable-ZrSecurityTurns cluster-wide authentication enforcement on or off.
Enable-ZrStoreSecurity / Disable-ZrStoreSecurityTurns token verification on or off for a specific store's nodes.
Get-ZrSecurityStatusReports whether security is initialized and enforced.
New-ZrUser / Remove-ZrUser / Get-ZrUserManage username/password identities.
New-ZrServiceAccountCreates a passwordless machine identity and returns its token.
Set-ZrUserPasswordSets a new password for an existing user.
Grant-ZrRole / Revoke-ZrRole / Get-ZrRole / Get-ZrGrantManage role assignments and inspect effective grants.
New-ZrToken / Revoke-ZrTokenIssue and revoke bearer tokens.
Get-ZrPublicKeyRetrieves the token-verification public keys.

TLS and CA

Transport encryption and the cluster certificate authority. See TLS encryption and CA trust modes.

CmdletDescription
Enable-ZrStoreTls / Disable-ZrStoreTls / Get-ZrStoreTlsStatusTurn transport TLS on or off for a store and check its status.
Enable-ZrManagementHttps / Disable-ZrManagementHttps / Get-ZrManagementHttpsStatusTurn control-plane HTTPS on or off for the Management Service and console.
Import-ZrClusterCaAdopts an operator-provided CA as the cluster CA (BYO-CA).
Get-ZrClusterCaCertExports the cluster CA's public certificate for client trust.
Backup-ZrClusterCaKey / Restore-ZrClusterCaKeyBack up or restore the cluster CA private key (passphrase-encrypted).
New-ZrEnrollmentTokenIssues a short-lived token for a node to enroll and obtain a leaf certificate.

Diagnostics

Read-only commands for inspecting cluster state. See Monitoring and Troubleshooting.

CmdletDescription
Get-ZrInfoReports manager and cluster information.
Get-ZrPartitionMapShows the partition-to-node ownership map.
Get-ZrPartitionRuntimeShows live per-partition runtime state.
Get-ZrConnectionsShows per-node peer connection state.
Get-ZrMembershipShows the current leader and active members.
Get-ZrStoreCountReports item counts per node, with optional per-segment detail.

Use Get-Command -Module Clustron.Zaris.AdminShell and Get-Help <cmdlet> for the complete list and their parameters.

Typical workflow

Activate a workspace (or pass -Managers), create a store, start it, and watch it.

New-ZrStore -Name orders -ReplicationFactor 2 -BaseClusterPort 7811 -BaseClientPort 7861

Start-ZrStore -Name orders

Get-ZrStore -Name orders

Watch-ZrStoreMetrics -StoreName orders