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

相关文章

Ubuntu上手动安装Go环境并解决“可执行文件格式错误”问题

《Ubuntu上手动安装Go环境并解决“可执行文件格式错误”问题》:本文主要介绍Ubuntu上手动安装Go环境并解决“可执行文件格式错误”问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未... 目录一、前言二、系统架构检测三、卸载旧版 Go四、下载并安装正确版本五、配置环境变量六、验证安装七、常见

一文详解如何查看本地MySQL的安装路径

《一文详解如何查看本地MySQL的安装路径》本地安装MySQL对于初学者或者开发人员来说是一项基础技能,但在安装过程中可能会遇到各种问题,:本文主要介绍如何查看本地MySQL安装路径的相关资料,需... 目录1. 如何查看本地mysql的安装路径1.1. 方法1:通过查询本地服务1.2. 方法2:通过MyS

电脑软件不能安装到C盘? 真相颠覆你的认知!

《电脑软件不能安装到C盘?真相颠覆你的认知!》很多人习惯把软件装到D盘、E盘,刻意绕开C盘,这种习惯从哪来?让我们用数据和案例,拆解背后的3大原因... 我身边不少朋友,在使用电脑安装软件的时候,总是习惯性的把软件安装到D盘或者E盘等位置,刻意避开C盘。如果你也有这样的习惯,或者不明白为什么要这么做,那么我

MySQL精准控制Binlog日志数量的三种方案

《MySQL精准控制Binlog日志数量的三种方案》作为数据库管理员,你是否经常为服务器磁盘爆满而抓狂?Binlog就像数据库的“黑匣子”,默默记录着每一次数据变动,但若放任不管,几天内这些日志文件就... 目录 一招修改配置文件:永久生效的控制术1.定位my.cnf文件2.添加核心参数不重启热更新:高手应

ubuntu20.0.4系统中安装Anaconda的超详细图文教程

《ubuntu20.0.4系统中安装Anaconda的超详细图文教程》:本文主要介绍了在Ubuntu系统中如何下载和安装Anaconda,提供了两种方法,详细内容请阅读本文,希望能对你有所帮助... 本文介绍了在Ubuntu系统中如何下载和安装Anaconda。提供了两种方法,包括通过网页手动下载和使用wg

ubuntu如何部署Dify以及安装Docker? Dify安装部署指南

《ubuntu如何部署Dify以及安装Docker?Dify安装部署指南》Dify是一个开源的大模型应用开发平台,允许用户快速构建和部署基于大语言模型的应用,ubuntu如何部署Dify呢?详细请... Dify是个不错的开源LLM应用开发平台,提供从 Agent 构建到 AI workflow 编排、RA

如何在Ubuntu上安装NVIDIA显卡驱动? Ubuntu安装英伟达显卡驱动教程

《如何在Ubuntu上安装NVIDIA显卡驱动?Ubuntu安装英伟达显卡驱动教程》Windows系统不同,Linux系统通常不会自动安装专有显卡驱动,今天我们就来看看Ubuntu系统安装英伟达显卡... 对于使用NVIDIA显卡的Ubuntu用户来说,正确安装显卡驱动是获得最佳图形性能的关键。与Windo

ubuntu16.04如何部署dify? 在Linux上安装部署Dify的技巧

《ubuntu16.04如何部署dify?在Linux上安装部署Dify的技巧》随着云计算和容器技术的快速发展,Docker已经成为现代软件开发和部署的重要工具之一,Dify作为一款优秀的云原生应用... Dify 是一个基于 docker 的工作流管理工具,旨在简化机器学习和数据科学领域的多步骤工作流。它

Docker安装MySQL镜像的详细步骤(适合新手小白)

《Docker安装MySQL镜像的详细步骤(适合新手小白)》本文详细介绍了如何在Ubuntu环境下使用Docker安装MySQL5.7版本,包括从官网拉取镜像、配置MySQL容器、设置权限及内网部署,... 目录前言安装1.访问docker镜像仓库官网2.找到对应的版本,复制右侧的命令即可3.查看镜像4.启

Android NDK版本迭代与FFmpeg交叉编译完全指南

《AndroidNDK版本迭代与FFmpeg交叉编译完全指南》在Android开发中,使用NDK进行原生代码开发是一项常见需求,特别是当我们需要集成FFmpeg这样的多媒体处理库时,本文将深入分析A... 目录一、android NDK版本迭代分界线二、FFmpeg交叉编译关键注意事项三、完整编译脚本示例四