swsrl 发表于 2015-4-13 09:09:59

openstack计算节点的zone划分

  初步了解了一些openstack zone的使用方法,觉得比较实用,在此分享给大家:

  # nova aggregate-list
  Print a list of all aggregates.
  # nova aggregate-create   
  Create a new aggregate namedin availability zone . Returns the ID of the newly created aggregate.
  # nova aggregate-delete   
  Delete an aggregate with id .
  # nova aggregate-details   
  Show details of the aggregate with id .
  # nova aggregate-add-host   
  Add host with nameto aggregate with id .
  # nova aggregate-remove-host   
  Remove the host with namefrom the aggregate with id .
  # nova aggregate-set-metadata   [ ...]
  Add or update metadata (key-value pairs) associated with the aggregate with id .
  # nova aggregate-update   []

  Update the aggregate's name and optionally availability zone.
  # nova host-list
  List all hosts by service.
  # nova host-update --maintenance

  Put/resume host into/from maintenance.
  http://docs.openstack.org/grizzly/openstack-compute/admin/content/host-aggregates.html

  举例:
  # nova aggregate-list
  +----+------+-------------------+
  | Id | Name | Availability Zone |
  +----+------+-------------------+
  +----+------+-------------------+
  # nova aggregate-create clusterA cluster-12C-128G
  +----+----------+-------------------+-------+--------------------------------------+
  | Id | Name   | Availability Zone | Hosts | Metadata                           |
  +----+----------+-------------------+-------+--------------------------------------+
  | 1| clusterA | cluster-12C-128G|       | 'availability_zone=cluster-12C-128G' |
  +----+----------+-------------------+-------+--------------------------------------+
  # nova aggregate-create clusterB cluster-12C-48G
  +----+----------+-------------------+-------+-------------------------------------+
  | Id | Name   | Availability Zone | Hosts | Metadata                            |
  +----+----------+-------------------+-------+-------------------------------------+
  | 2| clusterB | cluster-12C-48G   |       | 'availability_zone=cluster-8C-48G' |
  +----+----------+-------------------+-------+-------------------------------------+
  # nova aggregate-list
  +----+----------+-------------------+
  | Id | Name   | Availability Zone |
  +----+----------+-------------------+
  | 1| clusterA | cluster-12C-128G|
  | 2| clusterB | cluster-8C-48G   |
  +----+----------+-------------------+
  # nova aggregate-list
  +----+----------+-------------------+
  | Id | Name   | Availability Zone |
  +----+----------+-------------------+
  | 1| clusterA | cluster-12C-128G|
  | 3| clusterB | cluster-8C-48G    |
  +----+----------+-------------------+
  # nova aggregate-add-host 1 node01
  Host node01 has been successfully added for aggregate 1
  +----+----------+-------------------+----------+--------------------------------------+
  | Id | Name   | Availability Zone | Hosts    | Metadata                           |
  +----+----------+-------------------+----------+--------------------------------------+
  | 1| clusterA | cluster-12C-128G| 'node01' | 'availability_zone=cluster-12C-128G' |
  +----+----------+-------------------+----------+--------------------------------------+
  # nova aggregate-add-host 2 node02
  Host node02 has been successfully added for aggregate 2
  +----+----------+-------------------+--------------------+--------------------------------------+
  | Id | Name   | Availability Zone | Hosts            | Metadata                           |
  +----+----------+-------------------+--------------------+--------------------------------------+
  | 1| clusterA | cluster-8C-48G| 'node02' | 'availability_zone=cluster-8C-48G' |
  +----+----------+-------------------+--------------------+--------------------------------------
  
页: [1]
查看完整版本: openstack计算节点的zone划分