Specify compute hosts with SSDs
生活随笔
收集整理的這篇文章主要介紹了
Specify compute hosts with SSDs
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
scheduler_driver = nova.scheduler.filter_scheduler.FilterScheduler scheduler_available_filters = nova.scheduler.filters.all_filters scheduler_default_filters =AggregateInstanceExtraSpecsFilter首先在nova.conf中配置以上調度
在nova?availability zone中創建 fast-io?host aggregate $ nova aggregate-create fast-io nova +----+---------+-------------------+-------+----------+ | Id | Name | Availability Zone | Hosts | Metadata | +----+---------+-------------------+-------+----------+ | 1 | fast-io | nova | | | +----+---------+-------------------+-------+----------+
添加ssd=true?key-value pair to the aggregate
$ nova aggregate-set-metadata 1 ssd=true +----+---------+-------------------+-------+-------------------+ | Id | Name | Availability Zone | Hosts | Metadata | +----+---------+-------------------+-------+-------------------+ | 1 | fast-io | nova | [] | {u'ssd': u'true'} | +----+---------+-------------------+-------+-------------------+把node1/2添加到aggregate
$ nova aggregate-add-host 1 node1 +----+---------+-------------------+-----------+-------------------+ | Id | Name | Availability Zone | Hosts | Metadata | +----+---------+-------------------+------------+-------------------+ | 1 | fast-io | nova | [u'node1'] | {u'ssd': u'true'} | +----+---------+-------------------+------------+-------------------+$ nova aggregate-add-host 1 node2 +----+---------+-------------------+---------------------+-------------------+ | Id | Name | Availability Zone | Hosts | Metadata | +----+---------+-------------------+----------------------+-------------------+ | 1 | fast-io | nova | [u'node1', u'node2'] | {u'ssd': u'true'} | +----+---------+-------------------+----------------------+-------------------+創建ssd.large?flavor, ID of 6, 8?GB of RAM, 80?GB root disk, and four vCPUs.
$ nova flavor-create ssd.large 6 8192 80 4 +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ | 6 | ssd.large | 8192 | 80 | 0 | | 4 | 1.0 | True | +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+設置aggregate_instance_extra_specs filter的key-value pairs:
$ nova flavor-key ssd.large set? aggregate_instance_extra_specs:ssd=true該filter的實現在:nova/scheduler/filters/aggregate_instance_extra_specs.py
$ nova flavor-show ssd.large +----------------------------+--------------------------------------------------+ | Property | Value | +----------------------------+--------------------------------------------------+ | OS-FLV-DISABLED:disabled | False | | OS-FLV-EXT-DATA:ephemeral | 0 | | disk | 80 | | extra_specs | {u'aggregate_instance_extra_specs:ssd': u'true'} | | id | 6 | | name | ssd.large | | os-flavor-access:is_public | True | | ram | 8192 | | rxtx_factor | 1.0 | | swap | | | vcpus | 4 | +----------------------------+--------------------------------------------------+現在使用ssd.large?flavor來創建instance時,scheduler 只會考慮帶有ssd=true?key-value pair的host,也就是node1/2.
http://docs.openstack.org/liberty/config-reference/content/section_compute-scheduler.html
轉載于:https://www.cnblogs.com/allcloud/p/5020296.html
總結
以上是生活随笔為你收集整理的Specify compute hosts with SSDs的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 阿里图标引用
- 下一篇: Ubuntu中启用关闭Network-m