openstacksdk/doc/source/user/guides/clustering/cluster.rst

4.5 KiB

Managing Clusters

Clusters are first-class citizens in Senlin service design. A cluster is defined as a collection of homogeneous objects. The "homogeneous" here means that the objects managed (aka. Nodes) have to be instantiated from the same "profile type".

List Clusters

To examine the list of receivers:

../../examples/clustering/cluster.py

When listing clusters, you can specify the sorting option using the sort parameter and you can do pagination using the limit and marker parameters.

Full example: manage cluster

Create Cluster

When creating a cluster, you will provide a dictionary with keys and values according to the cluster type referenced.

../../examples/clustering/cluster.py

Optionally, you can specify a metadata keyword argument that contains some key-value pairs to be associated with the cluster.

Full example: manage cluster

Get Cluster

To get a cluster based on its name or ID:

../../examples/clustering/cluster.py

Full example: manage cluster

Find Cluster

To find a cluster based on its name or ID:

../../examples/clustering/cluster.py

Full example: manage cluster

Update Cluster

After a cluster is created, most of its properties are immutable. Still, you can update a cluster's name and/or params.

../../examples/clustering/cluster.py

Full example: manage cluster

Delete Cluster

A cluster can be deleted after creation, When there are nodes in the cluster, the Senlin engine will launch a process to delete all nodes from the cluster and destroy them before deleting the cluster object itself.

../../examples/clustering/cluster.py

Cluster Add Nodes

Add some existing nodes into the specified cluster.

../../examples/clustering/cluster.py

Cluster Del Nodes

Remove nodes from specified cluster.

../../examples/clustering/cluster.py

Cluster Replace Nodes

Replace some existing nodes in the specified cluster.

../../examples/clustering/cluster.py

Cluster Scale Out

Inflate the size of a cluster.

../../examples/clustering/cluster.py

Cluster Scale In

Shrink the size of a cluster.

../../examples/clustering/cluster.py

Cluster Resize

Resize of cluster.

../../examples/clustering/cluster.py

Cluster Policy Attach

Once a policy is attached (bound) to a cluster, it will be enforced when related actions are performed on that cluster, unless the policy is (temporarily) disabled on the cluster

../../examples/clustering/cluster.py

Cluster Policy Detach

Once a policy is attached to a cluster, it can be detached from the cluster at user's request.

../../examples/clustering/cluster.py

Cluster Check

Check cluster health status, Cluster members can be check.

../../examples/clustering/cluster.py

Cluster Recover

To restore a specified cluster, members in the cluster will be checked.

../../examples/clustering/cluster.py