第 6 章 为 Microsoft Azure 配置 JBoss EAP
在 Red Hat Enterprise Linux 上引导时启动 JBoss EAP 作为服务
如果您要在 Microsoft Azure 中将 JBoss EAP 作为红帽企业 Linux 上的服务启动,您必须更改 JBoss EAP 服务的以下配置,以确保它在 Azure 虚拟机主机名初始化后启动。
打开 /etc/systemd/system/multi-user.target.wants/eap7-standalone.service,并添加对 waagent.service 的依赖:
替换下面这一行:
After=syslog.target network.target
使用:
After=syslog.target network.target waagent.service
Requires=waagent.service
使用 mod_cluster 进行负载平衡
由于 Azure 不支持 mod_cluster 公告,因此如果您要配置 JBoss EAP 负载平衡环境,您必须确保所有平衡器和工作程序都绑定到内部 Microsoft Azure 虚拟网络上可访问的 IP 地址。
负载均衡器和 worker 必须绑定到实际的内部 Azure 虚拟 IP 地址,如 172.28.0.2,而不是 0.0.0.0。
此外,由于 mod_cluster 广告不可用,如果您将 JBoss EAP 用作 Undertow mod_cluster 代理负载均衡器,您必须将每个 worker 节点配置为使用包含每个平衡器 IP 地址和端口的代理列表,如下所示:
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=proxy-one:add(host="BALANCER_IP_ADDRESS", port="BALANCER_PORT")
/subsystem=modcluster/mod-cluster-config=configuration:list-add(name=proxies,value=proxy-one)
ActiveMQ Artemis High Availability
Microsoft Azure 不支持使用 Artemis 共享存储的 JBoss EAP 消息传递高可用性。要在 Azure 中配置 JBoss EAP 消息传递高可用性,您必须利用 TCP JGroups 堆栈使用带有 AZURE_PING JGroups 发现协议的复制日志。有关使用复制日志的更多信息,请参阅为 JBoss EAP 配置消息传递 https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.3/html-single/configuring_messaging/#data_replication 中的数据复制。
在使用 AZURE_PING 配置 TCP JGroups 堆栈后,您必须在 messaging- activemq 子系统中将 JGroups 堆栈添加到 配置中。详情请参阅为 JBoss EAP 配置消息传递中的 https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.3/html-single/configuring_messaging/#server_discovery 服务器发现。
clusterdiscovery-group 和 broadcast -group jgroups-