OpenStack(M)+ ubuntu 搭建学习七:Neutron组件

一、先决条件1.进入数据库$ mysql -u root -p 2.创建``neutron`` 数据库CREATE DATABASE neutron; 3.对``neutron`` 数据库授予合适的访问权限使用合适的密码替换 NEUTRON_DBPASSGRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \ IDENTIFIED ...
摘要由CSDN通过智能技术生成

目录

一、先决条件

二、创建服务证书

三、配置私有网络 Self-service networks

四、 配置Neutron服务

五、测试操作

具体步骤可参考官方文档:OpenStack Docs: OpenStack Installation Guide for Ubuntu


一、先决条件

        1.进入数据库

$ mysql -u root -p

        2.创建``neutron`` 数据库

CREATE DATABASE neutron;

        3.对``neutron`` 数据库授予合适的访问权限

                使用合适的密码替换 NEUTRON_DBPASS

GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \
  IDENTIFIED BY 'NEUTRON_DBPASS';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' \
  IDENTIFIED BY 'NEUTRON_DBPASS';

二、创建服务证书

        1.重新加载`admin`用户的管理凭据

$ source /openstack/admin-openrc

        2.创建`neutron`用户

$ openstack user create --domain default --password-prompt neutron
root@controller:~# openstack user create --domain default --password-prompt neutron
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | 7e21d37409734671bb63a8db46b1b9a9 |
| enabled   | True                             |
| id        | aa6986ed152b4baea948e0765fb79ca8 |
| name      | neutron                          |
+-----------+----------------------------------+

3.为项目`service`与用户`neutron`添加角色`admin`

$ openstack role add --project service --user neutron admin

        4.创建`network`服务实体

$ openstack service create --name neutron \
    --description "OpenStack Networking" network
root@controller:~# openstack service create --name neutron \
>     --description "OpenStack Networking" network
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Networking             |
| enabled     | True                             |
| id          | c9427d4968f34212b1eb5e958db6109e |
| name        | neutron                          |
| type        | network                          |
+-------------+----------------------------------+

         5.创建`network`服务的访问端点`endpoint`

$ openstack endpoint create --region RegionOne \
    network public http://controller:9696
$ openstack endpoint create --region RegionOne \
    network internal http://controller:9696
$ openstack endpoint create --region RegionOne \
    network admin http://controller:9696
root@controller:~# openstack endpoint create --region RegionOne \
>     network public http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | c53ae6f025394367b6e6bac2011d4386 |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | c9427d4968f34212b1eb5e958db6109e |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696   
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值