附录 B. 在独立的机器中安装 Websocket 代理
websocket 代理和 noVNC 只是一个技术预览功能。技术预览功能不被红帽产品服务级别协议(SLA)支持,且可能无法完成。红帽不建议在生产环境中使用它们。这些技术预览功能可以使用户提早试用新的功能,并有机会在开发阶段提供反馈意见。如需更多信息,请参阅红帽技术预览功能支持范围。
websocket 代理允许用户通过 noVNC 控制台连接到虚拟机。noVNC 客户端使用 websocket 传递 VNC 数据。但是,QEMU 中的 VNC 服务器不提供 websocket 支持,因此必须在客户端和 VNC 服务器之间放置 websocket 代理。代理可以在任何可访问网络的机器中运行,包括 Manager 机器。
出于安全性和性能的原因,用户可能希望在单独的计算机上配置 websocket 代理。
流程
安装 websocket 代理:
yum install ovirt-engine-websocket-proxy
# yum install ovirt-engine-websocket-proxy
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 运行
engine-setup
命令以配置 websocket 代理。engine-setup
# engine-setup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意如果也安装了
rhvm
软件包,则在要求在此主机上配置管理器(Engine
)时,请选择No
。按
Enter
键,允许engine-setup
在机器上配置 websocket 代理服务器。Configure WebSocket Proxy on this machine? (Yes, No) [Yes]:
Configure WebSocket Proxy on this machine? (Yes, No) [Yes]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 按
Enter
接受自动检测到的主机名,或者输入备用主机名,然后按Enter
键。请注意,如果您使用虚拟主机,则自动检测主机名可能不正确:Host fully qualified DNS name of this server [host.example.com]:
Host fully qualified DNS name of this server [host.example.com]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 按
Enter
键允许engine-setup
配置防火墙并打开外部通信所需的端口。如果不允许engine-setup
修改防火墙配置,则必须手动打开所需端口。Setup can automatically configure the firewall on this system. Note: automatic configuration of the firewall may overwrite current settings. Do you want Setup to configure the firewall? (Yes, No) [Yes]:
Setup can automatically configure the firewall on this system. Note: automatic configuration of the firewall may overwrite current settings. Do you want Setup to configure the firewall? (Yes, No) [Yes]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 输入 Manager 机器的 FQDN,然后按
Enter
键。Host fully qualified DNS name of the engine server []: manager.example.com
Host fully qualified DNS name of the engine server []: manager.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 按
Enter
键,允许engine-setup
在 Manager 机器上执行操作,或按2
以手动执行操作。Setup will need to do some actions on the remote engine server. Either automatically, using ssh as root to access it, or you will be prompted to manually perform each such action. Please choose one of the following: 1 - Access remote engine server using ssh as root 2 - Perform each action manually, use files to copy content around (1, 2) [1]:
Setup will need to do some actions on the remote engine server. Either automatically, using ssh as root to access it, or you will be prompted to manually perform each such action. Please choose one of the following: 1 - Access remote engine server using ssh as root 2 - Perform each action manually, use files to copy content around (1, 2) [1]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 按
Enter
接受默认的 SSH 端口号,或者输入 Manager 机器的端口号。ssh port on remote engine server [22]:
ssh port on remote engine server [22]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 输入 root 密码以登录到 Manager 计算机,然后按
Enter
键。root password on remote engine server engine_host.example.com:
root password on remote engine server engine_host.example.com:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
选择是否查看 iptables 规则与当前设置不同。
Generated iptables rules are different from current ones. Do you want to review them? (Yes, No) [No]:
Generated iptables rules are different from current ones. Do you want to review them? (Yes, No) [No]:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 按
Enter
键确认配置设置。Copy to Clipboard Copied! Toggle word wrap Toggle overflow 提供了相应的说明,将 Manager 计算机配置为使用配置的 websocket 代理。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 登录 Manager 机器并执行提供的说明。
engine-config -s WebSocketProxy=host.example.com:6100 systemctl restart ovirt-engine.service
# engine-config -s WebSocketProxy=host.example.com:6100 # systemctl restart ovirt-engine.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow