Skip to content

Commit

Permalink
Merge "Bug #943178: aggregate extension lacks documentation"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Mar 7, 2012
2 parents 3383800 + 21c779d commit 0bd3b47
Show file tree
Hide file tree
Showing 2 changed files with 187 additions and 0 deletions.
122 changes: 122 additions & 0 deletions doc/source/api_ext/ext_aggregates.rst
@@ -0,0 +1,122 @@
About This Extension
====================

This extension introduces the concept of aggregates into Nova. Host aggregates are different from zones and availability zones: while the former allows the partition of Nova deployments into logical groups for load balancing and instance distribution, the latter are for providing some form of physical isolation and redundancy from other availability zones (e.g. by using separate power supply and network gears). Availability zones do not necessarily mean geographic distribution whereas zones usually do. Host aggregates can be regarded as a mechanism to further partitioning an availability zone, i.e. into multiple groups of hosts that share common resources like storage and network. This enables a finer level of granularity in which to structure an entire OpenStack deployment. Aggregates allows higher availability of a single guest instance within an availability zone, it enables advanced VM placement strategies, and more importantly it enables hosts' zero-downtime upgrades (for example, via VM live migration across members of the aggregate, thus causing no disruption to guest instances).

You can use this extension when you have multiple Compute nodes installed (only XenServer/XCP via xenapi driver is currently supported), and you want to leverage the capabilities of the underlying hypervisor resource pools. For example, you want to enable VM live migration (i.e. VM migration within the pool) or enable host maintenance with zero-downtime for guest instances. Please, note that VM migration across pools (i.e. storage migration) is not yet supported in XenServer/XCP, but will be added when available. Bear in mind that the two migration techniques are not mutually exclusive and can be used in combination for a higher level of flexibility in your cloud management.

To find more about it, please read http://wiki.openstack.org/host-aggregates or quick-search for 'aggregates' on the Nova developer guide.

Pre-requisites depend on the kind of hypervisor support you are going to use. As for XenServer/XCP, the same requirements for resource pools apply.

To obtain current information the extensions available to you, issue an EXTENSION query on the OpenStack system where it is installed, such as http://mycloud.com/v1.1/tenant/extensions.

Extension Overview
------------------

Name
Host Aggregates

Namespace
http://docs.openstack.org/compute/ext/aggregates/api/v1.1

Alias
OS-AGGREGATES

Contact
Armando Migliaccio <armando.migliaccio@citrix.com>

Status
Released

Extension Version
v1.0 (2012-02-28)

Dependencies
Compute API 1.1

Doc Link (PDF)
http://

Doc Link (WADL)
http://

Short Description
This extension enables the use of hypervisor resource pools in Nova.

Sample Query Responses
----------------------

As shown below, responses to an EXTENSION query in XML or JSON provide basic information about the extension.

Extension Query Response: XML::

<extension name="Aggregates" namespace="http://docs.openstack.org/compute/ext/aggregates/api/v1.1" alias="os-aggregates" updated="2012-01-12T00:00:00+00:00"><description>Admin-only aggregate administration</description></extension>

Extension Query Response: JSON::

{"extension": {"updated": "2012-01-12T00:00:00+00:00", "name": "Aggregates", "links": [], "namespace": "http://docs.openstack.org/compute/ext/aggregates/api/v1.1", "alias": "os-aggregates", "description": "Admin-only aggregate administration"}}


Document Change History
-----------------------

============= =====================================
Revision Date Summary of Changes
2012-02-28 Initial draft
============= =====================================


Summary of Changes
==================
This extension to the OpenStack Compute API allows the creation and management of host aggregates (i.e. pools of compute nodes).

New Action
----------

When a new aggregate has been created, actions can be executed using:

POST /v1.1/<tenant-id>/os-aggregates/<aggregate-id>/action

Valid actions are:

set_metadata
add_host
remove_host

Normal response Code: 200

For example, to set metadata for an aggregate the following xml must be submitted:

