# 建立数据库用户及权限
create database neutron;
grant all privileges on neutron.* to neutron@'localhost' identified by 'Abc@123';
grant all privileges on neutron.* to neutron@'%' identified by 'Abc@123';
flush privileges;
# 建立用户、角色、服务、项目、域、端点
source ~/.openstack_admin
openstack user create --domain default --project service --password Abc@123 neutron
openstack role add --project service --user neutron admin
openstack service create --name neutron --description "OpenStack Networking service" network 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

```bash
# 安装程序包
yum install -y openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables
```


```bash
# 变更配置文件
mv /etc/neutron/neutron.conf /etc/neutron/neutron.conf.org

cat > /etc/neutron/neutron.conf << EOF

[DEFAULT]

core_plugin = ml2

service_plugin =

transport_url = rabbit://openstack:Abc@123@controller

auth_strategy = keystone

notify_nova_on_port_status_changes = true

notify_nova_on_port_data_changes = true

[database]

connection = mysql+pymysql://neutron:Abc@123@controller/neutron

[keystone_authtoken]

www_authenticate_uri = http://controller:5000

auth_url = http://controller:5000/v3

memcached_servers = controller:11211

auth_type = password

project_domain_name = default

user_domain_name = default

project _name = service

username = neutron

password = Abc@123

[nova]

auth_url = http://controller:5000/v3

auth_type = password

project_domain_name = default

user_domain_name = default

project _name = service

region_name = RegionOne

username = nova

password = Abc@123

[oslo_concurrency]

lock_path = /var/lib/neutron/tmp

EOF

chmod 640 /etc/neutron/neutron.conf

chown root:neutron /etc/neutron/neutron.conf

mv /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugins/ml2/ml2_conf.ini.org

cat > /etc/neutron/plugins/ml2/ml2_conf.ini <<EOF

[DEFAULT]

[ml2]

type_drivers = flat,vlan

tenant_network_types =

mechanism_drivers = linuxbridge

extension_drivers = port_security

[ml2_type_flat]

flat_networks = provider

[securitygroup]

enable_ipet = true

EOF

chmod 640 /etc/neutron/plugins/ml2/ml2_conf.ini

chown root:neutron /etc/neutron/plugins/ml2/ml2_conf.ini

mv /etc/neutron/plugins/ml2/linuxbridge_agent.ini /etc/neutron/plugins/ml2/linuxbridge_agent.ini.org

cat > /etc/neutron/plugins/ml2/linuxbridge_agent.ini <<EOF

[DEFAULT]

[linux_bridge]

physical_interface_mappings = provider:eth1

[vxlan]

enable_vxlan = false

[securitygroup]

enable_security_group = true

firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

EOF

chmod 640 /etc/neutron/plugins/ml2/linuxbridge_agent.ini

chown root:neutron /etc/neutron/plugins/ml2/linuxbridge_agent.ini

mv /etc/neutron/dhcp_agent.ini /etc/neutron/dhcp_agent.ini.org

cat > /etc/neutron/dhcp_agent.ini <<EOF

[DEFAULT]

interface_driver = linuxbridge

dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq

enable_isolated_metadata = true

EOF

chmod 640 /etc/neutron/dhcp_agent.ini

chown root:neutron /etc/neutron/dhcp_agent.ini

/etc/neutron/metadata_agent.ini

[DEFAULT] 项目部分增加

nova_metadata_host = controller

metadata_proxy_shared_secret = Abc@123

[cache] 项目增加

memcache_servers = controller:11211

/etc/nova/nova.conf

未尾部分增加

[neutron]

url = http://controller:9696

auth_url = http://controller:5000/v3

auth_type = password

project_domain_name = default

user_domain_name = default

project _name = service

region_name = RegionOne

username = neutron

password = Abc@123

service_metadata_proxy = True

metadata_proxy_shared_secret = Abc@123

<br>
```bash
# 同步数据库
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
su -s /bin/bash -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head" neutron

```bash
# 开启服务
systemctl restart openstack-nova-api && systemctl enable openstack-nova-api
systemctl restart neutron-server && systemctl enable neutron-server
systemctl restart neutron-linuxbridge-agent && systemctl enable neutron-linuxbridge-agent
systemctl restart neutron-dhcp-agent && systemctl enable neutron-dhcp-agent
systemctl restart neutron-metadata-agent && systemctl enable neutron-metadata-agent
```


