openstack Queens版本在centos7.1,最小化安装(安装nova(控制节点))

本文主要是介绍openstack Queens版本在centos7.1,最小化安装(安装nova(控制节点)),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

先在控制节点安装

在数据库中创建nova库和用户并授权

[root@con01~]# mysql -u root -ptest.2018

Welcometo the MariaDB monitor.  Commands endwith ; or \g.

YourMariaDB connection id is 30

Serverversion: 10.1.20-MariaDB MariaDB Server

 

Copyright(c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

 

Type'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

MariaDB[(none)]> CREATE DATABASE nova_api;

QueryOK, 1 row affected (0.01 sec)

 

MariaDB[(none)]> CREATE DATABASE nova;

QueryOK, 1 row affected (0.00 sec)

 

MariaDB[(none)]> CREATE DATABASE nova_cell0;

QueryOK, 1 row affected (0.00 sec)

 

MariaDB[(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' \

    ->  IDENTIFIED BY 'test.2018';

QueryOK, 0 rows affected (0.00 sec)

 

MariaDB[(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' \

    ->  IDENTIFIED BY 'test.2018';

QueryOK, 0 rows affected (0.00 sec)

 

MariaDB[(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \

    ->  IDENTIFIED BY 'test.2018';

QueryOK, 0 rows affected (0.00 sec)

 

MariaDB[(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' \

    ->  IDENTIFIED BY 'test.2018';

QueryOK, 0 rows affected (0.00 sec)

 

MariaDB[(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' \

    ->  IDENTIFIED BY 'test.2018';

QueryOK, 0 rows affected (0.00 sec)

 

MariaDB[(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \

    ->  IDENTIFIED BY 'test.2018';

QueryOK, 0 rows affected (0.00 sec)

 

 

************************************************************************

 

创建nova用户:

[root@con01~]# openstack user create --domain default --password-prompt nova

UserPassword:

RepeatUser Password:

+---------------------+----------------------------------+

|Field               | Value                            |

+---------------------+----------------------------------+

|domain_id           | default                          |

|enabled             | True                             |

|id                  |5d7cb0197e984095992e6359926b5b2f |

|name                | nova                             |

|options             | {}                               |

|password_expires_at | None                             |

+---------------------+----------------------------------+

 

将nova关联到admin角色 和service中

[root@con01~]# openstack role add --project service --user nova admin

[root@con01~]# openstack service create --name nova \

>   --description "OpenStack Compute"compute

+-------------+----------------------------------+

|Field       | Value                            |

+-------------+----------------------------------+

|description | OpenStack Compute               |

|enabled     | True                             |

|id          |399a8a16094249e7a9ade6f12b3deaa1 |

|name        | nova                             |

|type        | compute                          |

+-------------+----------------------------------+

You havenew mail in /var/spool/mail/root

 

创建api接口(公共 内部 管理)

[root@con01~]# openstack endpoint create --region RegionOne \

>   compute public http://controller:8774/v2.1

+--------------+----------------------------------+

|Field        | Value                            |

+--------------+----------------------------------+

|enabled      | True                             |

|id           |5d706fc652ab4a10a65c80566b1735c1 |

|interface    | public                           |

|region       | RegionOne                        |

|region_id    | RegionOne                        |

|service_id   | 399a8a16094249e7a9ade6f12b3deaa1|

|service_name | nova                            |

|service_type | compute                         |

|url          | http://controller:8774/v2.1      |

+--------------+----------------------------------+

 

[root@con01~]# openstack endpoint create --region RegionOne \

>   compute internal http://controller:8774/v2.1

+--------------+----------------------------------+

|Field        | Value                            |

+--------------+----------------------------------+

|enabled      | True                             |

|id           |7ac8d31bab9041da83e87256073360a9 |

|interface    | internal                         |

|region       | RegionOne                        |

|region_id    | RegionOne                        |

|service_id   |399a8a16094249e7a9ade6f12b3deaa1 |

|service_name | nova                            |

|service_type | compute                          |

|url          | http://controller:8774/v2.1      |

+--------------+----------------------------------+

 

[root@con01~]# openstack endpoint create --region RegionOne \

>   compute admin http://controller:8774/v2.1

+--------------+----------------------------------+

|Field        | Value                            |

+--------------+----------------------------------+

|enabled      | True                             |

|id           |14d8f72c2d9c48d3943531c6fc3f60ac |

|interface    | admin                            |

|region       | RegionOne                        |

|region_id    | RegionOne                        |

|service_id   |399a8a16094249e7a9ade6f12b3deaa1 |

|service_name | nova                            |

|service_type | compute                         |

|url          | http://controller:8774/v2.1      |

+--------------+----------------------------------+

 

 

************************************************************************

 

创建placement并关联admin角色和service  

[root@con01~]# openstack user create --domain default --password-prompt placement

UserPassword:

RepeatUser Password:

+---------------------+----------------------------------+

|Field               | Value                            |

+---------------------+----------------------------------+

|domain_id           | default                          |

|enabled             | True                             |

|id                  |0eeb11be98e4473fbc4a5ce6c08cfd12 |

|name                | placement                        |

|options             | {}                               |

|password_expires_at | None                             |

+---------------------+----------------------------------+

You havenew mail in /var/spool/mail/root

[root@con01~]# openstack role add --project service --user placement admin

[root@con01~]# openstack service create --name placement --description "PlacementAPI" placeme

nt+-------------+----------------------------------+

|Field       | Value                            |

+-------------+----------------------------------+

|description | Placement API                   |

|enabled     | True                             |

|id          |e2949d12ea424f49b0939f4b947b4f1f |

|name        | placement                        |

|type        | placement                        |

+-------------+----------------------------------+

You havenew mail in /var/spool/mail/root

 

 

创建api接口(公共 内部 管理)

[root@con01~]# openstack endpoint create --region RegionOne placement public http://controller

:8778+--------------+----------------------------------+

| Field        | Value                            |

+--------------+----------------------------------+

|enabled      | True                             |

|id           |15324fab69c44fa5a0159d6cfb77d895 |

|interface    | public                           |

| region       | RegionOne                        |

|region_id    | RegionOne                        |

|service_id   |e2949d12ea424f49b0939f4b947b4f1f |

|service_name | placement                       |

|service_type | placement                       |

|url          | http://controller:8778           |

+--------------+----------------------------------+

[root@con01~]# openstack endpoint create --region RegionOne placement internal http://controll

er:8778+--------------+----------------------------------+

|Field        | Value                            |

+--------------+----------------------------------+

|enabled      | True                             |

|id           |f346c01041524556999e13aefb7036ce |

|interface    | internal                         |

|region       | RegionOne                        |

|region_id    | RegionOne                        |

|service_id   |e2949d12ea424f49b0939f4b947b4f1f |

|service_name | placement                       |

|service_type | placement                       |

|url          | http://controller:8778           |

+--------------+----------------------------------+

[root@con01~]# openstack endpoint create --region RegionOne placement admin http://controller:

8778+--------------+----------------------------------+

|Field        | Value                            |

+--------------+----------------------------------+

|enabled      | True                             |

|id           |9a512ffeea024a40864dafb8df9d3804 |

|interface    | admin                            |

|region       | RegionOne                        |

|region_id    | RegionOne                        |

|service_id   |e2949d12ea424f49b0939f4b947b4f1f |

|service_name | placement                       |

|service_type | placement                       |

|url          | http://controller:8778           |

+--------------+----------------------------------+

 

 

************************************************************************

安装

yum install openstack-nova-api openstack-nova-conductor \
 
openstack-nova-consoleopenstack-nova-novncproxy \
 
openstack-nova-scheduleropenstack-nova-placement-api -y

修改配置文件(需要修改的选项较多)

[root@con01 ~]# cat /etc/nova/nova.conf |grep -v ^#

[DEFAULT]

my_ip =10.0.2.111

use_neutron= True

firewall_driver= nova.virt.firewall.NoopFirewallDriver

enabled_apis= osapi_compute,metadata

transport_url= rabbit://openstack:test.2018@controller

 

[api_database]

connection= mysql+pymysql://nova:test.2018@controller/nova_api

 

[database]

connection= mysql+pymysql://nova:test.2018@controller/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= test.2018

 

[vnc]

enabled= true

server_listen= 10.0.2.111

server_proxyclient_address= 10.0.2.111

 

[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= test.2018

 

***************************************************************

在/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>

 

 

重启httpd服务

systemctl restart httpd

 

 

***************************************************************

数据库初始化

 

[root@con01~]# su -s /bin/sh -c "nova-manage api_db sync" nova

 

会有下面的报错可以忽略

/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:332:NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported  exception.NotSupportedWarning

 

1.  # su -s /bin/sh -c "nova-managecell_v2 map_cell0" nova

2.   # su -s /bin/sh -c "nova-managecell_v2 create_cell --name=cell1 --verbose" nova

3.   # su -s /bin/sh -c "nova-manage dbsync" nova

 

验证nova cell0和cell1是否正确注册:

 

启动服务

# systemctl enable openstack-nova-api.service \
 
openstack-nova-consoleauth.serviceopenstack-nova-scheduler.service \
 
openstack-nova-conductor.serviceopenstack-nova-novncproxy.service

 

systemctl restart openstack-nova-api.service \
 
openstack-nova-consoleauth.service openstack-nova-scheduler.service\
 
openstack-nova-conductor.serviceopenstack-nova-novncproxy.service

 

 


这篇关于openstack Queens版本在centos7.1,最小化安装(安装nova(控制节点))的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/626102

相关文章

Python使用国内镜像加速pip安装的方法讲解

《Python使用国内镜像加速pip安装的方法讲解》在Python开发中,pip是一个非常重要的工具,用于安装和管理Python的第三方库,然而,在国内使用pip安装依赖时,往往会因为网络问题而导致速... 目录一、pip 工具简介1. 什么是 pip?2. 什么是 -i 参数?二、国内镜像源的选择三、如何

Python安装时常见报错以及解决方案

《Python安装时常见报错以及解决方案》:本文主要介绍在安装Python、配置环境变量、使用pip以及运行Python脚本时常见的错误及其解决方案,文中介绍的非常详细,需要的朋友可以参考下... 目录一、安装 python 时常见报错及解决方案(一)安装包下载失败(二)权限不足二、配置环境变量时常见报错及

浅析如何使用Swagger生成带权限控制的API文档

《浅析如何使用Swagger生成带权限控制的API文档》当涉及到权限控制时,如何生成既安全又详细的API文档就成了一个关键问题,所以这篇文章小编就来和大家好好聊聊如何用Swagger来生成带有... 目录准备工作配置 Swagger权限控制给 API 加上权限注解查看文档注意事项在咱们的开发工作里,API

MySQL8.2.0安装教程分享

《MySQL8.2.0安装教程分享》这篇文章详细介绍了如何在Windows系统上安装MySQL数据库软件,包括下载、安装、配置和设置环境变量的步骤... 目录mysql的安装图文1.python访问网址2javascript.点击3.进入Downloads向下滑动4.选择Community Server5.

CentOS系统Maven安装教程分享

《CentOS系统Maven安装教程分享》本文介绍了如何在CentOS系统中安装Maven,并提供了一个简单的实际应用案例,安装Maven需要先安装Java和设置环境变量,Maven可以自动管理项目的... 目录准备工作下载并安装Maven常见问题及解决方法实际应用案例总结Maven是一个流行的项目管理工具

java中不同版本JSONObject区别小结

《java中不同版本JSONObject区别小结》本文主要介绍了java中不同版本JSONObject区别小结,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们... 目录1. FastjsON2. Jackson3. Gson4. org.json6. 总结在Jav

MySql9.1.0安装详细教程(最新推荐)

《MySql9.1.0安装详细教程(最新推荐)》MySQL是一个流行的关系型数据库管理系统,支持多线程和多种数据库连接途径,能够处理上千万条记录的大型数据库,本文介绍MySql9.1.0安装详细教程,... 目录mysql介绍:一、下载 Mysql 安装文件二、Mysql 安装教程三、环境配置1.右击此电脑

在 Windows 上安装 DeepSeek 的完整指南(最新推荐)

《在Windows上安装DeepSeek的完整指南(最新推荐)》在Windows上安装DeepSeek的完整指南,包括下载和安装Ollama、下载DeepSeekRXNUMX模型、运行Deep... 目录在www.chinasem.cn Windows 上安装 DeepSeek 的完整指南步骤 1:下载并安装

Spring IOC控制反转的实现解析

《SpringIOC控制反转的实现解析》:本文主要介绍SpringIOC控制反转的实现,IOC是Spring的核心思想之一,它通过将对象的创建、依赖注入和生命周期管理交给容器来实现解耦,使开发者... 目录1. IOC的基本概念1.1 什么是IOC1.2 IOC与DI的关系2. IOC的设计目标3. IOC

golang1.23版本之前 Timer Reset方法无法正确使用

《golang1.23版本之前TimerReset方法无法正确使用》在Go1.23之前,使用`time.Reset`函数时需要先调用`Stop`并明确从timer的channel中抽取出东西,以避... 目录golang1.23 之前 Reset ​到底有什么问题golang1.23 之前到底应该如何正确的