简体   繁体   English

OpenStack,如何创建 nova 过滤器调度程序?

[英]OpenStack, How to create nova filter scheduler?

I am new to OpenStack.我是 OpenStack 的新手。

I have gone through the document as https://docs.openstack.org/nova/wallaby/user/filter-scheduler.html suggests.我已经按照https://docs.openstack.org/nova/wallaby/user/filter-scheduler.html 的建议浏览了该文档。 But I am not getting how and where to put the code.但我不知道如何以及在哪里放置代码。

Do I need to install the package I created as mentioned in the document?我是否需要安装文档中提到的我创建的包?

Kindly guide me through the process.请指导我完成整个过程。

There are multiple steps required to add a new filter.添加新过滤器需要多个步骤。 You first need to create your own project AND package.您首先需要创建自己的项目和包。 You then need to install it on the system running OpenStack and add it to enabled_filters and available_filters under the filter_scheduler section of the nova configuration.然后,您需要运行的OpenStack的系统上安装它,并把它添加到enabled_filtersavailable_filtersfilter_scheduler的新星结构的剖视图。

Assuming you create a package nova_filter_example with a filter named RandomFilter , you would need to change your nova.conf to look something like this.假设您使用名为RandomFilter的过滤器创建了一个包nova_filter_example ,您需要将nova.conf更改为如下所示。

[filter_scheduler]
available_filters = nova.scheduler.filters.all_filters
available_filters = nova_filter_example.RandomFilter
enabled_filters = ComputeFilter,RandomFilter

I created a small example example package that might help.我创建了一个可能有帮助的小示例示例包。 You can find it here .你可以在这里找到它。 It includes steps on how to deploy and test the custom filter in a devstack environment.它包括有关如何在devstack环境中部署和测试自定义过滤器的步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM