Skip to content

Commit cd5b7e8

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "docs: Add documentation on server groups"
2 parents 6c30893 + 7ce48d1 commit cd5b7e8

File tree

4 files changed

+92
-2
lines changed

4 files changed

+92
-2
lines changed

doc/source/admin/scheduling.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,9 @@ For example, when using the :command:`openstack server create` command, use the
745745
746746
$ openstack server group create --policy affinity group-1
747747
$ openstack server create --image IMAGE_ID --flavor 1 \
748-
--hint group=SERVER_GROUP_UUID server-1
748+
--hint group=SERVER_GROUP_UUID server-1
749+
750+
For more information on server groups, refer to :doc:`/user/server-groups`.
749751

750752

751753
.. _ServerGroupAntiAffinityFilter:
@@ -765,7 +767,9 @@ For example, when using the :command:`openstack server create` command, use the
765767
766768
$ openstack server group create --policy anti-affinity group-1
767769
$ openstack server create --image IMAGE_ID --flavor 1 \
768-
--hint group=SERVER_GROUP_UUID server-1
770+
--hint group=SERVER_GROUP_UUID server-1
771+
772+
For more information on server groups, refer to :doc:`/user/server-groups`.
769773

770774

771775
``SimpleCIDRAffinityFilter``

doc/source/user/availability-zones.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ zone feature. However, the implementation of these features differs vastly
1515
between these different services. Consult the documentation for these other
1616
services for more information on their implementation of this feature.
1717

18+
.. tip::
19+
20+
Server Groups provide another mechanism for configuring the colocation of
21+
instances during scheduling. For more information, refer to
22+
:doc:`/user/server-groups`.
23+
1824

1925
Usage
2026
-----

doc/source/user/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ End user guide
1919

2020
availability-zones
2121
launch-instances
22+
server-groups
2223
metadata
2324
manage-ip-addresses
2425
certificate-validation

doc/source/user/server-groups.rst

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
=============
2+
Server Groups
3+
=============
4+
5+
Server groups provide a mechanism for indicating the locality of servers
6+
relative to other servers. They allow you to indicate whether servers should
7+
run on the same host (affinity) or different hosts (anti-affinity). Affinity is
8+
advantageous if you wish to minimise network latency, while anti-affinity can
9+
improve fault-tolerance and load distribution.
10+
11+
.. note::
12+
13+
Server groups are useful for separating or grouping workloads but should
14+
not generally be relied on to provide HA. Instead, consider using
15+
availability zones. Unlike server groups, availability zones can only be
16+
configured by admins but they are often used to model failure domains,
17+
particularly in larger deployments. For more information, refer to
18+
:doc:`/user/availability-zones`.
19+
20+
Server groups can be configured with a policy and rules. There are currently
21+
four policies supported:
22+
23+
``affinity``
24+
Restricts instances belonging to the server group to the same host.
25+
26+
``anti-affinity``
27+
Restricts instances belonging to the server group to separate hosts.
28+
29+
``soft-affinity``
30+
Attempts to restrict instances belonging to the server group to the same
31+
host. Where it is not possible to schedule all instances on one host,
32+
they will be scheduled together on as few hosts as possible.
33+
34+
.. note::
35+
36+
Requires API microversion 2.15 or later.
37+
38+
``soft-anti-affinity``
39+
Attempts to restrict instances belonging to the server group to separate
40+
hosts. Where it is not possible to schedule all instances to separate hosts,
41+
they will be scheduled on as many separate hosts as possible.
42+
43+
.. note::
44+
45+
Requires API microversion 2.15 or later.
46+
47+
There is currently one rule supported:
48+
49+
``max_server_per_host``
50+
Indicates the max number of instances that can be scheduled to any given
51+
host when using the ``anti-affinity`` policy. This rule is not compatible
52+
with other policies.
53+
54+
.. note::
55+
56+
Requires API microversion 2.64 or later.
57+
58+
59+
Usage
60+
-----
61+
62+
Server groups can be configured and used by end-users. For example:
63+
64+
.. code-block:: console
65+
66+
$ openstack --os-compute-api-version 2.64 server group create \
67+
--policy POLICY --rule RULE NAME
68+
69+
Once a server group has been created, you can use it when creating a server.
70+
This is achieved using the ``--hint`` option. For example:
71+
72+
.. code-block:: console
73+
74+
$ openstack server create \
75+
--hint group=SERVER_GROUP_UUID ... NAME
76+
77+
Once created, a server group cannot be modified. In addition, a server cannot
78+
move between server groups. In both cases, this is because doing so would
79+
require potentially moving the server to satisfy the server group policy.

0 commit comments

Comments
 (0)