openstack setup demo Compute service
本文包含以下部分
- Compute service overview
- Install and configure controller node
- Prerequisites
- Install and configure components
- Finalize installation
- Install and configure a compute node
- Install and configure components
- Finalize installation
- Verify operation
Compute service overview
Compute service在openstack中的作用比较复杂,大致模块和功能如下:
nova-api service
接受并响应用户的请求
nova-api-metadata service
处理metadata请求
nova-compute service
是一个worker daemon。会调用hypervisor api来创建删除vm等。
nova-scheduler service
接受vm的请求,并分发给compute service
nova-conductor module
目前的作用是compute service和database的一个中间层,不要把它和compute service部署在同一个机器上。
nova-network worker daemon
跟nova-compute service差不多,从queue中接受task并执行。比如配置bridge和iptable。
nova-consoleauth daemon
Authorizes tokens for users that console proxies provide.
nova-novncproxy daemon
Provides a proxy for accessing running instances through a VNC connection. Supports browser-based novnc clients.
nova-novncproxy daemon
Provides a proxy for accessing running instances through a SPICE connection. Supports browser-based HTML5 client.
nova-xvpvncproxy daemon
Provides a proxy for accessing running instances through a VNC connection. Supports an OpenStack-specific Java client.
Install and configure controller node
prerequisite
创建db
mysql -u root -p
CREATE DATABASE nova_api;
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \
IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS';
设置keystone
. admin-openrc
# 创建用户
openstack user create --domain default --password-prompt nova
# 在service project中为nova用户添加admin
openstack role add --project service --user nova admin
# 创建compute service
openstack service create --name nova --description "OpenStack Compute" compute
# 创建end points
openstack endpoint create --region RegionOne compute public http://controller01:8774/v2.1/%\(tenant_id\)s
openstack endpoint create --region RegionOne compute internal http://controller01:8774/v2.1/%\(tenant_id\)s
openstack endpoint create --region RegionOne compute admin http://controller01:8774/v2.1/%\(tenant_id\)s
Install and configure components
yum install openstack-nova-api openstack-nova-conductor \
openstack-nova-console openstack-nova-novncproxy \
openstack-nova-scheduler
编辑 /etc/nova/nova.conf
[DEFAULT]
...
enabled_apis = osapi_compute,metadata
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.79.148.84
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[api_database]
...
connection = mysql+pymysql://nova:NOVA_DBPASS@controller01/nova_api
[database]
...
connection = mysql+pymysql://nova:NOVA_DBPASS@controller01/nova
[oslo_messaging_rabbit]
...
rabbit_host = controller01
rabbit_userid = openstack
rabbit_password = RABBIT_PASS
[keystone_authtoken]
...
auth_uri = http://controller01:5000
auth_url = http://controller01:35357
memcached_servers = controller01:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
[vnc]
...
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip
[glance]
...
api_servers = http://controller01:9292
[oslo_concurrency]
...
lock_path = /var/lib/nova/tmp
初始化compute database
su -s /bin/sh -c "nova-manage api_db sync" nova
su -s /bin/sh -c "nova-manage db sync" nova
Finalize installation
systemctl enable \
openstack-nova-api.service \
openstack-nova-consoleauth.service \
openstack-nova-scheduler.service \
openstack-nova-conductor.service \
openstack-nova-novncproxy.service
systemctl start \
openstack-nova-api.service \
openstack-nova-consoleauth.service \
openstack-nova-scheduler.service \
openstack-nova-conductor.service \
openstack-nova-novncproxy.service
Install and configure a compute node
Install and configure components
yum install openstack-nova-compute
编辑 /etc/nova/nova.conf
[DEFAULT]
...
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.79.148.86
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[oslo_messaging_rabbit]
...
rabbit_host = controller01
rabbit_userid = openstack
rabbit_password = RABBIT_PASS
[keystone_authtoken]
...
auth_uri = http://controller01:5000
auth_url = http://controller01:35357
memcached_servers = controller01:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
[vnc]
...
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://controller01:6080/vnc_auto.html
[glance]
...
api_servers = http://controller01:9292
[oslo_concurrency]
...
lock_path = /var/lib/nova/tmp
Finalize installation
判断一下我们的硬件是否支持 hardware acceleration for virtual machines
egrep -c '(vmx|svm)' /proc/cpuinfo
如果返回0,说明不支持,则需要配置 libvirt 使用qeum 而不是kvm。
编辑 /etc/nova/nova.conf
[libvirt]
...
virt_type = qemu
启动libvirt 和 nova compute 并设置开机启动
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service
Verify operation
. admin.openrc
openstack compute service list
改名了应该能看到类似如下输出
+----+--------------------+------------+----------+---------+-------+----------------------------+
| Id | Binary | Host | Zone | Status | State | Updated At |
+----+--------------------+------------+----------+---------+-------+----------------------------+
| 1 | nova-consoleauth | controller | internal | enabled | up | 2016-02-09T23:11:15.000000 |
| 2 | nova-scheduler | controller | internal | enabled | up | 2016-02-09T23:11:15.000000 |
| 3 | nova-conductor | controller | internal | enabled | up | 2016-02-09T23:11:16.000000 |
| 4 | nova-compute | compute1 | nova | enabled | up | 2016-02-09T23:11:20.000000 |
+----+--------------------+------------+----------+---------+-------+----------------------------+
openstack setup demo Compute service的更多相关文章
- openstack setup demo Image service
Image service (glance)是openstack中管理vm image的service.本文包含以下内容: overview install overview glance包含以下部分 ...
- openstack setup demo Identity service
openstack Identity service 名叫keystone.它提供了用户校验,以及服务目录查询(即列出所有的服务以及相关信息)等功能. keystone 主要包含以下几个部分 Serv ...
- openstack setup demo 前言
我们搭建一套三节点的openstanck集群.一个controller节点,两个compute节点.操作系统采用Centos7,操作系统版本信息如下. [root@controller01 ~]# c ...
- openstack setup demo Enviroment
Enviroment 本文包含以下部分. Host networking Network Time Protocol (NTP) OpenStack packages SQL database NoS ...
- openstack setup demo Overview
Overview openstack是一套开源的云计算部署平台,通过一系列service提供IAAS.每一个service都提供API.具体的service列表如下: dashboard Horizo ...
- Openstack组件部署 — Netwotking service组件介绍与网络基本概念
目录 目录 前文列表 Openstack Networking serivce 基本的Neutron概念 Neutron的抽象对象 网络networks 子网subnets 路由器routers 端口 ...
- OpenStack之七: compute服务(端口8774)
注意此处的bug,参考o版 官网地址 https://docs.openstack.org/nova/stein/install/controller-install-rdo.html 控制端配置 # ...
- Inno Setup for Windows service
Inno Setup for Windows service? up vote86down votefavorite 77 I have a .Net Windows service. I want ...
- openstack compute service list Unable to establish connection to http://controller:8774/v2.1/os-services: ('Connection aborted.', BadStatusLine("''",))
8774是nova的端口号,所以我就逐一查看nova的日志文件. tail -f /var/log/nova/nova-conductor.log 2019-06-13 08:24:53.559 44 ...
随机推荐
- Scala基础篇-04 try表达式
1.try表达式 定义 try{} catch{} finally{} //例子 try{ Integer.parseInt("dog") }catch { }finally { ...
- linux下svn安装(ALI ECS)
yum安装svn 搭建和使用SVN 可参考阿里云文档:https://help.aliyun.com/document_detail/52864.html?spm=5176.8208715.110.1 ...
- tomcat不打印日志
commons-logging.jar导入这个包到tomcat lib下 2.修改tomcat的bin目录下面的catalina.bat文件 只需修改:set CLASSPATH=%CLASSP ...
- Relational Algebra 关系代数
Relational Algebra Relational Algebra is the mathematical basis for the query language SQL Introduct ...
- ubuntulinux 更改时区设置时间
Linux/shell命令的实际应用——查看并修改系统时区 命令: www.2cto.com date -R //查询当前系统时间与默认时区 cp /usr/share/zoneinfo/Asia/S ...
- delphi byte to of set
最佳方案 type // Controls.TCMMouseWheel relies on TShiftState not exceeding 2 bytes in size TShiftState ...
- returnFloat_thousand() 以万计数 ,如100,结果是0.01
function returnFloat_thousand(value){ var value=Math.ceil(Math.round(parseFloat(value)*100)/100)/100 ...
- 【design pattern】代理模式
前言 设计模式分为三大类: 创建型模式:工厂方法模式.抽象工厂模式.单例模式.建造者模式.原型模式: 结构型模式:适配器模式.装饰器模式.代理模式.外观模式.桥接模式.组合模式.享元模式: 行为型模式 ...
- oracle亲手安装过程
适用于centos6 radhat6版本 1.检查依赖库: rpm -q binutils compat-libcap1 compat-libstdc++ compat-libstdc++.i686 ...
- (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d
出现redis错误: (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to p ...