Openstack_O版(otaka)部署_Nova部署
控制节点配置
1. 建库建用户
CREATE DATABASE nova_api; CREATE DATABASE nova; GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY ''; GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY ''; GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY ''; GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY ''; flush privileges;
2. keystone相关操作
. admin-openrc openstack user create --domain default --password-prompt nova +---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | 135e691ebbb74fefb5086970eac74706 |
| enabled | True |
| id | 2fc41fbf983f4f1a97e0c9566dc71b8c |
| name | nova |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+ openstack role add --project service --user nova admin openstack service create --name nova --description "OpenStack Compute" compute +-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Compute |
| enabled | True |
| id | e6a8b9decf6049ebb682b4069989f27d |
| name | nova |
| type | compute |
+-------------+----------------------------------+ openstack endpoint create --region RegionOne compute public http://controller01:8774/v2.1/%\(tenant_id\)s +--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | 4e62d09ea6004277b90664e1aa9d0ba4 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | e6a8b9decf6049ebb682b4069989f27d |
| service_name | nova |
| service_type | compute |
| url | http://controller01:8774/v2.1/%(tenant_id)s |
+--------------+---------------------------------------------+ openstack endpoint create --region RegionOne compute internal http://controller01:8774/v2.1/%\(tenant_id\)s +--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | 5067b38682e246f29d92383d621a2c13 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | e6a8b9decf6049ebb682b4069989f27d |
| service_name | nova |
| service_type | compute |
| url | http://controller01:8774/v2.1/%(tenant_id)s |
+--------------+---------------------------------------------+ openstack endpoint create --region RegionOne compute admin http://controller01:8774/v2.1/%\(tenant_id\)s +--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | aa9bcd43b13a485da08c2c6bd2e55aad |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | e6a8b9decf6049ebb682b4069989f27d |
| service_name | nova |
| service_type | compute |
| url | http://controller01:8774/v2.1/%(tenant_id)s |
+--------------+---------------------------------------------+
3. 安装软件包
yum install openstack-nova-api openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler -y
yum install openstack-nova-placement-api
4. 修改配置
vim /etc/nova/nova.conf
[DEFAULT] enabled_apis = osapi_compute,metadata rpc_backend = rabbit auth_strategy = keystone transport_url = rabbit://openstack:123456@controller #下面的为管理ip my_ip = 192.168.198.128 use_neutron = True firewall_driver = nova.virt.firewall.NoopFirewallDriver [api_database] connection = mysql+pymysql://nova:123456@controller/nova_api [database] connection = mysql+pymysql://nova:123456@controller/nova [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = 123456 [keystone_authtoken] auth_url = http://controller:5000 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = nova password = 123456 [vnc] enabled = True # 下面的为管理ip vncserver_listen = 192.168.198.128 # 下面的为管理ip vncserver_proxyclient_address = 192.168.198.128 [glance] api_servers = http://controller:9292 [placement] auth_url = http://controller:35357/v3 auth_type=password os_region_name = RegionOne project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = 123456 [oslo_concurrency] lock_path = /var/lib/nova/tmp
vim /etc/httpd/conf.d/00-nova-placement-api.conf
# append this code <Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
5. 同步数据库
此处会报一些关于future的问题,自行忽略
su -s /bin/sh -c "nova-manage api_db sync" nova
su -s /bin/sh -c "nova-manage db sync" nova
6. 启动服务
systemctl enable openstack-nova-api.service openstack-nova-consoleauth.service
systemctl enable 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
systemctl start openstack-nova-conductor.service openstack-nova-novncproxy.service
7. 验证
netstat -ntlp | grep 6080 tcp 0 0 0.0.0.0:6080 0.0.0.0:* LISTEN 85554/python2 netstat -ntlp | grep 8774 tcp 0 0 0.0.0.0:8774 0.0.0.0:* LISTEN 85481/python2 netstat -ntlp | grep 8775 tcp 0 0 0.0.0.0:8775 0.0.0.0:* LISTEN 85481/python2
计算节点配置
1. 安装软件包
yum install openstack-nova-compute libvirt-daemon-lxc -y
2. 修改配置
vim /etc/nova/nova.conf
[DEFAULT] rpc_backend = rabbit auth_strategy = keystone #计算节点管理网络ip my_ip = 192.168.198.129 use_neutron = True firewall_driver = nova.virt.firewall.NoopFirewallDriver enabled_apis = osapi_compute,metadata transport_url = rabbit://openstack:123456@controller [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = 123456 [vnc] enabled = True vncserver_listen = 0.0.0.0 #计算节点管理网络ip vncserver_proxyclient_address = 192.168.198.129 #控制节点管理网络ip novncproxy_base_url = http://192.168.198.128:6080/vnc_auto.html [glance] api_servers = http://controller:9292 [oslo_concurrency] lock_path = /var/lib/nova/tmp [placement] auth_url = http://controller:5000 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = nova password = 123456 os_region_name = RegionOne [scheduler] discover_hosts_in_cells_interval = 300 [database] connection = mysql+pymysql://root:secret@192.168.111.69/nova_cell0?charset=utf8 [api_database] connection = mysql+pymysql://root:secret@192.168.111.69/nova_api?charset=utf8
3. 如果在不支持虚拟化的机器上部署nova,请确认
egrep -c '(vmx|svm)' /proc/cpuinfo结果为0 # 则编辑/etc/nova/nova.conf vim /etc/nova/nova.conf [libvirt] virt_type = qemu . admin-openrc openstack hypervisor list # Discover compute hosts su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
4. 启动服务
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service
验证
控制节点
source admin-openrc openstack compute service list +----+------------------+--------------+----------+---------+-------+----------------------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----+------------------+--------------+----------+---------+-------+----------------------------+
| 1 | nova-consoleauth | controller01 | internal | enabled | up | 2018-02-02T05:36:13.000000 |
| 2 | nova-scheduler | controller01 | internal | enabled | up | 2018-02-02T05:36:09.000000 |
| 5 | nova-conductor | controller01 | internal | enabled | up | 2018-02-02T05:36:11.000000 |
| 6 | nova-compute | compute01 | nova | enabled | up | 2018-02-02T05:36:13.000000 |
+----+------------------+--------------+----------+---------+-------+----------------------------+
参考博客 http://blog.51cto.com/egon09/1839667
Openstack_O版(otaka)部署_Nova部署的更多相关文章
- Openstack_O版(otaka)部署_准备环境和依赖软件
架构介绍 本次案列为基本的三节点部署 一:网络: 1.管理网络:192.168.198.0/24 2.数据网络:10.0.0.0/24 二:操作系统: CentOS Linux release 7.3 ...
- Openstack_O版(otaka)部署_镜像服务glance部署
安装和配置服务 1. 建库建用户 mysql -u root -p CREATE DATABASE glance; GRANT ALL PRIVILEGES ON glance.* TO '; GRA ...
- Openstack_O版(otaka)部署_Horizon部署
控制节点 1. 安装软件包 yum install openstack-dashboard -y 2. 修改配置文件 vim /etc/openstack-dashboard/local_settin ...
- Openstack_O版(otaka)部署_网络服务Neutron部署
控制节点配置 1. 建库建用户 CREATE DATABASE neutron; GRANT ALL PRIVILEGES ON neutron.* TO '; GRANT ALL PRIVILEGE ...
- Openstack_O版(otaka)部署_认证服务keystone部署
安装和配置服务 1. 建keystone库建用户 在控制节点执行 mysql -uroot -p123456 CREATE DATABASE keystone; GRANT ALL PRIVILEGE ...
- 中国版Office 365混合部署功能
中国版Office 365混合部署功能已经正式上线了(原计划6月份推出),虽然支持的类型不如国际版的Office 365全面,但这也标志了该功能与之前相比,已经迈出了重要一步.目前中国版Office ...
- Dubbo入门到精通学习笔记(九):简易版支付系统介绍、部署(单节点)
文章目录 部署(单节点) 一.前期准备 二.对部署环境进行规划 创建数据库 调整公共配置文件 应用部署前期准备 部署服务 部署 Web 应用 部署定时任务 一. 工程结构 第三方支付系统架构 pay- ...
- Spring Boot 揭秘与实战(八) 发布与部署 - 开发热部署
文章目录 1. spring-boot-devtools 实现热部署 2. Spring Loaded 实现热部署 3. 模板文件热部署 4. 源代码 Spring Boot 支持页面与类文件的热部署 ...
- 002-tomcat目录简介、应用部署【自动部署 ② 控制台部署 ③ 自定义部署】
一.目录及功能 主目录下有bin,conf,lib,logs,temp,webapps,work 7个文件夹 1.1.bin目录[重要] bin目录主要是用来存放tomcat的命令,主要有两大类,一类 ...
随机推荐
- cdh版本的hue安装配置部署以及集成hadoop hbase hive mysql等权威指南
hue下载地址:https://github.com/cloudera/hue hue学习文档地址:http://archive.cloudera.com/cdh5/cdh/5/hue-3.7.0-c ...
- verilog实验2:基于FPGA的59秒计时器设计
一.实验任务 利用四个数码管显示59秒计时器. 二.代码实现 将开发板的48M晶振分频出1M,然后计数器累加,将计数器结果显示在数码管上.低位逢十进一,第二位逢五进一,依次构成59秒计时器. 部分代码 ...
- BZOJ 2463: [中山市选2009]谁能赢呢?[智慧]
明和小红经常玩一个博弈游戏.给定一个n×n的棋盘,一个石头被放在棋盘的左上角.他们轮流移动石头.每一回合,选手只能把石头向上,下,左,右四个方向移动一格,并且要求移动到的格子之前不能被访问过.谁不能移 ...
- 一个开源的强类型客户端(.NET 中的 Open Fegin)— Rabbit Go
在做RabbitCloud(之前是一个RPC,现在是一个微服务框架)的时候往往避不开客户端代理,之前把这些客户端代理都算作服务框架不可缺少的一部分,随着后期的深入发现这些客户端代理其实可以互通,类似s ...
- linux下统计某个进程的CPU占用和内存使用
为了测试是否有内存泄露,写了一个监控脚本,统计这个进程的cpu和内存 主要用了 ps aux命令, 很简单,不多解释了,上脚本 #!/bin/bash # while loop CpuMemStat= ...
- JSONP && CORS
前天面试被问到了跨域的问题,自我感觉回答的并不理想,下面我就分享一下整理后的总结分享给大家 一.为什么要跨域 安全限制 JavaScript或Cookie只能访问同域下的内容——同源策略 同源策略 下 ...
- python爬虫(5)——正则表达式(二)
前一篇文章,我们使用re模块来匹配了一个长的字符串其中的部分内容.下面我们接着来作匹配"1305101765@qq.com advantage 314159265358 1892673 ...
- Jmeter_上传与下载
今天重点说一下Jmeter的上传与下载 1:Jmeter上传文件 首先确认你的文件名称,参数名称,MIME类型,这些可以从接口文档里面获取,或者直接在页面抓包然后从请求头里面查看.注意,此处我的文件路 ...
- 响应式框架Bootstrap
概念:Bootstrap将会根据你的屏幕的大小来调整HTML元素的大小 -- 强调 响应式设计的概念. 通过响应式设计,你无需再为你的网站设计一个手机版的.它在任何尺寸的屏幕上看起来都会不错. Boo ...
- java设计模式-----1、简单工厂模式
简单工厂模式是属于创建型模式,又叫做静态工厂方法(Static Factory Method)模式,但不属于23种GOF设计模式之一.简单工厂模式是由一个工厂对象决定创建出哪一种产品类的实例,简单来说 ...