OpenStack Pike Minimal安装:四、计算服务

Ⅰ、在controller节点上配置nova

1.创建nova服务凭据

#先使用脚本登陆admin
[[email protected] ~]# . admin-openstack.sh

①创建nova user

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

②关联

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

③创建nova service

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

④创建服务API

openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1
openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1
openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1

2.创建placement服务凭据

[[email protected] ~]# . admin-openstack.sh

①创建placement user

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

②关联

openstack role add --project service --user placement admin

③创建placement service

openstack service create --name placement --description "Placement API" placement

④创建API

openstack endpoint create --region RegionOne placement public http://controller:8778
openstack endpoint create --region RegionOne placement internal http://controller:8778
openstack endpoint create --region RegionOne placement admin http://controller:8778

3.安装nova相关软件

[[email protected] ~]# yum install openstack-nova-api openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler openstack-nova-placement-api -y

4.配置nova.conf

[[email protected] ~]# cp /etc/nova/nova.conf /etc/nova/nova.conf.bak
[[email protected] ~]# cat /etc/nova/nova.conf
#
[DEFAULT]
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:[email protected]
my_ip = 20.0.20.21
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver

[api_database]
connection = mysql+pymysql://nova:[email protected]/nova_api

[database]
connection = mysql+pymysql://nova:[email protected]/nova

[api]
auth_strategy = keystone

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova

[vnc]
enabled = true
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip

[glance]
api_servers = http://controller:9292

[oslo_concurrency]
lock_path = /var/lib/nova/tmp

