最后
无论是哪家公司,都很重视基础,大厂更加重视技术的深度和广度,面试是一个双向选择的过程,不要抱着畏惧的心态去面试,不利于自己的发挥。同时看中的应该不止薪资,还要看你是不是真的喜欢这家公司,是不是能真的得到锻炼。
针对以上面试技术点,我在这里也做一些分享,希望能更好的帮助到大家。
| id | a7e4e7944d2f4223bd724fcc32678cae |
| name | neutron |
| username | neutron |
±---------±---------------------------------+
b.连接neutron用户到serivce租户和admin角色
[root@controller ~]# keystone user-role-add --user neutron --tenant service --role admin
c.创建neutron服务
[root@controller ~]# keystone service-create --name neutron --type network --description “Openstack Networking”
±------------±---------------------------------+
| Property | Value |
±------------±---------------------------------+
| description | Openstack Networking |
| enabled | True |
| id | 66e916b7b3264a48b0e4420ecd81423f |
| name | neutron |
| type | network |
±------------±---------------------------------+
d.创建neutron服务端点
[root@controller ~]# keystone endpoint-create --service-id $(keystone service-list |awk ‘/network/ {print $2}’) --publicurl http://controller.nice.com:9696 --adminurl http://controller.nice.com:9696 --internalurl http://controller.nice.com:9696 --region regionOne
±------------±---------------------------------+
| Property | Value |
±------------±---------------------------------+
| adminurl | http://controller.nice.com:9696 |
| id | e9fe74bbedd743458feba34cd64c8ef1 |
| internalurl | http://controller.nice.com:9696 |
| publicurl | http://controller.nice.com:9696 |
| region | regionOne |
| service_id | 66e916b7b3264a48b0e4420ecd81423f |
±------------±---------------------------------+
安装网络服务组件
[root@controller ~]# yum install openstack-neutron openstack-neutron-ml2 python-neutronclient which
[root@controller ~]# vim /etc/neutron/neutron.conf
[root@controller ~]# vim /etc/neutron/plugins/ml2/ml2_conf.ini
[root@controller ~]# vim /etc/nova/nova.conf
[root@controller ~]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
[root@controller ~]# su -s /bin/sh -c “neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade juno” neutron
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
INFO [alembic.migration] Running upgrade None -> havana, havana_initial
…
…
…
完成配置
1、为ML2插件配置文件创建连接文件。
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
2、初始化数据库
su-s /bin/sh-c “neutron-db-manage --config-file /etc/neutron/neutron.conf–config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade juno” neutron
3、重新启动计算服务
systemctl restart openstack-nova-api.service openstack-nova-scheduler.service openstack-nova-conductor.service
4、启动网络服务并配置开机自动启动# systemctlenable neutron-server.service# systemctlstart neutron-server.service
5、验证
[root@controller ~]# source admin-openrc.sh
列出加载的扩展模块,确认成功启动neutron-server进程。
[root@controller ~]# neutron ext-list
±----------------------±----------------------------------------------+
| alias | name |
±----------------------±----------------------------------------------+
| security-group | security-group |
| l3_agent_scheduler | L3 Agent Scheduler |
| ext-gw-mode | Neutron L3 Configurable external gateway mode |
| binding | Port Binding |
| provider | Provider Network |
| agent | agent |
| quotas | Quota management support |
| dhcp_agent_scheduler | DHCP Agent Scheduler |
| l3-ha | HA Router extension |
| multi-provider | Multi Provider Network |
| external-net | Neutron external network |
| router | Neutron L3 Router |
| allowed-address-pairs | Allowed Address Pairs |
| extraroute | Neutron Extra Route |
| extra_dhcp_opt | Neutron Extra DHCP opts |
| dvr | Distributed Virtual Router |
±----------------------±----------------------------------------------+
2、配置neutron节点
1、编辑/etc/sysctl.conf文件,包含下列参数:
net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
[root@network ~]# sysctl -p
net.ipv4.ip_forward = 1
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0
安装网络组件
yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch
编辑/etc/neutron/neutron.conf文件并完成下列操作:
a.编辑[database]小节,注释任何connection选项。因为network节点不能直接连接数据库。
b.编辑[DEFAULT]小节,配置RabbitMQ消息队列访问
[DEFAULT]
…
rpc_backend=rabbit
rabbit_host= controller.nice.com
rabbit_password= RABBIT_PASS
c.编辑[DEFAULT]和[keystone_authtoken]小节,配置认证服务访问:
[DEFAULT]
…
auth_strategy= keystone
[keystone_authtoken]
…
auth_uri= http://controller.nice.com:5000/v2.0
identity_uri= http://controller.nice.com:35357admin_tenant_name= service
admin_user= neutron
admin_password= NEUTRON_PASS
d.编辑[DEFAULT]小节,启用Modular Layer2(ML2)插件,路由服务和重叠IP地址功能:
[DEFAULT]
…
core_plugin= ml2
service_plugins= router
allow_overlapping_ips= True
e.(可选)在[DEFAULT]小节中配置详细日志输出。方便排错。
[DEFAULT]
…
verbose = True
ML2插件使用Open vSwitch(OVS)机制为虚拟机实例提供网络框架。编辑/etc/neutron/plugins/ml2/ml2_conf.ini文件并完成下列操作:
a.编辑[ml2]小节,启用flat和generic routing encapsulation (GRE)网络类型驱动,配置GRE租户网络和OVS驱动机制。
[ml2]
…
type_drivers= flat,gre
tenant_network_types= gre
mechanism_drivers= openvswitch
b.编辑[ml2_type_flat]小节,配置外部网络:[ml2_type_flat]
…
flat_networks= external
c.编辑[ml2_type_gre]小节,配置隧道标识范围:
[ml2_type_gre]
…
tunnel_id_ranges= 1:1000
d.编辑[securitygroup]小节,启用安全组,启用ipset并配置OVS防火墙驱动:
[securitygroup]
…
enable_security_group= True
enable_ipset= True
firewall_driver= neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
e.编辑[ovs]小节,配置Open vSwitch(OVS) 代理
[ovs]
…
local_ip= INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS
tunnel_type= gre
enable_tunneling= True
bridge_mappings= external:br-ex
[root@network ~]# systemctl enable openvswitch.service
ln -s ‘/usr/lib/systemd/system/openvswitch.service’ ‘/etc/systemd/system/multi-user.target.wants/openvswitch.service’
[root@network ~]# systemctl start openvswitch.service
[root@network ~]# ovs-vsctl add-br br-ex
[root@network ~]# ovs-vsctl add-port br-ex eno50332184
[root@network ~]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
[root@network ~]# cp/usr/lib/systemd/system/neutron-openvswitch-agent.service/usr/lib/systemd/system/neutron-openvswitch-agent.service.orig
-bash: cp/usr/lib/systemd/system/neutron-openvswitch-agent.service/usr/lib/systemd/system/neutron-openvswitch-agent.service.orig: No such file or directory
[root@network ~]# cp /usr/lib/systemd/system/neutron-openvswitch-agent.service /usr/lib/systemd/system/neutron-openvswitch-agent.service.orig
[root@network ~]# sed -i ‘s,plugins/openvswitch/ovs_neutron_plugin.ini,plugin.ini,g’ /usr/lib/systemd/system/neutron-openvswitch-agent.service
[root@network ~]# systemctl enable neutron-openvswitch-agent.service neutron-l3-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service neutron-ovs-cleanup.service
ln -s ‘/usr/lib/systemd/system/neutron-openvswitch-agent.service’ ‘/etc/systemd/system/multi-user.target.wants/neutron-openvswitch-agent.service’
ln -s ‘/usr/lib/systemd/system/neutron-l3-agent.service’ ‘/etc/systemd/system/multi-user.target.wants/neutron-l3-agent.service’
ln -s ‘/usr/lib/systemd/system/neutron-dhcp-agent.service’ ‘/etc/systemd/system/multi-user.target.wants/neutron-dhcp-agent.service’
ln -s ‘/usr/lib/systemd/system/neutron-metadata-agent.service’ ‘/etc/systemd/system/multi-user.target.wants/neutron-metadata-agent.service’
ln -s ‘/usr/lib/systemd/system/neutron-ovs-cleanup.service’ ‘/etc/systemd/system/multi-user.target.wants/neutron-ovs-cleanup.service’
[root@network ~]# systemctl start neutron-openvswitch-agent.service neutron-l3-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service
3、配置compute节点
4、验证安装
[root@controller ~]# neutron net-create ext-net --shared --router:external True --provider:physical_network external --provider:network_type flat
Created a new network:
±--------------------------±-------------------------------------+
最后
面试是跳槽涨薪最直接有效的方式,马上金九银十来了,各位做好面试造飞机,工作拧螺丝的准备了吗?
掌握了这些知识点,面试时在候选人中又可以夺目不少,暴击9999点。机会都是留给有准备的人,只有充足的准备,才可能让自己可以在候选人中脱颖而出。
--------------+
最后
面试是跳槽涨薪最直接有效的方式,马上金九银十来了,各位做好面试造飞机,工作拧螺丝的准备了吗?
掌握了这些知识点,面试时在候选人中又可以夺目不少,暴击9999点。机会都是留给有准备的人,只有充足的准备,才可能让自己可以在候选人中脱颖而出。
[外链图片转存中…(img-Ff5HryIT-1715321752802)]
[外链图片转存中…(img-r1tIFe5L-1715321752802)]