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一次性将指定版本所有包上传PyPI镜像解决方案

《Python一次性将指定版本所有包上传PyPI镜像解决方案》本文主要介绍了一个安全、完整、可离线部署的解决方案,用于一次性准备指定Python版本的所有包,然后导出到内网环境,感兴趣的小伙伴可以跟随... 目录为什么需要这个方案完整解决方案1. 项目目录结构2. 创建智能下载脚本3. 创建包清单生成脚本4

SpringBoot 多环境开发实战(从配置、管理与控制)

《SpringBoot多环境开发实战(从配置、管理与控制)》本文详解SpringBoot多环境配置,涵盖单文件YAML、多文件模式、MavenProfile分组及激活策略,通过优先级控制灵活切换环境... 目录一、多环境开发基础(单文件 YAML 版)(一)配置原理与优势(二)实操示例二、多环境开发多文件版

RabbitMQ 延时队列插件安装与使用示例详解(基于 Delayed Message Plugin)

《RabbitMQ延时队列插件安装与使用示例详解(基于DelayedMessagePlugin)》本文详解RabbitMQ通过安装rabbitmq_delayed_message_exchan... 目录 一、什么是 RabbitMQ 延时队列? 二、安装前准备✅ RabbitMQ 环境要求 三、安装延时队

Ubuntu如何升级Python版本

《Ubuntu如何升级Python版本》Ubuntu22.04Docker中,安装Python3.11后,使用update-alternatives设置为默认版本,最后用python3-V验证... 目China编程录问题描述前提环境解决方法总结问题描述Ubuntu22.04系统自带python3.10,想升级

linux系统上安装JDK8全过程

《linux系统上安装JDK8全过程》文章介绍安装JDK的必要性及Linux下JDK8的安装步骤,包括卸载旧版本、下载解压、配置环境变量等,强调开发需JDK,运行可选JRE,现JDK已集成JRE... 目录为什么要安装jdk?1.查看linux系统是否有自带的jdk:2.下载jdk压缩包2.解压3.配置环境

Python库 Django 的简介、安装、用法入门教程

《Python库Django的简介、安装、用法入门教程》Django是Python最流行的Web框架之一,它帮助开发者快速、高效地构建功能强大的Web应用程序,接下来我们将从简介、安装到用法详解,... 目录一、Django 简介 二、Django 的安装教程 1. 创建虚拟环境2. 安装Django三、创

linux安装、更新、卸载anaconda实践

《linux安装、更新、卸载anaconda实践》Anaconda是基于conda的科学计算环境,集成1400+包及依赖,安装需下载脚本、接受协议、设置路径、配置环境变量,更新与卸载通过conda命令... 目录随意找一个目录下载安装脚本检查许可证协议,ENTER就可以安装完毕之后激活anaconda安装更

Jenkins的安装与简单配置过程

《Jenkins的安装与简单配置过程》本文简述Jenkins在CentOS7.3上安装流程,包括Java环境配置、RPM包安装、修改JENKINS_HOME路径及权限、启动服务、插件安装与系统管理设置... 目录www.chinasem.cnJenkins安装访问并配置JenkinsJenkins配置邮件通知

更改linux系统的默认Python版本方式

《更改linux系统的默认Python版本方式》通过删除原Python软链接并创建指向python3.6的新链接,可切换系统默认Python版本,需注意版本冲突、环境混乱及维护问题,建议使用pyenv... 目录更改系统的默认python版本软链接软链接的特点创建软链接的命令使用场景注意事项总结更改系统的默

Linux升级或者切换python版本实现方式

《Linux升级或者切换python版本实现方式》本文介绍在Ubuntu/Debian系统升级Python至3.11或更高版本的方法,通过查看版本列表并选择新版本进行全局修改,需注意自动与手动模式的选... 目录升级系统python版本 (适用于全局修改)对于Ubuntu/Debian系统安装后,验证Pyt