10.4. 在 Microsoft Azure 中启动 JBoss EAP 高可用性
要使用 Microsoft Azure 中的高可用性启动 JBoss EAP,您必须:
- 使用配置了 AZURE_PING 发现协议 的配置文件,并指定 Microsoft Azure 存储帐户和 blob 容器所需的值。
将
私有接口绑定到用于集群流量的 Microsoft Azure 内部 IP 地址。您可以在启动时执行此操作,或者作为 JBoss EAP 配置指南中的设置配置。警告为了安全起见,您必须确保不向不需要的网络公开集群流量。
为此,您可以限制端点到 Microsoft Azure 虚拟网络,或为集群流量创建专用的虚拟网络和专用虚拟机 NIC。
流程
使用以下命令启动 JBoss EAP 高可用性实例。如果您在配置文件中存储 Microsoft Azure 存储帐户和 blob 容器值,您可以省略
-Djboss.jgroups.azure_ping系统属性定义。EAP_HOME/bin/standalone.sh -b <IP_ADDRESS> -bprivate <IP_ADDRESS> --server-config=<EAP_CONFIG_FILE>.xml -Djboss.jgroups.azure_ping.storage_account_name=<STORAGE_ACCOUNT_NAME> -Djboss.jgroups.azure_ping.storage_access_key=<STORAGE_ACCESS_KEY> -Djboss.jgroups.azure_ping.container=<CONTAINER_NAME>
EAP_HOME/bin/standalone.sh -b <IP_ADDRESS> -bprivate <IP_ADDRESS> --server-config=<EAP_CONFIG_FILE>.xml -Djboss.jgroups.azure_ping.storage_account_name=<STORAGE_ACCOUNT_NAME> -Djboss.jgroups.azure_ping.storage_access_key=<STORAGE_ACCESS_KEY> -Djboss.jgroups.azure_ping.container=<CONTAINER_NAME>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例如:
EAP_HOME/bin/standalone.sh -b 172.28.0.2 -bprivate 172.28.0.2 --server-config=standalone-azure-ha.xml -Djboss.jgroups.azure_ping.storage_account_name=my_storage_account -Djboss.jgroups.azure_ping.storage_access_key=y7+2x7P68pQse9MNh58Bkk5po9OGzeJc+0IRqYcQ9Cr/Sp4xiUFJVlbY+MGXJRNx3syksikwm4tOYlFgjvoCmw== -Djboss.jgroups.azure_ping.container=my_blob_container
EAP_HOME/bin/standalone.sh -b 172.28.0.2 -bprivate 172.28.0.2 --server-config=standalone-azure-ha.xml -Djboss.jgroups.azure_ping.storage_account_name=my_storage_account -Djboss.jgroups.azure_ping.storage_access_key=y7+2x7P68pQse9MNh58Bkk5po9OGzeJc+0IRqYcQ9Cr/Sp4xiUFJVlbY+MGXJRNx3syksikwm4tOYlFgjvoCmw== -Djboss.jgroups.azure_ping.container=my_blob_containerCopy to Clipboard Copied! Toggle word wrap Toggle overflow 注意由于 JBoss EAP 子系统仅在需要时启动,您必须将 distributable 应用部署到 JBoss EAP 服务器中,以启动高可用性 JBoss EAP 子系统。
在集群中启动第二个 JBoss EAP 实例后,您应该在集群中的第一个服务器控制台日志中看到类似如下的日志:
INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-2,ee,eap-server-1) ISPN000094: Received new cluster view for channel server: [eap-server-1|1] (2) [eap-server-1, eap-server-2]
INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-2,ee,eap-server-1) ISPN000094: Received new cluster view for channel server: [eap-server-1|1] (2) [eap-server-1, eap-server-2]