
While we should not start using this for cloning things in the gate yet, the opendev.org links provide for a nicer browsing experience already even though the service is in beta. Go ahead and swap our browsing links. While in there, remove some masakari references to github links to the source code. Masakari now publishes api docs to developer.openstack.org so there is no need to point people to source code for api docs. Change-Id: I14afa3476f9832ef433ec744e888348fc9a359e3
4.6 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
Add Nodes to Cluster
Add some existing nodes into the specified cluster.
../../examples/clustering/cluster.py
Remove Nodes from Cluster
Remove nodes from specified cluster.
../../examples/clustering/cluster.py
Replace Nodes in Cluster
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
Attach Policy to Cluster
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
Detach Policy from Cluster
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