[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:35357/v3
username = placement
password = placement

[scheduler]
discover_hosts_in_cells_interval = 300

5.配置00-nova-placement-api.conf

[[email protected] ~]# vim /etc/httpd/conf.d/00-nova-placement-api.conf
#在文件末尾添加
<Directory /usr/bin>
   <IfVersion >= 2.4>
      Require all granted
   </IfVersion>
   <IfVersion < 2.4>
      Order allow,deny
      Allow from all
   </IfVersion>
</Directory>

6.重启httpd

[[email protected] ~]# systemctl restart httpd

7.填充数据库

su -s /bin/sh -c "nova-manage api_db sync" nova
su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
su -s /bin/sh -c "nova-manage db sync" nova

8.检测数据

nova-manage cell_v2 list_cells

mysql -h controller -u nova -pnova -e "use nova_api;show tables;"
mysql -h controller -u nova -pnova -e "use nova;show tables;"
mysql -h controller -u nova -pnova -e "use nova_cell0;show tables;"

9.启动服务

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

Ⅱ、在compute节点配置nova

1.安装nova

[[email protected] ~]# yum install openstack-nova-compute -y

2.配置nova.conf

[[email protected] ~]# cp /etc/nova/nova.conf /etc/nova/nova.conf.bak
[[email protected] ~]# cat /etc/nova/nova.conf
#
[DEFAULT]
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:[email protected]
my_ip = 20.0.20.22
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver

[api]
auth_strategy = keystone

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller: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://controller:6080/vnc_auto.html

[glance]
api_servers = http://controller:9292

[oslo_concurrency]
lock_path = /var/lib/nova/tmp

[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:35357/v3
username = placement
password = placement

3.查看计算节点是否支持硬件加速

[[email protected] ~]# egrep -c ‘(vmx|svm)‘ /proc/cpuinfo
0
#如果返回值为0,则不支持硬件加速,需要配置nova.conf中[libvirt] 部分
[[email protected] ~]# vim /etc/nova/nova.conf
[libvirt]
virt_type  =  qemu

4.启动服务

[[email protected] ~]# systemctl enable libvirtd.service openstack-nova-compute.service
[[email protected] ~]# systemctl start libvirtd.service openstack-nova-compute.service

.

Ⅲ、在controller上添加compute到cell数据库

1.查看计算节点

[[email protected] ~]# . admin-openstack.sh
[[email protected] ~]# openstack compute service list --service nova-compute
+----+--------------+---------+------+---------+-------+----------------------------+
| ID | Binary       | Host    | Zone | Status  | State | Updated At                 |
+----+--------------+---------+------+---------+-------+----------------------------+
|  6 | nova-compute | compute | nova | enabled | up    | 2018-09-06T09:38:49.000000 |
+----+--------------+---------+------+---------+-------+----------------------------+

2.自动注册compute节点

[[email protected] ~]#vim /etc/chrony.conf
[scheduler]
discover_hosts_in_cells_interval = 300

3.验证

openstack compute service list
openstack catalog list
openstack image list
nova-status upgrade check

原文地址:http://blog.51cto.com/lullaby/2171320

时间: 2024-10-30 12:08:41

OpenStack Pike Minimal安装:四、计算服务的相关文章

OpenStack Pike Minimal安装:二、身份认证

1.在controller节点上安装keystone [email protected] ~]# yum install openstack-keystone httpd mod_wsgi -y 2.配置 [[email protected] ~]# vim /etc/keystone/keystone.conf [database] connection = mysql+pymysql://keystone:[email protected]/keystone [token] provider

OpenStack Pike Minimal安装:三、镜像管理

1.创建服务凭据 #先使用脚本登陆admin [[email protected] ~]# . admin-openstack.sh ①创建glance user openstack user create --domain default --password-prompt glance ②关联 openstack role add --project service --user glance admin ③创建glance service openstack service create

OpenStack Pike Minimal安装:一、环境准备

1.关闭防火墙和selinux 2.配置hosts [[email protected] ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 20.0.20.21 controller 20.0.20.22 compu

OpenStack Pike Minimal安装:六、管理界面

Ⅰ.配置dashboard 1.在controller上安装dashboard [[email protected] ~]# yum install openstack-dashboard -y 2.配置 ①修改local_settings文件 [[email protected] ~]# vim /etc/openstack-dashboard/local_settings OPENSTACK_HOST = "controller" OPENSTACK_KEYSTONE_URL =

OpenStack pike版 安装openstack服务(4) 续安装openstack服务(3) &nbsp; &nbsp;

Compute service overview 计算服务概述 OpenStack用于对主机的计算和管理云计算系统.OpenStack的计算是一个基础设施即服务(IaaS)系统的一个重要组成部分.主要模块是用python实现的. OpenStack计算与OpenStack身份验证交互用来完成认证:OpenStack镜像服务用于磁盘和服务器镜像:用户和管理接口为OpenStack Dashboard.镜像访问受到项目和用户的限制,每个项目的配额是有限的(例如,实例的数量).OpenStack计算可

OpenStack pike版 安装openstack服务(3) 续基本环境部署(2)

安装openstack服务 所有openstack服务的安装指南链接:https://docs.openstack.org/pike/install/ 最小化部署,需要按照下面指定的顺序安装以下服务: Identity service – keystone installation for Pike Image service – glance installation for Pike Compute service – nova installation for Pike Networkin

OpenStack pike版 安装openstack服务(5) 续安装openstack服务(4)

网络服务简介 OpenStack网络(neutron)允许您创建和将其他OpenStack服务管理的接口设备附加到网络中.插件可以适应不同的网络设备和软件,为OpenStack的架构和部署提供灵活性. 它包括以下组件: neutron-server:接受并将API请求路由到相应的OpenStack网络插件以进行操作. OpenStack Networking plug-ins and agent:即插即用端口,创建网络或者子网,提供IP地址.这些插件和代理根据特定云使用的供应商和技术而有所不同.

[ Openstack ] Openstack-Mitaka 高可用之 计算服务(Nova)

目录 Openstack-Mitaka 高可用之 概述    Openstack-Mitaka 高可用之 环境初始化    Openstack-Mitaka 高可用之 Mariadb-Galera集群部署    Openstack-Mitaka 高可用之 memcache    Openstack-Mitaka 高可用之 Pacemaker+corosync+pcs高可用集群    Openstack-Mitaka 高可用之 认证服务(keystone)    Openstack-Mitaka

openstack M版安装 compute(nova)服务篇

配置安装nova compute服务 安装controller节点 一.创建nova数据库 [[email protected] ~]# mysql -u root -p >>CREATE DATABASE nova_api; >>CREATE DATABASE nova; >>GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost'   IDENTIFIED BY 'NOVA_DBPASS'; >>G