设为首页 收藏本站
查看: 416|回复: 0

[经验分享] Openstack_newton手动安装配置(二)

[复制链接]

尚未签到

发表于 2018-5-31 10:08:03 | 显示全部楼层 |阅读模式
Networking service
Prerequisites


  • To create the database, complete these steps:

Use the databaseaccess client to connect to the database server as the root user:

mysql -u root -p
Create the neutron database:

mysql> CREATE DATABASE neutron;
Grant properaccess to the neutron database,replacing NEUTRON_DBPASS with a suitablepassword:

mysql> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \  IDENTIFIED BY 'NEUTRON_DBPASS';mysql> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' \  IDENTIFIED BY 'NEUTRON_DBPASS';

  • To create the service credentials, completethese steps:

Create the neutron user:

openstack user create --domain default --password-prompt neutron
密码:neutron
Add the admin role to the neutron user:

openstack role add --project service --user neutron admin
Create the neutron service entity:

$ openstack service create --name neutron \  --description "OpenStack Networking" network

  • Create the Networking service API endpoints:

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
Configure themetadata agent

Networking Option 2: Self-servicenetworks
yum install openstack-neutron openstack-neutron-ml2 \  openstack-neutron-linuxbridge ebtables
Configure the server component


  • Edit the /etc/neutron/neutron.conf file andcomplete the following actions:

In the [database] section,configure database access:

[database]...connection = mysql+pymysql://neutron:NEUTRON_DBPASS@controller/neutron
In the [DEFAULT] section, enablethe Modular Layer 2 (ML2) plug-in, router service, and overlapping IPaddresses:

[DEFAULT]...core_plugin = ml2service_plugins = routerallow_overlapping_ips = True
In the [DEFAULT] section,configure RabbitMQ message queueaccess:

[DEFAULT]...transport_url = rabbit://openstack:RABBIT_PASS@controller
In the [DEFAULT] and [keystone_authtoken] sections,configure Identity service access:

[DEFAULT]...auth_strategy = keystone
[keystone_authtoken]...auth_uri = http://controller:5000auth_url = http://controller:35357memcached_servers = controller:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = neutronpassword = NEUTRON_PASS
In the [DEFAULT] and [nova] sections,configure Networking to notify Compute of network topology changes:

[DEFAULT]...notify_nova_on_port_status_changes = Truenotify_nova_on_port_data_changes = True
[nova]...auth_url = http://controller:35357auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultregion_name = RegionOneproject_name = serviceusername = novapassword = NOVA_PASS
In the [oslo_concurrency] section,configure the lock path:

[oslo_concurrency]...lock_path = /var/lib/neutron/tmp
Configure the Modular Layer 2 (ML2) plug-in


  • Edit the /etc/neutron/plugins/ml2/ml2_conf.ini file andcomplete the following actions:

In the [ml2] section, enableflat, VLAN, and VXLAN networks:

[ml2]...type_drivers = flat,vlan,vxlan
In the [ml2] section, enableVXLAN self-service networks:

[ml2]...tenant_network_types = vxlan
In the [ml2] section, enablethe Linux bridge and layer-2 population mechanisms:

[ml2]...mechanism_drivers = linuxbridge,l2population
In the [ml2] section, enablethe port security extension driver:

[ml2]...extension_drivers = port_security
In the [ml2_type_flat] section,configure the provider virtual network as a flat network:

[ml2_type_flat]...flat_networks = provider
In the [ml2_type_vxlan] section,configure the VXLAN network identifier range for self-service networks:

[ml2_type_vxlan]...vni_ranges = 1:1000
In the [securitygroup] section, enable ipset to increaseefficiency of security group rules:

[securitygroup]...enable_ipset = True
Configure the Linux bridgeagent

Edit the /etc/neutron/plugins/ml2/linuxbridge_agent.ini file andcomplete the following actions:

In the [linux_bridge] section, map theprovider virtual network to the provider physical network interface:

[linux_bridge]physical_interface_mappings=provider:eno33554984
In the [vxlan] section, enableVXLAN overlay networks, configure the IP address of the physical networkinterface that handles overlay networks, and enable layer-2 population:

[vxlan]enable_vxlan=Truelocal_ip=192.168.174.222l2_population=True
In the [securitygroup] section, enablesecurity groups and configure the Linux bridge iptables firewall driver:

[securitygroup]...enable_security_group = Truefirewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
Configure the layer-3agent

Edit the /etc/neutron/l3_agent.ini file andcomplete the following actions:

In the [DEFAULT] section,configure the Linux bridge interface driver and external network bridge:

[DEFAULT]...interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriverexternal_network_bridge =
Configure the DHCP agent

