6-openstack-nova 控制节点

nova的作用:

nova各个组件的基本作用

nova-scheduler

前提:source admin-openstack

6.1.创建nova和nova_api数据库

mysql> CREATE DATABASE nova_api
mysql> CREATE DATABASE nova;

6.2.数据库进行授权

mysql> GRANT ALL PRIVILEGES ON nova_api.* TO ‘nova‘@‘localhost‘ IDENTIFIED BY ‘nova‘;
mysql> GRANT ALL PRIVILEGES ON nova_api.* TO ‘nova‘@‘%‘ IDENTIFIED BY ‘nova‘;
mysql> GRANT ALL PRIVILEGES ON nova.* TO ‘nova‘@‘localhost‘ IDENTIFIED BY ‘nova‘;
mysql> GRANT ALL PRIVILEGES ON nova.* TO ‘nova‘@‘%‘   IDENTIFIED BY ‘nova‘;

6.3 创建nova用户 nova密码

 openstack user create --domain default   --password-prompt nova

User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 8a7dbf5279404537b1c7b86c033620fe |
| name                | nova                             |
| password_expires_at | None                             |
+---------------------+----------------------------------+

6.4 给nova添加admin的角色

openstack role add --project service --user nova admi

6.5 创建nova项目

openstack service create --name nova   --description "OpenStack Compute" compute

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Compute                |
| enabled     | True                             |
| id          | 060d59eac51b4594815603d75a00aba2 |
| name        | nova                             |
| type        | compute                          |
+-------------+----------------------------------+

6.6 创建控制节点的endopint

 openstack endpoint create --region RegionOne   compute public http://192.168.56.11:8774/v2.1/%\(tenant_id\)s

+--------------+-------------------------------------------+
| Field        | Value                                     |
+--------------+-------------------------------------------+
| enabled      | True                                      |
| id           | 3c1caa473bfe4390a11e7177894bcc7b          |
| interface    | public                                    |
| region       | RegionOne                                 |
| region_id    | RegionOne                                 |
| service_id   | 060d59eac51b4594815603d75a00aba2          |
| service_name | nova                                      |
| service_type | compute                                   |
| url          | http://controller:8774/v2.1/%(tenant_id)s |
+--------------+-------------------------------------------+

openstack endpoint create --region RegionOne   compute internal http://192.168.56.11:8774/v2.1/%\(tenant_id\)s

+--------------+-------------------------------------------+
| Field        | Value                                     |
+--------------+-------------------------------------------+
| enabled      | True                                      |
| id           | e3c918de680746a586eac1f2d9bc10ab          |
| interface    | internal                                  |
| region       | RegionOne                                 |
| region_id    | RegionOne                                 |
| service_id   | 060d59eac51b4594815603d75a00aba2          |
| service_name | nova                                      |
| service_type | compute                                   |
| url          | http://controller:8774/v2.1/%(tenant_id)s |
+--------------+-------------------------------------------+

 openstack endpoint create --region RegionOne   compute admin http://192.168.56.11:8774/v2.1/%\(tenant_id\)s

+--------------+-------------------------------------------+
| Field        | Value                                     |
+--------------+-------------------------------------------+
| enabled      | True                                      |
| id           | 38f7af91666a47cfb97b4dc790b94424          |
| interface    | admin                                     |
| region       | RegionOne                                 |
| region_id    | RegionOne                                 |
| service_id   | 060d59eac51b4594815603d75a00aba2          |
| service_name | nova                                      |
| service_type | compute                                   |
| url          | http://controller:8774/v2.1/%(tenant_id)s |
+--------------+-------------------------------------------+

6.7 安装软件包nova  除了nova的计算节点

yum install openstack-nova-api openstack-nova-conductor   openstack-nova-console openstack-nova-novncproxy   openstack-nova-scheduler

6.8 修改nova的配置文件

[[email protected] ~]# grep  ‘^[a-Z]‘  /etc/nova/nova.conf
auth_strategy=keystone  #使用kestone认证
use_neutron=True        #使用neutron的网络
enabled_apis=osapi_compute,metadata  #支持的API模型
firewall_driver = nova.virt.firewall.NoopFirewallDriver #防火墙驱动
connection=mysql+pymysql://nova:[email protected]/nova_api  #keystone认证
connection=mysql+pymysql://nova:[email protected]/nova
api_servers=http://192.168.56.11:9292
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service 
username = nova
password = nova
lock_path=/var/lib/nova/tmp  #锁文件
transport_url=rabbit://openstack:[email protected] #消息队列
vncserver_listen=0.0.0.0 #vnc监听的IP
vncserver_proxyclient_address=192.168.56.11 #vncproxy  h5的界面化工具
[[email protected] ~]#

6.9 同步书nova的数据库和nova-api的 数据库

