cell 配置
Cells
Cells functionality enables you to scale an OpenStack Compute cloud in a more distributed fashion without having to use complicated technologies like database and message queue clustering. It supports very large deployments.
When this functionality is enabled, the hosts in an OpenStack Compute cloud are partitioned into groups called cells. Cells are configured as a tree. The top-level cell should have a host that runs a nova-api service, but no nova-compute services. Each child cell should run all of the typical nova-* services in a regular Compute cloud except for nova-api. You can think of cells as a normal Compute deployment in that each cell has its own database server and message queue broker.
The nova-cells service handles communication between cells and selects cells for new instances. This service is required for every cell. Communication between cells is pluggable, and currently the only option is communication through RPC.
Cells scheduling is separate from host scheduling. nova-cells first picks a cell. Once a cell is selected and the new build request reaches its nova-cells service, it is sent over to the host scheduler in that cell and the build proceeds as it would have without cells.
![]() |
Warning |
|---|---|
|
Cell functionality is currently considered experimental. |
Cell configuration options
Cells are disabled by default. All cell-related configuration options appear in the [cells] section in nova.conf. The following cell-related options are currently supported:
enable-
Set to
Trueto turn on cell functionality. Default isfalse. name-
Name of the current cell. Must be unique for each cell.
capabilities-
List of arbitrary
pairs defining capabilities of the current cell. Values includekey=valuehypervisor=xenserver;kvm,os=linux;windows. call_timeout-
How long in seconds to wait for replies from calls between cells.
scheduler_filter_classes-
Filter classes that the cells scheduler should use. By default, uses "
nova.cells.filters.all_filters" to map to all cells filters included with Compute. scheduler_weight_classes-
Weight classes that the scheduler for cells uses. By default, uses
nova.cells.weights.all_weighersto map to all cells weight algorithms included with Compute. ram_weight_multiplier-
Multiplier used to weight RAM. Negative numbers indicate that Compute should stack VMs on one host instead of spreading out new VMs to more hosts in the cell. The default value is 10.0.
Configure the API (top-level) cell
The cell type must be changed in the API cell so that requests can be proxied through nova-cells down to the correct cell properly. Edit the nova.conf file in the API cell, and specify api in the cell_type key:
|
1
2
3
4
5
6
|
[DEFAULT]compute_api_class=nova.compute.cells_api.ComputeCellsAPI...[cells]cell_type= api |
Configure the child cells
Edit the nova.conf file in the child cells, and specify compute in the cell_type key:
|
1
2
3
4
5
6
|
[DEFAULT]# Disable quota checking in child cells. Let API cell do it exclusively.quota_driver=nova.quota.NoopQuotaDriver[cells]cell_type = compute |
Configure the database in each cell
Before bringing the services online, the database in each cell needs to be configured with information about related cells. In particular, the API cell needs to know about its immediate children, and the child cells must know about their immediate agents. The information needed is the RabbitMQ server credentials for the particular cell.
Use the nova-manage cell create command to add this information to the database in each cell:
# nova-manage cell create -h
usage: nova-manage cell create [-h] [--name <name>]
[--cell_type <parent|api|child|compute>]
[--username <username>] [--password <password>]
[--broker_hosts <broker_hosts>]
[--hostname <hostname>] [--port <number>]
[--virtual_host <virtual_host>]
[--woffset <float>] [--wscale <float>] optional arguments:
-h, --help show this help message and exit
--name <name> Name for the new cell
--cell_type <parent|api|child|compute>
Whether the cell is parent/api or child/compute
--username <username>
Username for the message broker in this cell
--password <password>
Password for the message broker in this cell
--broker_hosts <broker_hosts>
Comma separated list of message brokers in this cell.
Each Broker is specified as hostname:port with both
mandatory. This option overrides the --hostname and
--port options (if provided).
--hostname <hostname>
Address of the message broker in this cell
--port <number> Port number of the message broker in this cell
--virtual_host <virtual_host>
The virtual host of the message broker in this cell
--woffset <float>
--wscale <float>
As an example, assume an API cell named api and a child cell named cell1.
Within the api cell, specify the following RabbitMQ server information:
|
1
2
3
4
5
|
rabbit_host=10.0.0.10rabbit_port=5672rabbit_username=api_userrabbit_password=api_passwdrabbit_virtual_host=api_vhost |
Within the cell1 child cell, specify the following RabbitMQ server information:
|
1
2
3
4
5
|
rabbit_host=10.0.1.10rabbit_port=5673rabbit_username=cell1_userrabbit_password=cell1_passwdrabbit_virtual_host=cell1_vhost |
You can run this in the API cell as root:
# nova-manage cell create --name cell1 --cell_type child \
--username cell1_user --password cell1_passwd --hostname 10.0.1.10 \
--port 5673 --virtual_host cell1_vhost --woffset 1.0 --wscale 1.0
Repeat the previous steps for all child cells.
In the child cell, run the following, as root:
# nova-manage cell create --name api --cell_type parent \
--username api_user --password api_passwd --hostname 10.0.0.10 \
--port 5672 --virtual_host api_vhost --woffset 1.0 --wscale 1.0
To customize the Compute cells, use the configuration option settings documented in Table 4.20, “Description of cell configuration options”.
Cell scheduling configuration
To determine the best cell to use to launch a new instance, Compute uses a set of filters and weights defined in the /etc/nova/nova.conf file. The following options are available to prioritize cells for scheduling:
scheduler_filter_classes-
List of filter classes. By default
nova.cells.filters.all_filtersis specified, which maps to all cells filters included with Compute (see the section called “Filters”). scheduler_weight_classes-
List of weight classes. By default
nova.cells.weights.all_weighersis specified, which maps to all cell weight algorithms included with Compute. The following modules are available:mute_child. Downgrades the likelihood of child cells being chosen for scheduling requests, which haven't sent capacity or capability updates in a while. Options includemute_weight_multiplier(multiplier for mute children; value should be negative).ram_by_instance_type. Select cells with the most RAM capacity for the instance type being requested. Because higher weights win, Compute returns the number of available units for the instance type requested. Theram_weight_multiplieroption defaults to 10.0 that adds to the weight by a factor of 10. Use a negative number to stack VMs on one host instead of spreading out new VMs to more hosts in the cell.weight_offset. Allows modifying the database to weight a particular cell. You can use this when you want to disable a cell (for example, '0'), or to set a default cell by making its weight_offset very high (for example, '999999999999999'). The highest weight will be the first cell to be scheduled for launching an instance.
Additionally, the following options are available for the cell scheduler:
scheduler_retries-
Specifies how many times the scheduler tries to launch a new instance when no cells are available (default=10).
scheduler_retry_delay-
Specifies the delay (in seconds) between retries (default=2).
As an admin user, you can also add a filter that directs builds to a particular cell. The policy.json file must have a line with "cells_scheduler_filter:TargetCellFilter" : "is_admin:True" to let an admin user specify a scheduler hint to direct a build to a particular cell.
Optional cell configuration
Cells store all inter-cell communication data, including user names and passwords, in the database. Because the cells data is not updated very frequently, use the [cells]cells_config option to specify a JSON file to store cells data. With this configuration, the database is no longer consulted when reloading the cells data. The file must have columns present in the Cell model (excluding common database fields and the id column). You must specify the queue connection information through a transport_url field, instead of username,password, and so on. The transport_url has the following form:
rabbit://USERNAME:PASSWORD@HOSTNAME:PORT/VIRTUAL_HOST
The scheme can be either qpid or rabbit, as shown previously. The following sample shows this optional configuration:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
{ "parent": { "name": "parent", "api_url": "http://api.example.com:8774", "transport_url": "rabbit://rabbit.example.com", "weight_offset": 0.0, "weight_scale": 1.0, "is_parent": true }, "cell1": { "name": "cell1", "api_url": "http://api.example.com:8774", "transport_url": "rabbit://rabbit1.example.com", "weight_offset": 0.0, "weight_scale": 1.0, "is_parent": false }, "cell2": { "name": "cell2", "api_url": "http://api.example.com:8774", "transport_url": "rabbit://rabbit2.example.com", "weight_offset": 0.0, "weight_scale": 1.0, "is_parent": false }}
|
cell 配置的更多相关文章
- nova cell配置
Configuration option = Default value Description [cells] call_timeout = 60 (IntOpt) Seconds to wait ...
- iOS开发之多种Cell高度自适应实现方案的UI流畅度分析
本篇博客的主题是关于UI操作流畅度优化的一篇博客,我们以TableView中填充多个根据内容自适应高度的Cell来作为本篇博客的使用场景.当然Cell高度的自适应网上的解决方案是铺天盖地呢,今天我们的 ...
- 聊天界面之气泡文本cell(二)使用Autolayout
聊天界面主要是cell的动态高度计算和效率的问题,参考网上的两篇文章: 1.优化UITableViewCell高度计算的那些事 http://www.cocoachina.com/ios/20150 ...
- 转:iOS开发之多种Cell高度自适应实现方案的UI流畅度分析
本篇博客的主题是关于UI操作流畅度优化的一篇博客,我们以TableView中填充多个根据内容自适应高度的Cell来作为本篇博客的使用场景.当然Cell高度的自适应网上的解决方案是铺天盖地呢,今天我们的 ...
- UICollectionLayout布局 —— UIKit之学习UICollectionView记录二《流水布局》
重点知识 一. 加载collectionView注意事项 1.创建collectionView,有两种方式 :一种是xib和一种是纯代码:设置代理和数据源,注册cell,配置流水布局的属性,如上.下. ...
- 集合视图 UICollectionView
什么是UICollectionView UICollectionView是一种新的数据展示方式,简单来说可以把他理解成多列的UITableView(请一定注意这是UICollectionView的最最 ...
- 优化UITableViewCell高度计算的那些事
优化UITableViewCell高度计算的那些事 我是前言 这篇文章是我和我们团队最近对 UITableViewCell 利用 AutoLayout 自动高度计算和 UITableView 滑动优化 ...
- 创建一个Table View
在本课程中,您将创建应用程序FoodTracker的主屏幕.您将创建第二个,表视图为主场景,列出了用户的菜谱.你会设计定制表格单元格显示每一个菜谱,它是这样的: 学习目标 在课程结束时,你将能够: 创 ...
- X Window 程式设计
X Window 程式设计 转 http://www.cppblog.com/zmj/archive/2007/05/18/24331.html X Window 程式设计 X Window 程式 ...
随机推荐
- python函数回顾:dict()
描述 dict() 函数用于创建一个字典. 语法 dict 语法: class dict(**kwarg) class dict(mapping, **kwarg) class dict(iterab ...
- 人工智能-baidu-aip语音合成(文字转语音)
from aip import AipSpeech APP_ID = ' APP_KEY = 'DhXGtWHYMujMVZZGRI3a7rzb' SECRET_KEY = 'PbyUvTL31fIm ...
- (4.19)深入理解SQLSERVER的日志链
您真的理解了SQLSERVER的日志链了吗? 转自:https://www.cnblogs.com/lyhabc/p/3460272.html 先感谢宋沄剑给本人指点迷津,还有郭忠辉童鞋今天在QQ群里 ...
- WebService中WSDL和WADL(转)
转自https://blog.csdn.net/liuxiao723846/article/details/51611183#commentBox 自己加了修改批注方便自己理解. 1.Java开发We ...
- JavaWeb—拦截器Interceptor
1.概念 java里的拦截器是动态拦截Action调用的对象,它提供了一种机制可以使开发者在一个Action执行的前后执行一段代码,也可以在一个Action执行前阻止其执行,同时也提供了一种可以提取A ...
- Logstash简介
支持多种数据获取机制,通过TCP/UDP协议.文件.syslog.windows.EventLogs及STDIN等:获取到数据口,支持对数据进行过滤.修改等操作JRuby语言研发,工作在JVM中 ...
- Python常见序列详解
一.Python中序列的分类 常见序列类型包括字符串(普通字符串和unicode字符串),列表和元组.所谓序列,即成员有序排列,可通过下标访问. 二.Python序列通用操作 下面我们将分别以字符串. ...
- R&python机器学习之朴素贝叶斯分类
朴素贝叶斯算法描述应用贝叶斯定理进行分类的一个简单应用.这里之所以称之为“朴素”,是因为它假设各个特征属性是无关的,而现实情况往往不是如此. 贝叶斯定理也称贝叶斯推理,早在18世纪,英国学者贝叶斯(1 ...
- 47求1+2+3+...+n
题目描述 求1+2+3+...+n,要求不能使用乘除法.for.while.if.else.switch.case等关键字及条件判断语句(A?B:C). 用递归 public class Soluti ...
- 前端 css续
CSS选择器 1.标签选择器 为类型标签设置样式例如:<div>.<a>.等标签设置一个样式,代码如下: <style> /*标签选择器,找到所有的标签应用以下样式 ...
