Add Support for Nova Server Groups

Registered by Brad Pokorny

Summary
=======
Horizon users should be able to manage server groups and choose a server group when booting VMs. Nova currently has os-server-groups API’s (http://developer.openstack.org/api-ref-compute-v2.1.html) for managing server groups, so Horizon can create, read, update, and delete and also get a list of server groups for a tenant to allow specification of a group when booting a VM.

This blueprint is similar to https://blueprints.launchpad.net/horizon/+spec/nova-filter-scheduling-method , but this new blueprint clarifies what’s needed for server groups.

Motivation
=========
Nova server groups allow users to specify that a VM should or should not be hosted on the same compute node as another group of VM’s. For example, that vm2 should run on physical hardware different from vm1. This is useful for disaster recovery and ensuring appropriate redundancy across hardware. Policies for server groups can use "affinity" and "anti-affinity" properties to ensure VM’s associated with the groups are placed accordingly.

Description
==========
In the Project -> Compute category, we could have another dashboard called “Server Groups”. The initial page load for Server Groups would list all the groups in the current tenant. It should allow the user to create a new group, show details of existing groups, and delete groups. When creating a new group, we should allow the user to specify one or more policy names.

On the Launch Instance workflow in the “Advanced Options” tab, we can add a dropdown list with all the server groups available to the tenant. This would require another API call to Nova when loading the workflow to get the list of available groups.

UX
==
Horizon users will now have a dashboard for managing server groups and a way to specify a server group when launching an instance.

Testing
======
Reviewers will be able to pull the patch and create and use server groups with their Nova instances to test.

Example of creating a server group with the Nova CLI:

  nova server-group-create group1 affinity

The last argument of the command specifies the policy that nova can use when scheduling instances.

Outside Dependencies
==================
Is this functionality already supported in other services? Yes, Nova currently supports this.

List the appropriate API calls and if they are extensions or base API functionality. The Nova API’s for server groups are on the base 2.1 API’s.
http://developer.openstack.org/api-ref-compute-v2.1.html

In addition, we would need to add specifying properties as scheduler hints (the property would be the server group in this case) when booting instances.

Via the openstack command line, this is an example of specifying a server group with UUID “group1” when booting an instance:

  openstack server create --image <imageID> --flavor <flavorID> --security-group default --hint group=group1 --nic net-id=<NetworkID> <VMName>

Requirements Update Required
==========================
None

Doc Impact
=========
Document usage of server groups when booting VM’s, and document the new server groups dashboard.

Blueprint information

Status:
Complete
Approver:
Rob Cresswell
Priority:
Medium
Drafter:
Brad Pokorny
Direction:
Approved
Assignee:
Brad Pokorny
Definition:
Approved
Series goal:
Accepted for 10.0.0-newton
Implementation:
Implemented
Milestone target:
milestone icon newton-3
Started by
Brad Pokorny
Completed by
Rob Cresswell

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/nova-server-groups,n,z

Addressed by: https://review.openstack.org/217617
    Choose a server group when booting a VM

Addressed by: https://review.openstack.org/336158
    Choose a server group when booting a VM with NG launch instance

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.