首页 > 数据库 > 数据库开发技术 > OpenStack离线Train版安装(十二)
OpenStack官方安装指南:服务组件
neutron-install-verify在制节点检查确认neutron服务安装成功Note:Perform these commands on the controller node.
You can perform further testing of your networking using the neutron-sanity-check command line client.Use the verification section for the networking option that you chose to deploy.
Source the admin credentials to gain access to admin-only CLI commands:
cd
touch admin-openrc.sh
vim admin-openrc.sh
文件内容
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_PROJECT_DOMAIN_NAME=Default
export OS_USER_DOMAIN_NAME=Default
export OS_AUTH_URL=http://controller:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
cd
source admin-openrc.sh
列出已加载的扩展,以验证该neutron-server过程是否成功启动List loaded extensions to verify successful launch of the neutron-server process:
openstack extension list --network
neutron ext-list
例:
[root@controller ~]# openstack extension list --network
+----------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
| Name | Alias | Description |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
| Subnet Pool Prefix Operations | subnetpool-prefix-ops | Provides support for adjusting the prefix list of subnet pools |
| Default Subnetpools | default-subnetpools | Provides ability to mark and use a subnetpool as the default. |
| Network IP Availability | network-ip-availability | Provides IP availability data for each network and subnet. |
| Network Availability Zone | network_availability_zone | Availability zone support for network. |
| Subnet Onboard | subnet_onboard | Provides support for onboarding subnets into subnet pools |
| Network MTU (writable) | net-mtu-writable | Provides a writable MTU attribute for a network resource. |
| Port Binding | binding | Expose port bindings of a virtual port to external application |
| agent | agent | The agent management extension. |
| Subnet Allocation | subnet_allocation | Enables allocation of subnets from a subnet pool |
| DHCP Agent Scheduler | dhcp_agent_scheduler | Schedule networks among dhcp agents |
| Neutron external network | external-net | Adds external network attribute to network resource. |
| Empty String Filtering Extension | empty-string-filtering | Allow filtering by attributes with empty string value |
| Neutron Service Flavors | flavors | Flavor specification for Neutron advanced services. |
| Network MTU | net-mtu | Provides MTU attribute for a network resource. |
| Availability Zone | availability_zone | The availability zone extension. |
| Quota management support | quotas | Expose functions for quotas management per tenant |
| Tag support for resources with standard attribute: subnet, trunk, network_segment_range, router, network, policy, subnetpool, port, security_group, floatingip | standard-attr-tag | Enables to set tag on resources with standard attribute. |
| Availability Zone Filter Extension | availability_zone_filter | Add filter parameters to AvailabilityZone resource |
| If-Match constraints based on revision_number | revision-if-match | Extension indicating that If-Match based on revision_number is supported. |
| Filter parameters validation | filter-validation | Provides validation on filter parameters. |
| Multi Provider Network | multi-provider | Expose mapping of virtual networks to multiple physical networks |
| Quota details management support | quota_details | Expose functions for quotas usage statistics per project |
| Address scope | address-scope | Address scopes extension. |
| Agent's Resource View Synced to Placement | agent-resources-synced | Stores success/failure of last sync to Placement |
| Subnet service types | subnet-service-types | Provides ability to set the subnet service_types field |
| Neutron Port MAC address regenerate | port-mac-address-regenerate | Network port MAC address regenerate |
| Add security_group type to network RBAC | rbac-security-groups | Add security_group type to network RBAC |
| Provider Network | provider | Expose mapping of virtual networks to physical networks |
| Neutron Service Type Management | service-type | API for retrieving service providers for Neutron advanced services |
| Neutron Extra DHCP options | extra_dhcp_opt | Extra options configuration for DHCP. For example PXE boot options to DHCP clients can be specified (e.g. tftp-server, server-ip-address, bootfile-name) |
| Port filtering on security groups | port-security-groups-filtering | Provides security groups filtering when listing ports |
| Resource timestamps | standard-attr-timestamp | Adds created_at and updated_at fields to all Neutron resources that have Neutron standard attributes. |
| Resource revision numbers | standard-attr-revisions | This extension will display the revision number of neutron resources. |
| Pagination support | pagination | Extension that indicates that pagination is enabled. |
| Sorting support | sorting | Extension that indicates that sorting is enabled. |
| security-group | security-group | The security groups extension. |
| RBAC Policies | rbac-policies | Allows creation and modification of policies that control tenant access to resources. |
| standard-attr-description | standard-attr-description | Extension to add descriptions to standard attributes |
| IP address substring filtering | ip-substring-filtering | Provides IP address substring filtering when listing ports |
| Port Security | port-security | Provides port security |
| Allowed Address Pairs | allowed-address-pairs | Provides allowed address pairs |
| project_id field enabled | project-id | Extension that indicates that project_id field is enabled. |
| Port Bindings Extended | binding-extended | Expose port bindings of a virtual port to external application |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
[root@controller ~]#
[root@controller ~]# neutron ext-list
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| alias | name |
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| subnetpool-prefix-ops | Subnet Pool Prefix Operations |
| default-subnetpools | Default Subnetpools |
| network-ip-availability | Network IP Availability |
| network_availability_zone | Network Availability Zone |
| subnet_onboard | Subnet Onboard |
| net-mtu-writable | Network MTU (writable) |
| binding | Port Binding |
| agent | agent |
| subnet_allocation | Subnet Allocation |
| dhcp_agent_scheduler | DHCP Agent Scheduler |
| external-net | Neutron external network |
| empty-string-filtering | Empty String Filtering Extension |
| flavors | Neutron Service Flavors |
| net-mtu | Network MTU |
| availability_zone | Availability Zone |
| quotas | Quota management support |
| standard-attr-tag | Tag support for resources with standard attribute: subnet, trunk, network_segment_range, router, network, policy, subnetpool, port, security_group, floatingip |
| availability_zone_filter | Availability Zone Filter Extension |
| revision-if-match | If-Match constraints based on revision_number |
| filter-validation | Filter parameters validation |
| multi-provider | Multi Provider Network |
| quota_details | Quota details management support |
| address-scope | Address scope |
| agent-resources-synced | Agent's Resource View Synced to Placement |
| subnet-service-types | Subnet service types |
| port-mac-address-regenerate | Neutron Port MAC address regenerate |
| rbac-security-groups | Add security_group type to network RBAC |
| provider | Provider Network |
| service-type | Neutron Service Type Management |
| extra_dhcp_opt | Neutron Extra DHCP options |
| port-security-groups-filtering | Port filtering on security groups |
| standard-attr-timestamp | Resource timestamps |
| standard-attr-revisions | Resource revision numbers |
| pagination | Pagination support |
| sorting | Sorting support |
| security-group | security-group |
| rbac-policies | RBAC Policies |
| standard-attr-description | standard-attr-description |
| ip-substring-filtering | IP address substring filtering |
| port-security | Port Security |
| allowed-address-pairs | Allowed Address Pairs |
| project-id | project_id field enabled |
| binding-extended | Port Bindings Extended |
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
[root@controller ~]#
查看网络代理列表,以确认neutron代理成功创建。verify-option1:https://docs.openstack.org/neutron/train/install/verify-option1.htmlverify-option2:https://docs.openstack.org/neutron/train/install/verify-option2.html
openstack network agent list
正常情况下:(1)网络选项1:provider networks输出应指示控制器节点上的3个代理,每个计算节点上的1个代理.如果不是,需要检查计算节点配置:网卡名称,IP地址,端口,密码等要素。List agents to verify successful launch of the neutron agents:
控制节点结果:
[root@controller ~]# openstack network agent list
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| 0d7f4c1e-4b8a-4b3f-88fe-478e74695bc5 | Linux bridge agent | compute1 | None | :-) | UP | neutron-linuxbridge-agent |
| 1e45e41e-1342-49a0-981c-3fe3cf11ea18 | Linux bridge agent | controller | None | :-) | UP | neutron-linuxbridge-agent |
| 98270f7f-9c05-456e-b594-34cbddbac41d | Metadata agent | controller | None | :-) | UP | neutron-metadata-agent |
| d916a4a8-0524-4f84-a98f-43185797a187 | DHCP agent | controller | nova | :-) | UP | neutron-dhcp-agent |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
[root@controller ~]#
计算节点结果:
[root@compute1 ~]# openstack network agent list
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| 0d7f4c1e-4b8a-4b3f-88fe-478e74695bc5 | Linux bridge agent | compute1 | None | :-) | UP | neutron-linuxbridge-agent |
| 1e45e41e-1342-49a0-981c-3fe3cf11ea18 | Linux bridge agent | controller | None | :-) | UP | neutron-linuxbridge-agent |
| 98270f7f-9c05-456e-b594-34cbddbac41d | Metadata agent | controller | None | :-) | UP | neutron-metadata-agent |
| d916a4a8-0524-4f84-a98f-43185797a187 | DHCP agent | controller | nova | :-) | UP | neutron-dhcp-agent |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
[root@compute1 ~]#
(2)网络选项2:self-service networks输出应指示:控制节点上的4个代理,每个计算节点上的1个代理。如果不是,需要检查计算节点配置:网卡名称,IP地址,端口,密码等要素。List agents to verify successful launch of the neutron agents:
[root@controller ~]# openstack network agent list
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
| 06a85946-9af0-430d-af9a-2a00fad7edfd | Metadata agent | controller | None | :-) | UP | neutron-metadata-agent |
| 0b1abb8e-b67f-4926-af9c-6e18458407eb | DHCP agent | controller | nova | :-) | UP | neutron-dhcp-agent |
| 171038f0-1a73-4352-9283-732be5eb94de | Linux bridge agent | compute1 | None | XXX | UP | neutron-linuxbridge-agent |
| 398e080c-2f40-4a51-9750-afaef7e09c32 | Linux bridge agent | controller | None | :-) | UP | neutron-linuxbridge-agent |
| 4f0904d7-ae34-4b2c-823e-7b067fe86a4f | L3 agent | controller | nova | :-) | UP | neutron-l3-agent |
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
[root@controller ~]#
至此,neutron网络服务在控制节点、计算节点的部署完成。有新的计算节点加入时,需要将计算节点安装和控制节点验证都需要进行安装。
补充知识:
Neutron是 OpenStack项目中负责提供网络服务的组件,它基于软件定义网络的思想,实现了网络虚拟化下的资源管理。Neutron 的设计目标是实现“网络即服务(Networking as a Service)”,在设计上遵循了基于 SDN 实现网络虚拟化的原则,在实现上充分利用了 Linux 系统上的各种网络相关的技术。
二层交换Neutron支持多种虚拟交换机,一般使用Linux Bridge和Open vSwitch创建传统的VLAN网络,以及基于隧道技术的Overlay网络,如VxLAN和GRE(Linux Bridge 目前只支持 VxLAN)
三层路由Neutron从Juno版开始正式加入的DVR(Distributed Virtual Router)服务,它将原本集中在网络节点的部分服务分散到了计算节点上。可以通过namespace中使用ip route或者iptables实现路由或NAT,也可以通过openflow给OpenvSwitch下发流表来实现。
负载均衡LBaaS 支持多种负载均衡产品和方案,不同的实现以 Plugin 的形式集成到 Neutron,通过HAProxy来实现。
防火墙Neutron有两种方式来保障instance和网络的安全性,分别是安全组以及防火墙功能,均可以通过iptables来实现,前者是限制进出instance的网络包,后者是进出虚拟路由器的网络包。
LocalLocal网络,本地的一个Linux Bridge,除了虚拟机的虚拟网卡不连接其他的网络设备,实际场景很少使用,可以忽略。
FlatFlat网络,不带vlan tag的网络,相当于Local网络的Linux Bridge连接到一个物理网卡,该网络中的instance能与同网络的instance通信,且可以跨多个节点,实际场景也很少用到。
VLANVLAN网络,可以跨节点,目前是私有云网络应用较多。
VXLANVXLAN网络,是基于隧道技术的 overlay 网络,通过唯一的VNI区分于其他 vxlan 网络。vxlan中数据包通过VNI封装成UPD包进行传输,因为二层的包通过封装在三层传输,能够克服vlan和物理网络基础设施的限制。
GREGRE网络,与vxlan类似的一种overlay网络,使用IP包进行封装。
有什么吐槽或反馈意见,直接告诉我!
温馨提示:如出现二维码失效也可直接添加微信号:ysc13803862469。
原文作者:超哥的IT私房菜;如有侵权,请联系管理员删除。