Jump to: navigation, search

Difference between revisions of "NovaAdminAPI"

 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{OldDesignPage}}
* '''Launchpad Entry''': [[NovaSpec]]:foo or [[SwiftSpec]]:foo
+
* '''Launchpad Entry''': NovaSpec:admin-account-actions
 
* '''Created''': 25 February 2011
 
* '''Created''': 25 February 2011
 +
* '''Update''': 8 April 2011
 
* '''Contributors''': [[GlenCampbell]]
 
* '''Contributors''': [[GlenCampbell]]
  
<<[[TableOfContents]]()>>
+
__TOC__
  
== Summary ==
+
= Summary =
  
 
This document proposes a Management API for Nova. Whereas the public API is targeted at the users of the system (and is thus focused on terminal artifacts such as servers and images), the Management API (also called the "Admin API") is expected to be used by system administrators. Specifically, the management API provides functions that access the physical deployment of a cloud computing system and the associated features that might be used, for example, by an enterprise IT department or a cloud hosting provider such as Rackspace. This initial proposal, as one might expect, is heavily influenced by the needs of Rackspace, but the goal of this Nova effort is to separate those features that have a more general audience from those that are Rackspace-specific.
 
This document proposes a Management API for Nova. Whereas the public API is targeted at the users of the system (and is thus focused on terminal artifacts such as servers and images), the Management API (also called the "Admin API") is expected to be used by system administrators. Specifically, the management API provides functions that access the physical deployment of a cloud computing system and the associated features that might be used, for example, by an enterprise IT department or a cloud hosting provider such as Rackspace. This initial proposal, as one might expect, is heavily influenced by the needs of Rackspace, but the goal of this Nova effort is to separate those features that have a more general audience from those that are Rackspace-specific.
Line 12: Line 13:
 
Initially, all features of the Management API are implemented using the API Extensions mechanism; if the [[OpenStack]] community agrees upon the need for certain features, they will be migrated to the Nova Core. Other features, specific to Rackspace, will be left as custom extensions and maintained by Rackspace.
 
Initially, all features of the Management API are implemented using the API Extensions mechanism; if the [[OpenStack]] community agrees upon the need for certain features, they will be migrated to the Nova Core. Other features, specific to Rackspace, will be left as custom extensions and maintained by Rackspace.
  
Because the Management API provides functions at a lower logical level than the public API, the implementations of many of these features are dependent upon a specific hypervisor. As such, a secondary goal of the Management API is to provide a generic, abstract, mechanism to access those features, when possible, in a hypervisor-independent manner. This will allow tools (for example, a web-based administration tool) to work with multiple deployments of Nova.
+
= Release Note =
 
 
== Release Note ==
 
  
 
TBD
 
TBD
  
== Rationale ==
+
= Rationale =
  
 
Administrators that deploy compute clouds based on Nova need a method beyond simple command-line tools for managing a large, complex environment. Because of this, tools need to be developed to support the cloud administrators, and not just the cloud users. By providing a management API, Nova enables the development of those tools.
 
Administrators that deploy compute clouds based on Nova need a method beyond simple command-line tools for managing a large, complex environment. Because of this, tools need to be developed to support the cloud administrators, and not just the cloud users. By providing a management API, Nova enables the development of those tools.
Line 24: Line 23:
 
In addition, by abstracting (to the greatest extent possible) the functions of the hypervisor, the Management API also permits flexibility in deployment. If, in the future, a new hypervisor becomes popular, the Management API may be implemented on top of its functionality and thus permit the use of existing tools.
 
In addition, by abstracting (to the greatest extent possible) the functions of the hypervisor, the Management API also permits flexibility in deployment. If, in the future, a new hypervisor becomes popular, the Management API may be implemented on top of its functionality and thus permit the use of existing tools.
  
== User stories ==
+
= User stories =
 
 
As a compute cloud administrator, I need to be able to provision and manage physical entities (e.g., hosts, network devices) as easily as I can manage the virtual entities (e.g., servers, volumes) provided by the cloud.
 
 
 
As a compute cloud administrator, I need to be able to perform functions on a physical host such as rebooting it when it goes down.
 
  
 
As a compute cloud administrator, I need to take action to prevent my users from potentially harming one another—for example, if a user is abusing resources, I need to suspend or delete that user.
 
As a compute cloud administrator, I need to take action to prevent my users from potentially harming one another—for example, if a user is abusing resources, I need to suspend or delete that user.
Line 34: Line 29:
 
As a tool developer, I need a stable API so that I can develop tools that have the widest possible use (instead of having to re-implement the same function for multiple different environments).
 
As a tool developer, I need a stable API so that I can develop tools that have the widest possible use (instead of having to re-implement the same function for multiple different environments).
  
