Skip to content

SysEleven OpenStack Cloud - Server Groups

Concepts

Server groups provide a mechanism for indicating the locality of servers relative to other servers. They allow you to indicate whether servers should run on the same host (affinity) or different hosts (anti-affinity). Affinity is advantageous if you wish to minimise network latency, while anti-affinity can improve fault-tolerance and load distribution.

Server groups can be configured with a policy and rules. There are currently four policies supported:

affinity
Restricts instances belonging to the server group to the same host.
anti-affinity
Restricts instances belonging to the server group to separate hosts.
soft-affinity
Attempts to restrict instances belonging to the server group to the same host. Where it is not possible to schedule all instances on one host, they will be scheduled together on as few hosts as possible.
soft-anti-affinity
Attempts to restrict instances belonging to the server group to separate hosts. Where it is not possible to schedule all instances to separate hosts, they will be scheduled on as many separate hosts as possible.

List Server Groups

Image title To get a list of all server groups in a region you can click on the Server Groups icon in the sidebar.

List Server Groups

You can access the list of server groups from the side bar, clicking the Server Groups icon.

From the list you can:

  • Create a new server group
  • Navigate to the details page of a server group by clicking the name of a group.
  • Delete a server group using the option

Configure CLI

Usage

openstack server group list

Create Server Group

Create Server Groups You can create a server group by clicking the Create option on the list of server groups.

To create the server group simply

  1. Provide a name for the group
  2. Select the policy to apply.
  3. Click OK

You can now select the new group during server creation to control placement.

Configure CLI

Usage

openstack server group create --policy <policy> <name>
<policy>
Policy associated with the server group you are creating
Choose from: affinity anti-affinity soft-affinity soft-anti-affinity
<name>
Name of the server group to create

OpenStack Terraform Provider

Example:

# Terraform Provider configuration

terraform {
  required_providers {
    openstack = {
      source  = "terraform-provider-openstack/openstack"
    }
  }
}

resource "openstack_compute_servergroup_v2" "server-group" {
  name     = "server-group"
  policies = ["anti-affinity"]
}

Inspect Server Group

Info

Note that server groups are immutable.

Inspect Server Group You can access the detail page of a server group from the list of server groups by clicking the name of a group.

The detail page lists the servers that are assigned to the server group.

You can add more servers to a server group by selecting the group during server creation.

Configure CLI

Usage

openstack server group show <server-group>
<server-group>
Identifier of group you want to show details for

Delete Server Group

Info

Deleting a server group will not perform any disruptive changes on the servers in that server group

Delete Server Group

You can delete a server group by clicking the option on the server group list

Configure CLI

Usage

openstack server group delete <server-group>
<server-group>
Identifier of server group to be deleted
Also takes a list of identifiers for bulk deletion