管理集群访问
创建集群时,必须启用或禁用 Auto-Manage Cluster Access。若您为共享状态选择 Personal Cluster,Cloud Center 将自动选择 Auto-Manage Cluster Access。若您选择 Shareable Cluster,Cloud Center 将自动取消选择 Auto-Manage Cluster Access。您可以在选择 Personal Cluster 或 Shareable Cluster 后,或在创建集群后的任何时间,覆盖这些默认设置并手动设置集群访问的自动管理。
自动管理集群访问
创建集群时,您可以通过指定的默认 IP 地址范围访问该集群。
若启用 Auto-Manage Cluster Access,Cloud Center 将管理集群的入站防火墙规则,并自动更新这些规则以允许终端用户的当前公共 IP 地址。这些规则允许 MATLAB® 或 MATLAB Online™ 向集群提交作业并与之交互。启用 Auto-Manage Cluster Access 仅为 MATLAB Parallel Server™ 打开所需端口,端口数量取决于创建集群时指定的 Workers per Machine 数量。
注意
若您限制了客户端机器对远程端口的访问权限,请确保遵循客户端访问的服务器套接字中的步骤,以启用客户端机器向集群的出站访问。
您可以随时启用或禁用自动管理集群访问功能。
在集群运行时启用自动管理集群访问功能将立即生效,用户可通过运行
parcluster(Parallel Computing Toolbox) 访问该集群。在集群运行期间禁用自动管理集群访问功能,不会阻止先前已通过防火墙访问的用户通过活动或现有连接与集群交互(例如,那些已对集群配置文件运行
parcluster(Parallel Computing Toolbox)命令且尚未退出 MATLAB 程序的用户)。在移除访问权限后,请停止并重启集群,以确保所有活动连接均已关闭。
手动管理集群访问权限
要手动管理集群访问权限,请在 Cloud Center 点击您的集群以打开云资源配置页面。您的集群必须处于运行状态或已停止状态。

You can manage IP and access ports to your cloud resource in the Access Ports and IP section. The default IP access and ports are set based on the Default IP Address range provided when the resource was created. Cloud Center automatically adds a new access port when you open MATLAB in a web browser or download a remote desktop file. To manually add new access ports, click Add New Access and complete the relevant details. To delete an IP access and port combination, click Delete Access.
注意
When you stop a cluster and restart it again, the access rules do not persist. You must manually add the access rules again. By default, you can only access the cluster from the default IP address range that you specify when you restart the cluster.
客户端访问的服务器套接字
MATLAB Parallel Server 和 Cloud Center 要求客户端联系监听云内特定套接字的服务器。若您限制客户端机器访问远程端口,请确保允许访问以下远程端口以实现与集群资源的通信。
| TCP 端口 | 用法 |
|---|---|
| 443 | 通过 Web 访问 Cloud Center、在线许可及 Amazon® Web Services |
| 22 | 通过 SSH 访问集群节点 |
请确保允许访问以下额外的远程端口(N 是整个集群中任意单个节点上最多可支持的工作单元数)。
| TCP 端口 | 用法 |
|---|---|
27350 to 27358+4*N | 访问头节点上的 MATLAB 作业调度程序以及工作节点上的交互式并行池工作单元。根据 N(整个集群中任意单个节点上的最大工作单元数)计算所需端口数量。 |
此外,同一云集群内的机器之间,所有端口均开放通信。