== Assumptions ==
+
= Assumptions =
  
 
The [http://wiki.openstack.org/MultiClusterZones Multi-cluster "Zones"] blueprint has been implemented.  
 
The [http://wiki.openstack.org/MultiClusterZones Multi-cluster "Zones"] blueprint has been implemented.  
  
== Design ==
+
= Design =
  
=== /accounts ===
+
== /{account_id}/action ==
  
The <code><nowiki>/accounts</nowiki></code> resource manages information on a collection of accounts. "Account" is an arbitrary string defined by the multi-tenancy blueprint.  
+
This resource provides a mechanism for performing specific actions on resources associated with a specific account. Like the <code><nowiki>/servers/ID/action</nowiki></code> resource, a message is passed in the request body that specifies the action to take.  
  
{| border="1" cellpadding="2" cellspacing="0"
+
Note that ''account_id'' is assumed to be the same as ''tenant_id''.
'''Method'''
 
|  '''Returns'''
 
|-
 
|  GET
 
|  A collection of all accounts in the zone
 
|-
 
|  PUT
 
|  Not allowed
 
|-
 
|  POST
 
|  Information on a single account.
 
|-
 
|  DELETE
 
|  Not allowed
 
|}
 
 
 
=== /accounts/{account_id} ===
 
 
 
Manages information on a single account identified by ''account_id''.
 
 
 
{| border="1" cellpadding="2" cellspacing="0"
 
'''Method'''
 
|  '''Returns'''
 
|-
 
|  GET
 
|  Data on a single account
 
|-
 
|  PUT
 
|  Updates information on an account
 
|-
 
|  POST
 
|  Creates a new account with specified ID
 
|-
 
|  DELETE
 
|  Removes an account
 
|}
 
 
 
=== /accounts/{account_id}/action ===
 
 
 
This resource provides a mechanism for performing specific actions on resources associated with a specific account. Like the <code><nowiki>/servers/ID/action</nowiki></code> resource, a message is passed in the request body that specifies the action to take.  
 
  
 
{| border="1" cellpadding="2" cellspacing="0"
 
{| border="1" cellpadding="2" cellspacing="0"
Line 90: Line 45:
 
|-
 
|-
 
|<code><nowiki>|SUSPEND_SERVERS</nowiki></code>  
 
|<code><nowiki>|SUSPEND_SERVERS</nowiki></code>  
|}
 
 
=== /hosts ===
 
 
The <code><nowiki>/hosts</nowiki></code> resource manages information on a collection of hosts for the current zone.
 
 
Note that information on hosts is dynamic and driven by the Nova compute hosts that respond to the scheduler's query; a host that is temporarily stalled, for example, may not return information.
 
 
{| border="1" cellpadding="2" cellspacing="0"
 
|  '''Method'''
 
|  '''Returns'''
 
 
|-
 
|-
| GET
+
|<code><nowiki>|UNSUSPEND_SERVERS</nowiki></code>
| A collection of all hosts in the current zone
 
 
|-
 
|-
| PUT
+
|<code><nowiki>|SUSPEND</nowiki></code>
| Not allowed
 
 
|-
 
|-
| POST
+
|<code><nowiki>|UNSUSPEND</nowiki></code>
| Information on a single host.
 
|-
 
|  DELETE
 
|  Not allowed
 
 
|}
 
|}
  
=== /hosts/{host_id} ===
+
''Comment: "RESUME" might be better than "UNSUSPEND," but "UNSUSPEND" was chosen for conformity with existing Rackspace functions.''
 
 
Manages information on a single host, identified by ''host_id''.
 
 
 
{| border="1" cellpadding="2" cellspacing="0"
 
|  '''URI'''
 
|  '''Method'''
 
|  '''Returns'''
 
|-
 
|  /hosts/''host_id''
 
|  GET
 
|  Consolidated metadata on a single host
 
|-
 
|  /hosts/''host_id''/details
 
|  GET
 
|  Detailed information on a single host
 
|-
 
|  /hosts/''host_id''
 
|  PUT
 
|  Updated metadata on a single host
 
|-
 
|  /hosts/''host_id''
 
|  POST
 
|  Returns the same as GET, but modifies the host state.
 
|-
 
|  /hosts/''host_id''
 
|  DELETE
 
|  N/A
 
|}
 
 
 
Modifying the host state:
 
 
 
The general idea here is that, by modifying the data associated with a host, certain actions may be performed. For example, if you set <code><nowiki>Reboot=Yes</nowiki></code>, then the host is rebooted. Not sure if we should go this way or define a new '''/action''' resource.
 
 
 
=== /servers/{server_id}/action ===
 
 
 
This resource provides a mechanism for performing specific actions on a server (a compute instance). For management purposes, there are several extensions beyond those actions provided in the [http://wiki.openstack.org/OpenStackAPI_1-1 Nova API 1.1 specification].
 
 
 
{| border="1" cellpadding="2" cellspacing="0"
 
'''Action'''
 
|-
 
|<code><nowiki>|SUSPEND_SERVER</nowiki></code>
 
|-
 
|<code><nowiki>|UNSUSPEND_SERVER</nowiki></code>
 
|}
 
 
 
=== /servers/{server_id}/events ===
 
 
 
This resource manages events on a specific server. It provides API-level access to events that occur on the specific virtual machine.
 
 
 
{| border="1" cellpadding="2" cellspacing="0"
 
|  '''Method'''
 
|  '''Returns'''
 
|-
 
|  GET
 
|  a collection of events on the specified server
 
|-
 
|  PUT
 
|  Not allowed
 
|-
 
|  POST
 
|  adds a new event to the event log associated with the server
 
|-
 
|  DELETE
 
|  deletes all events from the server event log
 
|}
 
  
== Implementation ==
+
= Implementation =
  
 
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:
 
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:
  
=== UI Changes ===
+
== UI Changes ==
  
 
Should cover changes required to the UI, or specific UI that is required to implement this
 
Should cover changes required to the UI, or specific UI that is required to implement this
  
=== Code Changes ===
+
== Code Changes ==
  
 
Code changes should include an overview of what needs to change, and in some cases even the specific details.
 
Code changes should include an overview of what needs to change, and in some cases even the specific details.
  
=== Migration ===
+
== Migration ==
  
 
Include:
 
Include:
Line 201: Line 74:
 
* how users will be pointed to the new way of doing things, if necessary.
 
* how users will be pointed to the new way of doing things, if necessary.
  
== Test/Demo Plan ==
+
= Test/Demo Plan =
  
 
This need not be added or completed until the specification is nearing beta.
 
This need not be added or completed until the specification is nearing beta.
  
== Unresolved issues ==
+
= Unresolved issues =
  
 
This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.
 
This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.
  
== BoF agenda and discussion ==
+
= BoF agenda and discussion =
  
 
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.
 
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.

Latest revision as of 09:47, 19 December 2013

Warning.svg Old Design Page

This page was used to help design a feature for a previous release of OpenStack. It may or may not have been implemented. As a result, this page is unlikely to be updated and could contain outdated information. It was last updated on 2013-12-19

  • Launchpad Entry: NovaSpec:admin-account-actions
  • Created: 25 February 2011
  • Update: 8 April 2011
  • Contributors: GlenCampbell

Summary

This document proposes a Management API for Nova. Whereas the public API is targeted at the users of the system (and is thus focused on terminal artifacts such as servers and images), the Management API (also called the "Admin API") is expected to be used by system administrators. Specifically, the management API provides functions that access the physical deployment of a cloud computing system and the associated features that might be used, for example, by an enterprise IT department or a cloud hosting provider such as Rackspace. This initial proposal, as one might expect, is heavily influenced by the needs of Rackspace, but the goal of this Nova effort is to separate those features that have a more general audience from those that are Rackspace-specific.

Initially, all features of the Management API are implemented using the API Extensions mechanism; if the OpenStack community agrees upon the need for certain features, they will be migrated to the Nova Core. Other features, specific to Rackspace, will be left as custom extensions and maintained by Rackspace.

Release Note

TBD

Rationale

Administrators that deploy compute clouds based on Nova need a method beyond simple command-line tools for managing a large, complex environment. Because of this, tools need to be developed to support the cloud administrators, and not just the cloud users. By providing a management API, Nova enables the development of those tools.

In addition, by abstracting (to the greatest extent possible) the functions of the hypervisor, the Management API also permits flexibility in deployment. If, in the future, a new hypervisor becomes popular, the Management API may be implemented on top of its functionality and thus permit the use of existing tools.

User stories

As a compute cloud administrator, I need to take action to prevent my users from potentially harming one another—for example, if a user is abusing resources, I need to suspend or delete that user.

As a tool developer, I need a stable API so that I can develop tools that have the widest possible use (instead of having to re-implement the same function for multiple different environments).

Assumptions

The Multi-cluster "Zones" blueprint has been implemented.

Design

/{account_id}/action

This resource provides a mechanism for performing specific actions on resources associated with a specific account. Like the /servers/ID/action resource, a message is passed in the request body that specifies the action to take.

Note that account_id is assumed to be the same as tenant_id.

Action
|SUSPEND_SERVERS
|UNSUSPEND_SERVERS
|SUSPEND
|UNSUSPEND

Comment: "RESUME" might be better than "UNSUSPEND," but "UNSUSPEND" was chosen for conformity with existing Rackspace functions.

Implementation

This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:

UI Changes

Should cover changes required to the UI, or specific UI that is required to implement this

Code Changes

Code changes should include an overview of what needs to change, and in some cases even the specific details.

Migration

Include:

  • data migration, if any
  • redirects from old URLs to new ones, if any
  • how users will be pointed to the new way of doing things, if necessary.

Test/Demo Plan

This need not be added or completed until the specification is nearing beta.

Unresolved issues

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

BoF agenda and discussion

Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.