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

相关文章

Spring Security 基于表达式的权限控制

前言 spring security 3.0已经可以使用spring el表达式来控制授权,允许在表达式中使用复杂的布尔逻辑来控制访问的权限。 常见的表达式 Spring Security可用表达式对象的基类是SecurityExpressionRoot。 表达式描述hasRole([role])用户拥有制定的角色时返回true (Spring security默认会带有ROLE_前缀),去

Zookeeper安装和配置说明

一、Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式。 ■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境; ■ 伪集群模式:就是在一台物理机上运行多个Zookeeper 实例; ■ 集群模式:Zookeeper运行于一个集群上,适合生产环境,这个计算机集群被称为一个“集合体”(ensemble) Zookeeper通过复制来实现

CentOS7安装配置mysql5.7 tar免安装版

一、CentOS7.4系统自带mariadb # 查看系统自带的Mariadb[root@localhost~]# rpm -qa|grep mariadbmariadb-libs-5.5.44-2.el7.centos.x86_64# 卸载系统自带的Mariadb[root@localhost ~]# rpm -e --nodeps mariadb-libs-5.5.44-2.el7

Centos7安装Mongodb4

1、下载源码包 curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.2.1.tgz 2、解压 放到 /usr/local/ 目录下 tar -zxvf mongodb-linux-x86_64-rhel70-4.2.1.tgzmv mongodb-linux-x86_64-rhel70-4.2.1/

【前端学习】AntV G6-08 深入图形与图形分组、自定义节点、节点动画(下)

【课程链接】 AntV G6:深入图形与图形分组、自定义节点、节点动画(下)_哔哩哔哩_bilibili 本章十吾老师讲解了一个复杂的自定义节点中,应该怎样去计算和绘制图形,如何给一个图形制作不间断的动画,以及在鼠标事件之后产生动画。(有点难,需要好好理解) <!DOCTYPE html><html><head><meta charset="UTF-8"><title>06

Centos7安装JDK1.8保姆版

工欲善其事,必先利其器。这句话同样适用于学习Java编程。在开始Java的学习旅程之前,我们必须首先配置好适合的开发环境。 通过事先准备好这些工具和配置,我们可以避免在学习过程中遇到因环境问题导致的代码异常或错误。一个稳定、高效的开发环境能够让我们更加专注于代码的学习和编写,提升学习效率,减少不必要的困扰和挫折感。因此,在学习Java之初,投入一些时间和精力来配置好开发环境是非常值得的。这将为我

Android实现任意版本设置默认的锁屏壁纸和桌面壁纸(两张壁纸可不一致)

客户有些需求需要设置默认壁纸和锁屏壁纸  在默认情况下 这两个壁纸是相同的  如果需要默认的锁屏壁纸和桌面壁纸不一样 需要额外修改 Android13实现 替换默认桌面壁纸: 将图片文件替换frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.*  (注意不能是bmp格式) 替换默认锁屏壁纸: 将图片资源放入vendo

安装nodejs环境

本文介绍了如何通过nvm(NodeVersionManager)安装和管理Node.js及npm的不同版本,包括下载安装脚本、检查版本并安装特定版本的方法。 1、安装nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash 2、查看nvm版本 nvm --version 3、安装

day-51 合并零之间的节点

思路 直接遍历链表即可,遇到val=0跳过,val非零则加在一起,最后返回即可 解题过程 返回链表可以有头结点,方便插入,返回head.next Code /*** Definition for singly-linked list.* public class ListNode {* int val;* ListNode next;* ListNode() {}*

计算机毕业设计 大学志愿填报系统 Java+SpringBoot+Vue 前后端分离 文档报告 代码讲解 安装调试

🍊作者:计算机编程-吉哥 🍊简介:专业从事JavaWeb程序开发,微信小程序开发,定制化项目、 源码、代码讲解、文档撰写、ppt制作。做自己喜欢的事,生活就是快乐的。 🍊心愿:点赞 👍 收藏 ⭐评论 📝 🍅 文末获取源码联系 👇🏻 精彩专栏推荐订阅 👇🏻 不然下次找不到哟~Java毕业设计项目~热门选题推荐《1000套》 目录 1.技术选型 2.开发工具 3.功能