Edit the /etc/neutron/dhcp_agent.ini file and complete the followingactions:


  • In the [DEFAULT] section, configure the Linuxbridge interface driver, Dnsmasq DHCP driver, and enable isolated metadata soinstances on provider networks can access metadata over the network:

·        [DEFAULT]

·        ...

·        interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver

·        dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq

·        enable_isolated_metadata = True


Install the components
yum install openstack-neutron-linuxbridgeebtables ipset

Configure the common component
Edit the /etc/neutron/neutron.conf file and complete the followingactions:


  • In the [database] section, comment out any connection options because compute nodes donot directly access the database.

  • In the [DEFAULT] section, configure RabbitMQ message queue access:

·        [DEFAULT]

·        ...

·        transport_url = rabbit://openstack:RABBIT_PASS@controller

In the [DEFAULT] and [keystone_authtoken] sections, configure Identity service access:

[DEFAULT]

...

auth_strategy = keystone


[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 = NEUTRON_PASS

In the [oslo_concurrency] section, configure the lock path:

[oslo_concurrency]

...

lock_path = /var/lib/neutron/tmp

Configure networking options
ConfigureCompute to use Networking


Edit the /etc/nova/nova.conf file and complete the followingactions:


  • In the [neutron] section, configure accessparameters:

·        [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 = NEUTRON_PASS

Finalize installation
Restart the Compute service:

systemctl restartopenstack-nova-compute.service

Start the Linux bridge agent andconfigure it to start when the system boots:

# systemctl enable neutron-linuxbridge-agent.service

# systemctl start neutron-linuxbridge-agent.service


  • The Networkingservice initialization scripts expect a symbolic link /etc/neutron/plugin.ini pointing to the ML2 plug-in configuration file, /etc/neutron/plugins/ml2/ml2_conf.ini. If thissymbolic link does not exist, create it using the following command:

ln -s /etc/neutron/plugins/ml2/ml2_conf.ini/etc/neutron/plugin.ini


  • Populate thedatabase:

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



  • Restart theCompute API service:

systemctl restart openstack-nova-api.service


  • Start the Networking services andconfigure them to start when the system boots.

    For both networking options:

# 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

For networking option 2, also enable and start the layer-3service:

# systemctl enable neutron-l3-agent.service

# systemctl start neutron-l3-agent.service

验证网络配置:


the dashboard on the controller node

yum install openstack-dashboard

1. Edit the /etc/openstack-dashboard/local_settings file and complete the followingactions:


  • Configure the dashboard to useOpenStack services on the controller node:

·        OPENSTACK_HOST="controller"


  • Allow all hoststo access the dashboard:

·        ALLOWED_HOSTS=['*', ]


  • Configure the memcached session storageservice:

·        SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

·        

·        CACHES = {

·            'default': {

·                 'BACKEND':'django.core.cache.backends.memcached.MemcachedCache',

·                 'LOCATION':'controller:11211',

·            }

·        }


  • Enable theIdentity API version 3:

·        OPENSTACK_KEYSTONE_URL="http://%s:5000/v3" % OPENSTACK_HOST


  • Enable supportfor domains:

·        OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT=True


  • Configure APIversions:

·        OPENSTACK_API_VERSIONS = {

·            "identity": 3,

·            "image": 2,

·            "volume": 2,

·        }


  • Configure default as the defaultdomain for users that you create via the dashboard:

·        OPENSTACK_KEYSTONE_DEFAULT_DOMAIN="default"



  • Configure user as the defaultrole for users that you create via the dashboard:

·        OPENSTACK_KEYSTONE_DEFAULT_ROLE="user"


  • If you chosenetworking option 1, disable support for layer-3 networking services:

·        OPENSTACK_NEUTRON_NETWORK = {

·            ...

·            'enable_router': False,

·            'enable_quotas': False,

·            'enable_distributed_router':False,

·            'enable_ha_router': False,

·            'enable_lb': False,

·            'enable_firewall': False,

·            'enable_vpn': False,

·            'enable_fip_topology_check':False,

·        }


  • Optionally,configure the time zone:

·        TIME_ZONE="TIME_ZONE"

Finalize installation
systemctl restart httpd.servicememcached.service


OK,安装完成可以使用啦


刚开始进入的时候先创建网络



网络创建完毕后创建云主机类型



Ok可以创建虚拟机啦



由于做的比较简单当下一步到网络的时候就可以直接点击创建云主机啦



OK大功告成。

附上官方文档地址:centos7,linux系统可自行选择。

http://docs.openstack.org/newton/install-guide-rdo/horizon-install.html

  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-483343-1-1.html 上篇帖子: OpenStack服务组件介绍 下篇帖子: openstack 报错处理
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表