# 建立数据库用户及权限
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. C. Almost Equal

    C. Almost Equal n个数字全排成一个圈,满足任意相邻n个之和之间最大最小值之差不超过1 n为偶数时 不存在 n为奇数,构造 #include<bits/stdc++.h> u ...

  2. 12 November

    [SCOI2005] Mine BZOJ 1088: 相信大家都玩过扫雷的游戏.那是在一个 n×m的矩阵里面有一些雷,要你根据一些信息找出雷来.万圣节到了 ,"余"人国流行起了一种 ...

  3. synchronized 同步

    1.synchronized关键字的作用域有二种: 1)是某个对象实例内,synchronized aMethod(){}可以防止多个线程同时访问这个对象的synchronized方法(如果一个对象有 ...

  4. 大数据笔记(十四)——HBase的过滤器与Mapreduce

    一. HBase过滤器 1.列值过滤器 2.列名前缀过滤器 3.多个列名前缀过滤器 4.行键过滤器5.组合过滤器 package demo; import javax.swing.RowFilter; ...

  5. weui 框架

    weui是一个框架,但是官方并没有提供文档: 所以我们需要在github上来通过案例来了解他的用法 一般做列表,左边的图片要么60x60,要么80x80用的比较多 weui是一个小巧的框架,所以带来的 ...

  6. ORA-00346,借助_allow_resetlogs_corruption开库

    Mon Aug 06 10:15:08 2018Errors in file /data/app/oracle/diag/rdbms/prod/prod/trace/prod_ora_6831.trc ...

  7. python值的引用传递和go语言的值传递

    一:值传递 实参a 原本指向地址 1638212,代表1638212这个地址的值是3.在swap函数中,实参a将值拷贝给形参a,形参a此时也在内存中拥有地址,地址= xxxx,值为3,在所有的函数体内 ...

  8. 003-js-MD5

    源码 /* global define */ ;(function ($) { 'use strict' /* * Add integers, wrapping at 2^32. This uses ...

  9. VMware 虚拟化编程(3) —VMware vSphere Web Service API 解析

    目录 目录 前文列表 VMware vSphere Web Services API VMware vSphere Web Services SDK vSphere WS API 中的托管对象 Man ...

  10. 阶段1 语言基础+高级_1-3-Java语言高级_06-File类与IO流_07 缓冲流_2_BufferedOutputStream_字节缓冲

    子类 继承父类,这些方法都可以使用 必须写上flush,刷新数据数据才能写入到文件内