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 ...
随机推荐
- codeforces 682C
鸽了两天,还是我太蒟了,mayan游戏调不出来,难题又不会,只有刷水DFS才能勉强维持一下生计这样子,我还是要提高姿势水平啊! 题目描述: 给定一棵树,每条边有边权,每个点有点权,如果某个点到其子节点 ...
- canvas介绍(画布)
canvas(画布)主要是位图 svg(矢量图) canvas标签,必须要写的3个属性 id width height 为什么不再style中设置width和height呢? 因为这设置width和h ...
- C#中使用Join与GroupJoin将两个集合进行关联与分组
转自:https://www.cnblogs.com/cncc/p/7985843.html 对于Join的用法说明如下: 语法: public static IEnumerable<TResu ...
- React-Native 之 GD (二十一)APP 打包
1.生成一个签名密钥: 在 /android/app 下运行 说明:keytool -genkey -v -keystore my-release-key.keystore -alias my-key ...
- find查找特殊权限用法
find查找特殊权限的用法 find選項與參數: 3. 與檔案權限及名稱有關的參數: -name filename:搜尋檔案名稱為 filename 的檔案: -size [+-]SIZE:搜尋比 S ...
- 在vue中如何引jquer
最近学习vue,习惯性的通过<script>标签引入jquery,写完后报错才想起来,这种方式在vue是不适用的. 1:因为已经安装了vue脚手架,所以需要在webpack中全局引入jqu ...
- MySQL-default设置
Both statements insert a value into the phone column, but the first inserts a NULL value and the sec ...
- excel实现筛选去重操作
前情提要: 做图表时,希望更新数据后能自动化更新图表,需要各种公式之间相互配合.此时的需求是,将A表中的不同用户登录的地点做一个图表统计. 1.创建透视表 以用户id和地点当做行标签制作透视表,透视表 ...
- 16/7/7_PHP-访问控制
访问控制 前面的小节,我们已经接触过访问控制了,访问控制通过关键字public,protected和private来实现.被定义为公有的类成员可以在任何地方被访问.被定义为受保护的类成员则可以被其自身 ...
- Pycharm中使用virtualenv创建虚拟环境
虚拟环境是Python解释器的一个私有副本,在这个环境中你可以安装私有包,而且不会影响系统中安装的全局Python解释器. 虚拟环境非常有用,可以在系统的Python解释器中避免包的混乱和版本的冲突. ...