云计算:OpenStack 分布式架构摆设(单控制节点与多计算节点)
目次一、实验
1.情况
2. 计算服务安装(计算节点2)
3. 网络服务安装(计算节点2)
一、实验
1.情况
(1) 主机
表1 主机
主机架构IP备注controller控制节点192.168.204.210已摆设compute01计算节点1192.168.204.211 已摆设compute02计算节点2192.168.204.212 (2)官网
OpenStack Docs: OpenStack Installation Guide for Red Hat Enterprise Linux and CentOS
(3)网络
①计算节点2 ping 控制节点
https://img-blog.csdnimg.cn/direct/73b4596b53f24eb3b461f3974b900231.png
②计算节点2 ping 计算节点1
https://img-blog.csdnimg.cn/direct/f15ba6079e84465da0a0e456fb277ffa.png
(4) 时间同步
① 计算节点2
# yum install -y chrony
https://img-blog.csdnimg.cn/direct/411ca299b1a6403cb17520c19616bcc4.pnghttps://img-blog.csdnimg.cn/direct/3f46a0cc7af3497d9c138ce44200ef5c.png
# vim /etc/chrony.conf
# systemctl restart chronyd.service && systemctl enable chronyd.service https://img-blog.csdnimg.cn/direct/fe9f0742b7e14869965ba19732c9a0de.pnghttps://img-blog.csdnimg.cn/direct/04418d52faeb47bfb5fdc8e5a0ab1b6c.pnghttps://img-blog.csdnimg.cn/direct/e8ed9ec6f4ac4601ac8dc1934e26ba85.png
③测试
# date
# date
# date
https://img-blog.csdnimg.cn/direct/acd2ca25bc4142f8b9c942980e6c7a67.png
https://img-blog.csdnimg.cn/direct/97f5d927401b47a5a1333acd4799d55f.png
https://img-blog.csdnimg.cn/direct/6495458184c64fbba9cd01d02623c083.png
(5) 控制节点查看(目前已摆设controller与compute01)
# neutron agent-list https://img-blog.csdnimg.cn/direct/a9437b74a6fb4b3ab8a19233934326e0.png
2. 计算服务安装(计算节点2)
(1)安装软件包
# yum install python-openstackclient.noarch openstack-selinux.noarch -y
# yum install openstack-nova-compute libvirt -y
# yum install openstack-utils.noarch -y
https://img-blog.csdnimg.cn/direct/ede5558b86bd464393da35d183015663.png
https://img-blog.csdnimg.cn/direct/6ff92582168b47c480ff647509ef4c3d.pnghttps://img-blog.csdnimg.cn/direct/37a9991c255c4d20b3fab99d22dff52b.pnghttps://img-blog.csdnimg.cn/direct/7774a7c414be4e9aac69771b86b7c424.pnghttps://img-blog.csdnimg.cn/direct/47b707409953489a824a8ada9ca9c53a.pnghttps://img-blog.csdnimg.cn/direct/5295e9b570da462c8ca21d44a0ffd5e2.png
(2)编辑/etc/nova/nova.conf
①在和 部分,配置RabbitMQ消息队列的毗连
...
rpc_backend = rabbit
...
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = RABBIT_PASS ② 在 和 部分,配置认证服务访问
...
auth_strategy = keystone
...
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 = nova
password = NOVA_PASS ③ 在 部分,配置 my_ip 选项
...
my_ip = 192.168.204.212 ④ 在 部分,使能 Networking 服务
...
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver ⑤ 在部分,启用并配置长途控制台访问
...
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://controller:6080/vnc_auto.html ⑥在 区域,配置镜像服务 API 的位置
...
api_servers = http://controller:9292 ⑦ 在 部分,配置锁路径
...
lock_path = /var/lib/nova/tmp ⑧ 备份修改https://img-blog.csdnimg.cn/direct/0e6ceadfeb7c4bc18553d85fde5b1ce9.png
https://img-blog.csdnimg.cn/direct/fcab5afcd7244a18add0ecf46abb39c1.pnghttps://img-blog.csdnimg.cn/direct/84edd6eeeabe4f769908af5039e02ec9.png
(3)完成安装
① 确定计算节点是否支持假造机的硬件加速
$ egrep -c '(vmx|svm)' /proc/cpuinfo https://img-blog.csdnimg.cn/direct/7e8b78cbdb104cd0ad04be7fdd875c33.png
(4)验证操作
3. 网络服务安装(计算节点2)
(1)安装组件
# yum install openstack-neutron-linuxbridge ebtables ipset https://img-blog.csdnimg.cn/direct/36883a3997234bc3a224f202c3fcba3b.pnghttps://img-blog.csdnimg.cn/direct/4afa1423773149a68b1260c07e1fcc71.png
(2)配置通用组件,编辑/etc/neutron/neutron.conf文件
①在部分,注释所有connection项,因为计算节点不直接访问数据库;
②在 和 部分,配置 RabbitMQ消息队列的毗连
...
rpc_backend = rabbit
...
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = RABBIT_PASS ③ 在 和 部分,配置认证服务访问(将 NEUTRON_PASS 更换为在认证服务中为 neutron 用户选择的密码)
...
auth_strategy = keystone
...
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 ④ 在 部分,配置锁路径
...
lock_path = /var/lib/neutron/tmp ⑤ 备份修改
https://img-blog.csdnimg.cn/direct/34a80de0e988414d84165ac2668cea5b.png
(3) 配置Linuxbridge代理,编辑/etc/neutron/plugins/ml2/linuxbridge_agent.ini
① 在部分,将公共假造网络和公共物理网络接口对应起来
physical_interface_mappings = provider:PROVIDER_INTERFACE_NAME ② 在部分,禁止VXLAN覆盖网络
enable_vxlan = False ③ 在 部分,启用安全组并配置 Linuxbridge iptables firewall driver
...
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver ④ 备份修改
https://img-blog.csdnimg.cn/direct/550b29408b0940be968ddaced3b8e9cb.png
(4)配置网络选项,编辑/etc/nova/nova.conf文件
①在部分,配置访问参数
...
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 https://img-blog.csdnimg.cn/direct/6fef12895ef94e5eaa0db68aa2e19abf.png
(5) 查看服务列表
# openstack compute service list https://img-blog.csdnimg.cn/direct/910fd494888c4b23bd52a40dfb13b16e.png
https://img-blog.csdnimg.cn/direct/a115aa51e47944178a461e7ebc663d50.png
(6)完成安装
①重启计算服务
# systemctl restart openstack-nova-compute.service ②启动Linuxbridge代理并配置它开机自启动
# systemctl enable neutron-linuxbridge-agent.service
# systemctl start neutron-linuxbridge-agent.service https://img-blog.csdnimg.cn/direct/caa368f7835a45e7b52adba5ba11eb8d.png
(7)控制节点查看(已新增compute02)
# neutron agent-list https://img-blog.csdnimg.cn/direct/a4dcbb80dbbc4059b352b81886f66042.png
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]