// Add steps as necessary for accessing the software, post-configuration, and testing. Don’t include full usage instructions for your software, but add links to your product documentation for that information. //Should any sections not be applicable, remove them === 登录 Apache RocketMQ NameServer 或 Broker 服务器节点 . 添加 PEM 密钥对。 例如: [source,bash] -- ssh-add -k /Users/username/tmp/rocketmqXXX.pem -- [start=2] . 登录堡垒主机。 [source,bash] -- ssh -A ec2-user@ecXXXXXXXX.cn-north-1.compute.amazonaws.com.cn -- :xrefstyle: short [start=3] . 从 Amazon EC2 控制台获取 IP 地址。 .. 在浏览器中打开 https://console.aws.amazon.com/ec2/[Amazon EC2 console]. .. 在EC2的控制台*实例*窗口, 选择指定的实例. 请注意 *Description* 选项卡中的 *Private IPs*,如 <>. [#IPaddress] [link=images/NameServerIPAddress.png] .EC2 instance private IP address image::../images/NameServerIPAddress.png[NameServerAddress,width=75%,height=75%] [start=4] . 从堡垒主机,登录到具有 IP 地址的节点。 例如: + [source,bash] ---- (ec2-user@ip-10-0-136-135) $ ssh 10.0.6.235 Last login: Wed Jan 6 04:55:01 2021 from ip-10-0-136-135.cn-north-1.compute.internal __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ [ec2-user@ip-10-0-6-235 ~]$ ---- + [start=5] . 登录节点后,您可以使用 https://rocketmq.apache.org/docs/cli-admin-tool/[Apache RocketMQ 命令行工具] 来查询、管理和诊断问题。 === 在浏览器中查看 Apache RocketMQ Web 控制台 默认部署在Name Server上安装 Apache RocketMQ Web 控制台。 但是,由于Apache Name Server运行在私有子网中运行,因此无法通过浏览器直接访问它们。要访问Name Server的私有IP地址的8080端口,请配置与堡垒主机SSH隧道的SSH连接。 然后使用SSH隧道访问Web控制台。 [#step1] . 使用 SSH 和以下命令建立与堡垒主机的连接。 用您的参数替换 `_port number_`、`_key pair.pem_`、`_user name_` 和 `_host name_`。 + `ssh -qTfnN -D _port number_ -i "_key pair.pem_" _user name_@_host name_` + 例如: + `ssh -qTfnN -D 40011 -i "rocketMQ.pem" \ec2-user@ec2-54-223-36-247.cn-north-1.compute.amazonaws.com.cn` . 在浏览器中设置代理管理器。 有许多可用的代理管理器插件。 本文使用SwitchyOmega。 .. 安装 SwitchyOmega 插件 ** https://microsoftedge.microsoft.com/addons/detail/proxy-switchyomega/fdbloeknjpnloaggplaobopplkdhnikc?hl=en-US[Microsoft Edge] ** https://addons.mozilla.org/en-US/firefox/addon/switchyomega/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search[Firefox] ** https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif?hl=en-US[Google Chrome] + .. 打开 SwitchyOmega 选项页面,然后在左侧边栏中选择 *New Profile*。 + :xrefstyle: short [#addprofile] [link=images/SwitchyOmega1.png] .添加新的 SwitchyOmega 配置 image::../images/switchyOmega1.png[SwitchyOmega,width=50%,height=50%] + [start=3] .. 输入名称并选择*创建*。 + :xrefstyle: short [#profilename] [link=images/SwitchyOmega2.png] .配置名称 image::../images/switchyOmega2.png[SwitchyOmega,width=50%,height=50%] + [start=4] :xrefstyle: short .. Enter the *Protocol*, *Server*, and *Port* for proxy server. The port should be the local port where you set up the SSH tunnel in link:#_step1[step 1]. .. 为代理服务器输入 *Protocol*、*Server* 和 *Port*。 该端口应该是您在链接中设置 SSH 隧道的本地端口 link:#_step1[step 1]。 + [#proxyserverinfo] [link=images/proxyserverinfo.png] .代理服务器 image::../images/proxyserverinfo.png[SwitchyOmega,width=50%,height=50%] + [start=5] .. Select *Apply Changes*. .. 通过浏览器的扩展图标访问 SwitchyOmega。 在代理列表中选择您创建的配置文件。 浏览器将通过本地端口 40011 代理将所有流量发送到堡垒主机。 + :xrefstyle: short [#proxylist] [link=images/SwitchyOmega4.png] .代理列表 image::../images/switchyOmega4.png[SwitchyOmega,width=50%,height=50%] + [start=3] . 要在浏览器中查看 Apache RocketMQ Web 控制台,请导航到 `\http://10.0.xx.xx:8080`。 将 `xx.xx` 替换为名称服务器的私有 IP 地址。 您可以在 EC2 控制台中找到Name Server的私有 IP 地址。 + :xrefstyle: short [#ec2console] [link=images/ec2.png] .EC2 控制台中 Apache RocketMQ Name Server的私有 IP 地址 image::../images/ec2.png[ec2,width=90%,height=90%] + :xrefstyle: short <> 显示了 Apache RocketMQ Web 控制台中的 Apache RocketMQ 集群示例。 + [#webconsole] [link=images/ec2.png] .Apache RocketMQ web控制台 image::../images/rocketMQConsole.png[console,width=90%,height=90%] === Apache RocketMQ 集群相关资源 ==== NameServer 节点 * Apache RocketMQ 部署目录: `/home/ec2-user/rocketmq-deploy` * Apache RocketMQ 安装目录: `/home/ec2-user/rocketmq-deploy/rocketmq-all-4.7.1-bin-release` or `/home/ec2-user/rocketmq-deploy/rocketmq-all-4.8.0-bin-release` or `/home/ec2-user/rocketmq-deploy/rocketmq-all-4.9.2` * 安装脚本对应的日志文件用于定位安装过程中遇到的问题: `/home/ec2-user/rocketmq-deploy/install.log` * Apache RocketMQ web控制台jar包文件所在位置: `/home/ec2-user/rocketmq-deploy/rocketmq-console-ng-1.0.0.jar` ==== Broker server 节点 * Apache RocketMQ 部署目录: `/home/ec2-user/rocketmq-deploy` * Apache RocketMQ 安装目录: `/home/ec2-user/rocketmq-deploy/rocketmq-all-4.7.1-bin-release` or `/home/ec2-user/rocketmq-deploy/rocketmq-all-4.8.0-bin-release` or `/home/ec2-user/rocketmq-deploy/rocketmq-all-4.9.2` * 安装脚本对应的日志文件用于定位安装过程中遇到的问题: `/home/ec2-user/rocketmq-deploy/install.log` * RocketMQ配置文件所在目录: `/home/ec2-user/rocketmq-deploy/rocketMQ-config/` * Apache RocketMQ 本地文件存储目录 : `/home/ec2-user/rocketmq-deploy/rmqstore` == {partner-product-short-name} on AWS 最佳实践 // Provide post-deployment best practices for using the technology on AWS, including considerations such as migrating data, backups, ensuring high performance, high availability, etc. Link to software documentation for detailed information. * https://rocketmq.apache.org/docs/best-practice-namesvr/[Best Practice for NameServer] * https://rocketmq.apache.org/docs/best-practice-broker/[Best Practice for Broker] * https://rocketmq.apache.org/docs/best-practice-producer/[Best Practice for Producer] * https://rocketmq.apache.org/docs/best-practice-consumer/[Best Practice for Consumer]