zoukankan      html  css  js  c++  java
  • openstack 部署笔记--neutron控制节点

    控制节点

    配置neutron用户及服务

    $ . admin-openrc
    
    $ openstack user create --domain default --password-prompt neutron
    
    $ openstack role add --project service --user neutron admin
    
    $ openstack service create --name neutron 
      --description "OpenStack Networking" 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
    

    配私有网络(还有一种网络是公用网络)

    # yum install openstack-neutron openstack-neutron-ml2 
      openstack-neutron-linuxbridge ebtables
    

    neutron配置文件

    # vim /etc/neutron/neutron.conf
    [database]
    # ...
    connection = mysql+pymysql://neutron:root@controller/neutron
    [DEFAULT]
    # ...
    core_plugin = ml2
    service_plugins = router
    allow_overlapping_ips = true
    transport_url = rabbit://openstack:root@controller
    auth_strategy = keystone
    notify_nova_on_port_status_changes = true
    notify_nova_on_port_data_changes = true
    [keystone_authtoken]
    # ...
    auth_uri = http://controller:5000
    auth_url = http://controller:35357
    memcached_servers = controller:11211
    auth_type = password
    project_domain_name = default
    user_domain_name = default
    project_name = service
    username = neutron
    password = root
    [nova]
    # ...
    auth_url = http://controller:35357
    auth_type = password
    project_domain_name = default
    user_domain_name = default
    region_name = RegionOne
    project_name = service
    username = nova
    password = root
    [oslo_concurrency]
    # ...
    lock_path = /var/lib/neutron/tmp
    

    ml2配置文件

    # vim /etc/neutron/plugins/ml2/ml2_conf.ini
    [ml2]
    # ...
    type_drivers = flat,vlan,vxlan
    tenant_network_types = vxlan
    mechanism_drivers = linuxbridge,l2population
    extension_drivers = port_security
    [ml2_type_flat]
    # ...
    flat_networks = provider
    [ml2_type_vxlan]
    # ...
    vni_ranges = 1:1000
    [securitygroup]
    # ...
    enable_ipset = true
    

    linuxbridge_agent配置文件

    # vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
    [linux_bridge]
    physical_interface_mappings = provider:eth0
    [vxlan]
    enable_vxlan = true
    local_ip = 192.168.15.243
    l2_population = true
    [securitygroup]
    # ...
    enable_security_group = true
    firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
    
    
    # vim /etc/neutron/l3_agent.ini
    [DEFAULT]
    # ...
    interface_driver = linuxbridge
    
    
    # vim /etc/neutron/dhcp_agent.ini
    [DEFAULT]
    # ...
    interface_driver = linuxbridge
    dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
    enable_isolated_metadata = true
    

    继续配置

    # vim /etc/neutron/metadata_agent.ini
    [DEFAULT]
    # ...
    nova_metadata_ip = controller
    metadata_proxy_shared_secret = gcYwUkQj
    
    # vim /etc/nova/nova.conf
    [neutron]
    # ...
    url = http://controller:9696
    auth_url = http://controller:35357
    auth_type = password
    project_domain_name = default
    user_domain_name = default
    region_name = RegionOne
    project_name = service
    username = neutron
    password = root
    service_metadata_proxy = true
    metadata_proxy_shared_secret = gcYwUkQj
    
    # ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
    # su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf 
      --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron、
    
    # systemctl restart openstack-nova-api.service
    
    # systemctl enable neutron-server.service 
      neutron-linuxbridge-agent.service neutron-dhcp-agent.service 
      neutron-metadata-agent.service
    # systemctl start neutron-server.service 
      neutron-linuxbridge-agent.service neutron-dhcp-agent.service 
      neutron-metadata-agent.service
    
    # systemctl enable neutron-l3-agent.service
    # systemctl start neutron-l3-agent.service
    

      

      

      

  • 相关阅读:
    p2psearcher绿色版使用方法
    P2PSearcher云点播设置和使用技巧
    怎么看电脑有没有安装USB3.0驱动
    USB3.0驱动与2.0有什么区别
    win7 64位 安装java jdk1.8 ,修改配置环境变量
    jdk是什么?jdk1.8安装配置方法
    adb工具包究竟能帮我们做什么?
    web.xml中load-on-startup有和用处
    Spring Aop
    Struts2中的properties文件详解
  • 原文地址:https://www.cnblogs.com/37yan/p/6934670.html
Copyright © 2011-2022 走看看