```bash
# 验证
openstack network agent list
```

openstack stein部署手册 8. neutron-api的更多相关文章

  1. openstack stein部署手册 9. neutron

    # 安装程序包 yum -y install openstack-neutron-linuxbridge ebtables ipset # 变更配置文件 mv /etc/neutron/neutron ...

  2. openstack stein部署手册 7. nova-compute

    # 安装程序包 yum install -y openstack-nova-compute # 变更配置文件 cd /etc/nova mv nova.conf nova.conf.org cat & ...

  3. openstack stein部署手册 6. nova-api

    # 建立数据库用户及权限 create database nova; grant all privileges on nova.* to nova@'localhost' identified by ...

  4. openstack stein部署手册 5. placement

    # 建立数据库用户及权限 create database placement; grant all privileges on placement.* to placement@'localhost' ...

  5. openstack stein部署手册 10. 创建实例

    # 建立网络(provider)与子网 openstack network create --share --external --provider-physical-network provider ...

  6. openstack stein部署手册 4. glance

    # 建立数据库用户及权限 create database glance; grant all privileges on glance.* to glance@'localhost' identifi ...

  7. openstack stein部署手册 3. keystone

    # 建立数据库用户及权限 create database keystone; grant all privileges on keystone.* to keystone@'localhost' id ...

  8. openstack stein部署手册 2. 基础应用

    1. chrony # 安装程序包 yum install -y chrony # 变更配置文件 /etc/chrony.conf 增加 server 192.168.123.200 iburst # ...

  9. openstack stein部署手册 10. horzion

    # 安装程序包 yum install -y openstack-dashboard # 变更配置文件 /etc/openstack-dashboard/local_settings 变更以下 OPE ...

随机推荐

  1. React Native商城项目实战10 - 个人中心中间内容设置

    1.新建一个MineMiddleView.js,专门用于构建中间的内容 /** * 个人中心中间内容设置 */ import React, { Component } from 'react'; im ...

  2. C3P0 详解

    定义: C3P0是一个开源的JDBC连接池,目前使用它的开源项目有Hibernate,Spring等. 数据库连接池的基本思想就是为数据库连接建立一个“缓冲池”.预先在缓冲池中放入一定数量的连接,当需 ...

  3. (转)sql server 事务与try catch

    本文转载自:http://www.cnblogs.com/sky_Great/archive/2013/01/09/2852417.html sql普通事务 begin transaction tr ...

  4. windows 10中使用命令行关掉占用指定端口的程序

    通过netstat -ano与findstr命令结合查询到带有9080端口的监听信息,图中最后一列为监听程序的PID 通过tasklist命令与findstr命令结合查询到指定PID对应的应用程序 使 ...

  5. 阶段1 语言基础+高级_1-3-Java语言高级_04-集合_04 数据结构_4_数据结构_链表

    查询慢,增删快. 绿色代表一条链 红色是另外一条链 .查询是从头开始查所以慢. 在300和55之间添加一个元素

  6. 监测工具dstat使用说明

    参考地址: https://blog.csdn.net/sinat_34789167/article/details/80986709

  7. Python高效率遍历文件夹寻找重复文件

    前言 为什么要写这篇文章呢...主要还是业务中有个需求,遍历一个将近200w数据的文件夹,大部分还都是视频文件那种,但是这玩意用的次数还不多,做文件夹index也不是很ok,所以写了一个脚本来处理这个 ...

  8. SQLServer中的top、MySql中的limit、Oracle中的rownum

    (1)在SQL Server中,我们使用 select top N * from tablename来查询tablename表中前N条记录. (2)在MySQL中,我们使用select * from ...

  9. js 相关好文章推荐

    1.关于xmlhttprequest https://segmentfault.com/a/1190000004322487 2.XMLHttpRequest2 新技巧 https://www.htm ...

  10. react 样式的写法之一 ---》styled-components的基本使用

    [react]---styled-components的基本使用---[WangQi]   一.官网地址 https://www.styled-components.com/ 二.styled-com ...