{"set_metadata": {"metadata": {"foo_key": "foo_value"}}}

For example, to add a host to an aggregate, the following xml must be submitted:

{"add_host": {"host": "<host-id>"}}

For example, to remove a host from an aggregate, the following xml must be submitted:

{"remove_host": {"host": "<host-id>"}}

Error Response Code(s) conflict (409), badRequest (400), itemNotFound (404)

New Faults
----------
None

New Headers
-----------
None

New Resources
-------------
None

New States
----------
None

Changes to the Cloud Servers Specification
------------------------------------------

None
65 changes: 65 additions & 0 deletions doc/source/devref/aggregates.rst
@@ -0,0 +1,65 @@
..
Copyright 2012 OpenStack, LLC
Copyright 2012 Citrix Systems, Inc.
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.

Host Aggregates
===============

This extension introduces the concept of aggregate into Nova. Host aggregates are different from zones and availability zones: while the former allows the partition of Nova deployments into logical groups for load balancing and instance distribution, the latter are for providing some form of physical isolation and redundancy from other availability zones (e.g. by using separate power supply and network gears). Availability zones do not necessarily mean geographic distribution whereas zones usually do. Host aggregates can be regarded as a mechanism to further partitioning an availability zone, i.e. into multiple groups of hosts that share common resources like storage and network. This enables a finer level of granularity in which to structure an entire OpenStack deployment. Aggregates allows higher availability of a single guest instance within an availability zone, it enables advanced VM placement strategies, and more importantly it enables hosts' zero-downtime upgrades (for example, via VM live migration across members of the aggregate, thus causing no disruption to guest instances).

You can use this extension when you have multiple Compute nodes installed (only XenServer/XCP via xenapi driver is currently supported), and you want to leverage the capabilities of the underlying hypervisor resource pools. For example, you want to enable VM live migration (i.e. VM migration within the pool) or enable host maintenance with zero-downtime for guest instances. Please, note that VM migration across pools (i.e. storage migration) is not yet supported in XenServer/XCP, but will be added when available. Bear in mind that the two migration techniques are not mutually exclusive and can be used in combination for a higher level of flexibility in your cloud management.

Design
=======

The OSAPI Admin API will be extended to support the following operations:

* Aggregates

* list aggregates: returns a list of all the host-aggregates (optionally filtered by availability zone)
* create aggregate: creates an aggregate, takes a friendly name, etc. returns an id
* show aggregate: shows the details of an aggregate (id, name, availability_zone, hosts and metadata)
* update aggregate: updates the name and availability zone of an aggregate
* set metadata: sets the metadata on an aggregate to the values supplied
* delete aggregate: deletes an aggregate, it fails if the aggregate is not empty
* add host: adds a host to the aggregate
* remove host: removes a host from the aggregate, it fails if the host is not disabled or

* Hosts

* start host maintenance (or evacuate-host): disallow a host to serve API requests and migrate instances to other hosts of the aggregate
* stop host maintenance: (or rebalance-host): put the host back into operational mode, migrating instances back onto that host

Using the Nova CLI
==================

Using the nova command you can create, delete and manage aggregates. The following section outlines the list of available commands.

Usage
-----

::

* aggregate-list Print a list of all aggregates.
* aggregate-create <name> <availability_zone> Create a new aggregate with the specified details.
* aggregate-delete <id> Delete the aggregate by its id.
* aggregate-details <id> Show details of the specified aggregate.
* aggregate-add-host <id> <host> Add the host to the specified aggregate.
* aggregate-remove-host <id> <host> Remove the specified host from the specfied aggregate.
* aggregate-set-metadata <id> <key=value> [<key=value> ...] Update the metadata associated with the aggregate.
* aggregate-update <id> <name> [<availability_zone>] Update the aggregate's name and optionally availablity zone.

* host-update --maintenance [enable | disable] Put/resume host into/from maintenance.

0 comments on commit 0bd3b47

Please sign in to comment.