# su -s /bin/sh -c "nova-manage api_db sync" nova
# su -s /bin/sh -c "nova-manage db sync" nova

6.10 启动计算节点

# 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.servic

6.11 验证最后的成功

[[email protected] nova]# openstack host list 
+-------------+-------------+----------+
| Host Name   | Service     | Zone     |
+-------------+-------------+----------+
| linux-node1 | consoleauth | internal |
| linux-node1 | conductor   | internal |
| linux-node1 | scheduler   | internal |
+-------------+-------------+----------+
[[email protected] nova]#
时间: 2024-10-17 00:49:40

6-openstack-nova 控制节点的相关文章

##5.1 Nova控制节点--openstack

##5.1 Nova控制节点 ##5.1 Nova控制节点 # controller 安装 #5.1.Nova-controller.sh #创建Nova数据库.用户.认证,前面已设置 source ./admin-openstack.sh || { echo "加载前面设置的admin-openstack.sh环境变量脚本";exit; } # keystone上服务注册 ,创建nova用户.服务.API # nova用户前面已建 openstack service create -

Openstack 单控制节点部署实例

一.前期准备 1.openstack集群设备列表 10.240.216.101 os-node1    控制节点(ceph mon mds节点) 10.240.216.102 os-node2    计算节点(ceph mon mds节点) 10.240.216.103 os-node3    计算节点(ceph mon mds节点) 10.240.216.104 os-node4    存储节点(ceph osd节点) 10.240.216.105 os-node5    存储节点(ceph

CentOS 7部署OpenStack(4)—部署Nova控制节点

1.创建数据库 [[email protected] ~]# mysql -u root -p -e "CREATE DATABASEnova;" Enter password: [[email protected] ~]# mysql -u root -p -e "GRANT ALL PRIVILEGES ONnova.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';" Enter password: [[email pr

Openstack:计算节点没法启动的一次排查过程

openstack的控制节点和计算节点重启后,在控制节点上查看计算资源的状态: [[email protected] ~]# openstack compute service list +----+------------------+------------------------+----------+---------+-------+---------------------- | ID | Binary           | Host                   | Zon

如何删除 OpenStack Nova 僵尸实例

http://www.vpsee.com/2011/11/how-to-delete-a-openstack-nova-zombie-instance/ 前天强制重启一台 OpenStack Nova 控制结点以后发现虚拟机消失,但是 euca-describe-instances 命令显示 instances 仍然是 running 的状态,使用 euca-terminate-instances 终止命令仍然无效,暂时把这样的 instance 称作"僵尸实例(zombie instance)

openstack部署安装(Icehouse版本)-控制节点(Controller)-计算服务(nova)

nova为计算服务,能够启动虚拟机实例.可以将这些服务配置在单独的节点或同一节点上.大多数服务在控制器节点上运行,在一个专用的计算节点上运行虚拟机运行的服务.此次,我们将compute部署到控制节点上. 4.1 Install Compute controller services(安装计算服务) 4.1.1 安装compute所需要的包 # yum install openstack-nova-api openstack-nova-cert openstack-nova-conductor  

OpenStack入门篇(九)之nova服务(控制节点)的部署与测试

1.Nova介绍 Nova是openstack最早的两块模块之一,另一个是对象存储swift.在openstack体系中一个叫做计算节点,一个叫做控制节点.这个主要和nova相关,我们把安装为计算节点成为:nova-compute,把除了nova-compute叫做控制节点.nova-compute是创建虚拟机的,只是创建虚拟机,所有的控制都在另一台上.OpenStack计算组件请求OpenStack Identity服务进行认证:请求OpenStack Image服务提供磁盘镜像:为OpenS

openstack icehouse系列之控制节点搭建

大家都知道openstack是目前最热门.最火的一个开源云计算软件.openstack是IaaS(基础设施即服务)组件,让任何人都可以自行建立和提供云端运算服务. 今天学习搭建下openstack icehouse版本的搭建.下面是环境介绍 网络节点:ml2.openvswitch.DHCP.l3.metadata 控制节点:mysql.keystone.glance.nova.neutron.dashboard.cinder 计算节点:nova-compute.qemu-kvm.openvsw

openstack 部署笔记--neutron控制节点

控制节点 配置neutron用户及服务 $ . admin-openrc $ openstack user create --domain default --password-prompt neutron $ openstack role add --project service --user neutron admin $ openstack service create --name neutron --description "OpenStack Networking" ne

openstack Juno系列之控制节点搭建

openstack Juno系列之控制节点搭建 controller控制节点搭建 安装keystone ------------- 所有主机hosts: 取消其中127.0.0.1 10.0.0.11  controller 10.0.0.21  neutron 10.0.0.31  compute to configure prerequisites: apt-get install python-software-properties add-apt-repository cloud-arc