五、OpenStack 安装 Neutron-1

在Controller 节点

# mysql -u root -p

> CREATE DATABASE neutron;

> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'openstack';

> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'openstack';

> exit

# source admin-openrc.sh

# keystone user-create --name neutron --pass openstack

# keystone user-role-add --user neutron --tenant service --role admin

# keystone service-create --name neutron --type network --description "OpenStack Networking"

# keystone endpoint-create --service-id $(keystone service-list | awk '/ network / {print $2}') --publicurl http://controller:9696 --internalurl http://controller:9696 --adminurl http://controller:9696 --region regionOne

# apt-get install neutron-server neutron-plugin-ml2 python-neutronclient

# nano /etc/neutron/neutron.conf

[DEFAULT]
rpc_backend = rabbitneutron.openstack.common.rpc.impl_kombu
rabbit_host = controller
rabbit_password = openstack

[database]

connection = mysql://neutron:openstack@controller/neutron

rpc_backend = rabbit
rabbit_host = controller
rabbit_password = openstack

auth_strategy = keystone

verbose = True

core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
allow_overlapping_ips = True

notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
nova_url = http://controller:8774/v2
nova_admin_auth_url = http://controller:35357/v2.0
nova_region_name = regionOne
nova_admin_username = nova
nova_admin_tenant_id = SERVICE_TENANT_ID #换成对应的ID
nova_admin_password = openstack

[keystone_authtoken]
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = neutron
admin_password = openstack

# nano /etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]
...
type_drivers = gre
tenant_network_types = gre
mechanism_drivers = openvswitch

[ml2_type_gre]
...
tunnel_id_ranges = 1:1000

[securitygroup]
...
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver

# nano /etc/nova/nova.conf

[DEFAULT]
...
network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver

[neutron]
url = http://controller:9696
auth_strategy = keystone
admin_auth_url = http://controller:35357/v2.0
admin_tenant_name = service
admin_username = neutron
admin_password = openstack

# neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade icehouse

# service nova-api restart

# service nova-scheduler restart

# service nova-conductor restart

# service neutron-server restart


# rm -f /var/lib/neutron/neutron.sqlite

$ source admin-openrc.sh

$ neutron ext-list

转载于:https://my.oschina.net/jennerlo/blog/649619

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值