openstack stein部署手册 8. neutron-api
# 建立数据库用户及权限
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的更多相关文章
- openstack stein部署手册 9. neutron
# 安装程序包 yum -y install openstack-neutron-linuxbridge ebtables ipset # 变更配置文件 mv /etc/neutron/neutron ...
- openstack stein部署手册 7. nova-compute
# 安装程序包 yum install -y openstack-nova-compute # 变更配置文件 cd /etc/nova mv nova.conf nova.conf.org cat & ...
- openstack stein部署手册 6. nova-api
# 建立数据库用户及权限 create database nova; grant all privileges on nova.* to nova@'localhost' identified by ...
- openstack stein部署手册 5. placement
# 建立数据库用户及权限 create database placement; grant all privileges on placement.* to placement@'localhost' ...
- openstack stein部署手册 10. 创建实例
# 建立网络(provider)与子网 openstack network create --share --external --provider-physical-network provider ...
- openstack stein部署手册 4. glance
# 建立数据库用户及权限 create database glance; grant all privileges on glance.* to glance@'localhost' identifi ...
- openstack stein部署手册 3. keystone
# 建立数据库用户及权限 create database keystone; grant all privileges on keystone.* to keystone@'localhost' id ...
- openstack stein部署手册 2. 基础应用
1. chrony # 安装程序包 yum install -y chrony # 变更配置文件 /etc/chrony.conf 增加 server 192.168.123.200 iburst # ...
- openstack stein部署手册 10. horzion
# 安装程序包 yum install -y openstack-dashboard # 变更配置文件 /etc/openstack-dashboard/local_settings 变更以下 OPE ...
随机推荐
- Redis高可用分布式
阅读目录: 高可用 数据同步 分布式 分布式集群时代 总结 高可用 高可用(High Availability),是当一台服务器停止服务后,对于业务及用户毫无影响. 停止服务的原因可能由于网卡.路由器 ...
- 深入JavaWeb技术世界15:深入浅出Mybatis基本原理
本系列文章将整理到我在GitHub上的<Java面试指南>仓库,更多精彩内容请到我的仓库里查看 https://github.com/h2pl/Java-Tutorial 喜欢的话麻烦点下 ...
- XML的基础之一(概念和语法)
XML的基础(概念和语法) xml html 概念 异同 XML全称为extensible markup language,即可扩展标记语言,简单理解为可预定义标签的编程语言.它与HTML(超文本标 ...
- 三十五、robotframework中怎么将100转化成100.00
1.将100转化成100.00
- javascript 动态修改css样式方法汇总(四种方法)
在很多情况下,都需要对网页上元素的样式进行动态的修改.在JavaScript中提供几种方式动态的修改样式,下面将介绍方法的使用.效果.以及缺陷. 1.使用obj.className来修改样式表的类名. ...
- Ajax 实现导出文件-支持批量
个人感觉前端不行,好多东西记不住,所以只能将遇到的坎以及解决方案记录下,方便以后用到时查找. 首先:ajax不支持流,网上找了好多版本,感觉下面的方案不错,实验了下可行. 前端页面: <div ...
- 007-elasticsearch5.4.3【一】概述、Elasticsearch 访问方式、Elasticsearch 面向文档、常用概念
一.概述 Elasticsearch 是一个开源的搜索引擎,建立在一个全文搜索引擎库 Apache Lucene™ 基础之上. Elasticsearch 也是使用 Java 编写的,它的内部使用 L ...
- RocketMQ 创建和删除 topic,以及 broker 和 nameserver 之间的心跳
命令行主类:org.apache.rocketmq.tools.command.MQAdminStartup 客户端创建 topic 程序参数:updateTopic -n localhost:987 ...
- 阶段1 语言基础+高级_1-3-Java语言高级_04-集合_08 Map集合_10_练习_计算一个字符串中每个字符出现的次数
- IntelliJ IDEA的常用设置
1.设置IDEA主题样式 ①设置方法: ②效果:设置为Darcula之后整体的风格就是暗黑主题,如上图. 2.设置编辑区主题 ①设置方法: 注:由于IDEA自带的编辑区主题比较少,想要更多的编辑区主题 ...