OpenStack kilo版(3) Nova部署
部署在controller和compute节点
配置数据库
MariaDB [(none)]> CREATE DATABASE nova;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'nova';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'127.0.0.1' IDENTIFIED BY 'nova';
Query OK, 0 rows affected (0.00 sec
MariaDB [(none)]> flush privileges ;
Query OK, 0 rows affected (0.00 sec)
配置Nova服务认证
创建nova用户:
root@controller:~# openstack user create --password-prompt nova
User Password:nova
Repeat User Password:nova
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | 7b2efefe960f434f8119491deee1ef17 |
| name | nova |
| username | nova |
+----------+----------------------------------+
将admin角色添加给nova用户:
root@controller:~# openstack role add --project service --user nova admin
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | 6d814860fbae4b9eb46c5e33835ba2a1 |
| name | admin |
+-------+----------------------------------+
创建nova的服务实体:
root@controller:~# openstack service create --name nova --description "OpenStack Compute" compute
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Compute |
| enabled | True |
| id | 58a99c547ee348339166a07ca9bb7b2c |
| name | nova |
| type | compute |
+-------------+----------------------------------+
创建计算服务的API endpoint:
root@controller:~# openstack endpoint create --publicurl http://controller:8774/v2/%\(tenant_id\)s --internalurl http://controller:8774/v2/%\(tenant_id\)s --adminurl http://controller:8774/v2/%\(tenant_id\)s --region RegionOne compute
+--------------+-----------------------------------------+
| Field | Value |
+--------------+-----------------------------------------+
| adminurl | http://controller:8774/v2/%(tenant_id)s |
| id | 8adca9694c1648bd8ef703ae2330f1c8 |
| internalurl | http://controller:8774/v2/%(tenant_id)s |
| publicurl | http://controller:8774/v2/%(tenant_id)s |
| region | RegionOne |
| service_id | 58a99c547ee348339166a07ca9bb7b2c |
| service_name | nova |
| service_type | compute |
+--------------+-----------------------------------------+
root@controller:~# openstack service create --name nova --description "OpenStack Compute" computev3
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Compute |
| enabled | True |
| id | 815f72af9d224da285fcf1ff3928bf66 |
| name | nova |
| type | computev3 |
+-------------+----------------------------------+
root@controller:~# openstack endpoint create --publicurl http://controller:8774/v3 --internalurl http://controller:8774/v3 --adminurl http://controller:8774/v3 --region RegionOne computev3
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| adminurl | http://controller:8774/v3 |
| id | 7560a3156fef4a4c9d2e94495638dd61 |
| internalurl | http://controller:8774/v3 |
| publicurl | http://controller:8774/v3 |
| region | RegionOne |
| service_id | 815f72af9d224da285fcf1ff3928bf66 |
| service_name | nova |
| service_type | computev3 |
+--------------+----------------------------------+
安装nova server
controller节点部署
root@controller:~# apt-get install nova-api nova-cert nova-conductor nova-consoleauth nova-novncproxy nova-scheduler python-novaclient
配置nova
配置/etc/nova/nova.conf :
#[DEFAULT]部分,添加以下配置
[DEFAULT]
logdir=/var/log/nova
verbose=True
rpc_backend = rabbit
auth_strategy= keystone
#controller节点管理网络的ip地址
my_ip= 192.168.1.200
#配置VNC代理以使用控制节点的管理IP地址
vncserver_listen =192.168.1.200
vncserver_proxyclient_address =192.168.1.200
#数据库连接
[database]
connection= mysql://nova:nova@controller/nova
#RabbitMQ消息队列
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = openstack
#身份认证服务
[keystone_authtoken]
auth_uri= http://controller:5000
auth_url= http://controller:35357
auth_plugin= password
project_domain_id= default
user_domain_id= default
project_name= service
username= nova
password= nova
#配置镜像服务的位置
[glance]
host = controller
#配置锁路径
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
#v3api
[osapi_v3]
enabled = true
配置初始化数据库:
root@controller:~# su -s /bin/sh -c "nova-manage db sync" nova
重启服务:
root@controller:~# service nova-api restart
nova-api stop/waiting
nova-api start/running, process 30242
root@controller:~# service nova-cert restart
nova-cert stop/waiting
nova-cert start/running, process 30279
root@controller:~# service nova-consoleauth restart
nova-consoleauth stop/waiting
nova-consoleauth start/running, process 30305
root@controller:~# service nova-scheduler restart
nova-scheduler stop/waiting
nova-scheduler start/running, process 30330
root@controller:~# service nova-conductor restart
nova-conductor stop/waiting
nova-conductor start/running, process 30358
root@controller:~# service nova-novncproxy restart
nova-novncproxy stop/waiting
nova-novncproxy start/running, process 30389
root@controller:~# rm -f /var/lib/nova/nova.sqlite
安装nova-compute
compute节点:
root@compute1:~# apt-get install nova-compute sysfsutils
配置nova-compute
配置/etc/nova/nova.conf :
#[DEFAULT]部分,添加以下配置
[DEFAULT]
resume_guests_state_on_host_boot = true
running_deleted_instance_action = log
until_refresh = 5
max_age = 86400
rpc_backend = rabbit
auth_strategy = keystone
#compute节点管理网络的ip地址
my_ip = 192.168.31.21
#配置VNC代理以启用远程终端的访问
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 192.168.31.21
novncproxy_base_url = http://controller:6080/vnc_auto.html
#RabbitMQ消息队列
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = openstack
#身份认证服务
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = nova
#配置镜像服务
[glance]
host = controller
#配置锁路径
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
重启计算服务:
root@compute1:~# service nova-compute restart
nova-compute stop/waiting
nova-compute start/running, process 1952
删除ubuntu默认创建的SQLite数据库:
root@compute1:~# rm -f /var/lib/nova/nova.sqlite
校验安装
root@controller:~# nova service-list
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| 1 | nova-cert | controller | internal | enabled | up | 2019-08-16T10:28:51.000000 | - |
| 2 | nova-consoleauth | controller | internal | enabled | up | 2019-08-16T10:28:51.000000 | - |
| 3 | nova-scheduler | controller | internal | enabled | up | 2019-08-16T10:28:51.000000 | - |
| 4 | nova-conductor | controller | internal | enabled | up | 2019-08-16T10:28:46.000000 | - |
| 6 | nova-compute | compute1 | nova | enabled | up | 2019-08-16T10:28:47.000000 | - |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
OpenStack kilo版(3) Nova部署的更多相关文章
- OpenStack Kilo版加CEPH部署手册
OpenStack Kilo版加CEPH部署手册 作者: yz联系方式: QQ: 949587200日期: 2015-7-13版本: Kilo 转载地址: http://mp.weixin.qq.co ...
- OpenStack kilo版(5) Neutron部署
neutron简介: Neutron 通过 plugin 和 agent 提供的网络服务. plugin 位于 Neutron server,包括 core plugin 和 service plug ...
- OpenStack kilo版(4) Glance部署
Glance简介 Glance-api:接受云系统镜像的构建.删除.读取请求 Glance-Registry:云系统的镜像注册服务 部署在controller节点 配置数据库 MariaDB [(no ...
- OpenStack kilo版(2) keystone部署
部署在controller节点 配置数据库 MariaDB [(none)]> CREATE DATABASE keystone; Query OK, 1 row affected (0.00 ...
- openstack安装newton版本Nova部署(三)
一.控制节点安装部署Nova Nova 包含API(负责接收相应外部请求,支持OpenStackAPI,EC2API):cert:负责身份认证:schedule:用于云主机调度(虚拟机创建在哪台主机上 ...
- OpenStack kilo版(1) 部署环境
硬件 VMware workstation虚拟机 Ubuntu14.04操作系统 虚拟机网络规划 管理网络: eth0, 桥接模式 10.0.0.0/24 外部网络: eth1, nat模式(需要关闭 ...
- OpenStack kilo版(8) 部署cinder
直接将cinder服务和块设备都部署在controller节点上 在controller节点添加一块100G的块设备/dev/sdb 配置数据库 (root@localhost) [(none)]&g ...
- OpenStack kilo版(7) 部署dashboard
安装dashboard root@controller:~# apt-get install openstack-dashboard 配置 /etc/openstack-dashboard/loc ...
- OpenStack_I版 5.Nova部署
Nova安装 创建配置存放目录,日志存放目录,执行文件目录,虚拟机目录 Nova配置修改 生成主配置文件 创建Nova数据库 同步Nova数据库 验证 Nova连接RabbitMQ配置修改 key ...
随机推荐
- linux非root用户安装rabbitmq
因为rabbitmq是用erlang语言写的,所以装rabbitmq前第一步得先装erlang. 我们到erlang官网https://www.erlang.org/downloads下载安装包,最新 ...
- 0.9.0.RELEASE版本的spring cloud alibaba sentinel+gateway网关实例
sentinel除了让服务提供方.消费方用之外,网关也能用它来限流.我们基于上次整的网关(参见0.9.0.RELEASE版本的spring cloud alibaba nacos+gateway网关实 ...
- 123457123456#1#----com.MC.EnglishGame98--前拼后广--jp英语-mc
com.MC.EnglishGame98--前拼后广--jp英语-mc
- LeetCode_404. Sum of Left Leaves
404. Sum of Left Leaves Easy Find the sum of all left leaves in a given binary tree. Example: 3 / \ ...
- 12点睛Spring4.1-Spring Aware
12.1 Aware 我们设计的准则是解耦,这就意味着我们不能对Spring的IoC容器有直接的依赖,但是我们还是想我们的bean能识别容器的资源; 使用aware能让我们在应用的任意位置获得spri ...
- git的使用学习(一)git的简介和安装
Git简介 Git是什么? Git是目前世界上最先进的分布式版本控制系统(没有之一). Git有什么特点?简单来说就是:高端大气上档次! 那什么是版本控制系统? 如果你用Microsoft Word写 ...
- eNSP模拟器OSPF单区域配置
实验拓扑图如下 下一步对终端设备与路由器的端口进行基本的ip设置 配置完成后要注意检查是否有小错误,不然会对后面的测试带来麻烦.在进行基础配置的时候一定要细心细心细心. 下一步我们就要进行OSPF的配 ...
- Beginning Linux Programming 学习--chapter 17 Programming KDE using QT
KDE: KDE,K桌面环境(K Desktop Environment)的缩写.一种著名的运行于 Linux.Unix 以及FreeBSD 等操作系统上的自由图形桌面环境,整个系统采用的都是 Tro ...
- LeetCode 278. 第一个错误的版本(First Bad Version)
278. 第一个错误的版本 LeetCode278. First Bad Version 题目描述 你是产品经理,目前正在带领一个团队开发新的产品.不幸的是,你的产品的最新版本没有通过质量检测.由于每 ...
- CF731E Funny Game
题目描述 一个长度为 N 的序列 ai ,双方轮流操作 每次的操作是选择一个长度大于 1 的前缀,计算它的和 s ,然后 用 s 替换它的前缀,同时当前玩家获得 s 的分数. 当只剩下一个元素,游戏结 ...