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的命令,主要有两大类,一类 ...
随机推荐
- LongAdder基础
LongAdder是JDK8中并发包中的一个新类,和AtomicLong都使用CAS,但是性能比AtomicLong更好. LongAdder在AtomicLong的基础上进行了热点分离,热点分离类似 ...
- System.nanoTime
System.currentTimeMillis()返回的毫秒,这个毫秒其实就是自1970年1月1日0时起的毫秒数. System.nanoTime()返回的是纳秒,nanoTime而返回的可能是任意 ...
- 使用ssh 登录Linux 文件上传下载方法
最简单的方法: 安装WinSCP或者Filezilla, 启动该程序,然后自己输入输入主机名.端口.用户名.密码登录,然后在putty里面用pwd命令看看当前目录,再在WinSCP/Filezilla ...
- LeetCode - 596. Classes More Than 5 Students
There is a table courses with columns: student and class Please list out all classes which have more ...
- Spring bean的生命周期详解
bean的生命周期1.实例化bean 即new2.按照spring上下文对实例化的bean进行配置 即填充属性,也就是IOC/DI(控制反转,依赖注入)3.如果这个bean实现了BeanNameAwa ...
- IDEA的优质使用博客资源
intelliJ idea 使用技巧&方法 IntelliJ IDEA 常用设置讲解 IntelliJ IDEA 详细图解最常用的配置 ,适合刚刚用的新人. IntelliJ IDEA 常见文 ...
- os模块中关于文件/目录常用的函数使用方法
os模块中关于文件/目录常用的函数使用方法 函数名 使用方法 getcwd() 返回当前工作目录 chdir(path) 改变工作目录 listdir(path='.') 列举指定目录中的文件名('. ...
- 想想我们能拿HoloLens 做点什么
作为一个微软员工,顿时感觉好了很多. 中午吃饭同事们热烈讨论这东东: 1. 看电视 2. 办公 3. 用HoloLens 玩3d 游戏.满公园跑. 4. 看书 5. 开车的时候,实时显示地图 6. 一 ...
- Asp.Net Core2.0 基于QuartzNet任务管理系统
Quartz.NET官网地址:https://www.quartz-scheduler.net/ Quartz.NET文档地址:https://www.quartz-scheduler.net/doc ...
- Ubuntu上搭建SVN
参考文档:http://www.linuxidc.com/Linux/2016-08/133961.htm http://www.linuxidc.com/Linux/2015-01/111956.h ...