本文包含以下部分

  • 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的更多相关文章

  1. openstack setup demo Image service

    Image service (glance)是openstack中管理vm image的service.本文包含以下内容: overview install overview glance包含以下部分 ...

  2. openstack setup demo Identity service

    openstack Identity service 名叫keystone.它提供了用户校验,以及服务目录查询(即列出所有的服务以及相关信息)等功能. keystone 主要包含以下几个部分 Serv ...

  3. openstack setup demo 前言

    我们搭建一套三节点的openstanck集群.一个controller节点,两个compute节点.操作系统采用Centos7,操作系统版本信息如下. [root@controller01 ~]# c ...

  4. openstack setup demo Enviroment

    Enviroment 本文包含以下部分. Host networking Network Time Protocol (NTP) OpenStack packages SQL database NoS ...

  5. openstack setup demo Overview

    Overview openstack是一套开源的云计算部署平台,通过一系列service提供IAAS.每一个service都提供API.具体的service列表如下: dashboard Horizo ...

  6. Openstack组件部署 — Netwotking service组件介绍与网络基本概念

    目录 目录 前文列表 Openstack Networking serivce 基本的Neutron概念 Neutron的抽象对象 网络networks 子网subnets 路由器routers 端口 ...

  7. OpenStack之七: compute服务(端口8774)

    注意此处的bug,参考o版 官网地址 https://docs.openstack.org/nova/stein/install/controller-install-rdo.html 控制端配置 # ...

  8. Inno Setup for Windows service

    Inno Setup for Windows service? up vote86down votefavorite 77 I have a .Net Windows service. I want ...

  9. 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 ...

随机推荐

  1. Android SDK镜像更新网速慢的解决问题

    通过更换代理解决 Android SDK 在线更新镜像服务器资源:大连东软信息学院镜像服务器地址:http://mirrors.neusoft.edu.cn 端口:80北京化工大学镜像服务器地址:IP ...

  2. 最近面试oracle 数据库的知识点

    1. Oracle跟SQL Server 2005的区别? 宏观上: 1). 最大的区别在于平台,oracle可以运行在不同的平台上,sql server只能运行在windows平台上,由于windo ...

  3. vuex的应用和解决的实际问题

    这是vuex的语法结构内容 简单的理解vuex: new Vue({ // state data () { return { count: 0 } }, // view template: ` < ...

  4. [6818开发板]八核开发板|4G开发板|GPS开发板|嵌入式开发平台

    IMX6开发板(基本型):960元 IMX6开发板(豪华型):1460元 S5P4418 核心板可以无缝支持核心系统S5P6818,并保持底板设计不变,将兼顾更高端 的应用领域,为项目和产品提供更好的 ...

  5. HDU_1237_简单计算器

    运算符为+,-,*,/:操作数为整数:且没有括号 设定符号优先级,先在栈底压运算符0 #include<iostream> #include<cstdio> #include& ...

  6. loadrunner 响应时间和TPS

    例子:一个高速路有10个入口,每个入口每秒钟只能进1辆车 1.请问1秒钟最多能进几辆车?    TPS=10 2.每辆车需要多长时间进行响应?    reponse time = 1 3.改成20辆车 ...

  7. Python应该怎样实现快速入门?

    作为一名Python爱好者,我也想跟大家分享分享我自学Python的一些小经验.搬来你的小板凳,听听看吧.也许,你会很有收获,也许你也走上了自学Python的不归路.开讲啦~ 首先,你要有自信心,要明 ...

  8. SQL Server 兼容级别

    ALTER DATABASE (Transact-SQL) 兼容级别 适用对象:SQL Server(从 2008 版开始)Azure SQL 数据库Azure SQL 数据仓库并行数据仓库 将某些数 ...

  9. No-4.变量的基本使用

    变量的基本使用 程序就是用来处理数据的,而变量就是用来存储数据的 目标 变量定义 变量的类型 变量的命名 01. 变量定义 在 Python 中,每个变量 在使用前都必须赋值,变量 赋值以后 该变量  ...

  10. pytorch之Tensor与Variable的区别

    首先在变量的操作上:Tensor对象支持在原对象内存区域上修改数据,通过“+=”或者torch.add()方法而Variable不支持在原对象内存区域上修改数据Variable对象可求梯度,并且对Va ...