Apache Geode 在HTTP或HTTPS协议之上通过gfsh来管理远程集群

       你可以通过HTTP 或 HTTPS来连接到一个远程集群并且使用gfsh命令来管理这个集群。

       使用HTTP协议来连接gfsh到一个远程的GemFire集群:

1.运行gfsh。查看《启动gfsh》。

2.当在远程主机上启动一个远程的集群,你可以在启动你的jmx管理器(服务器或是定位器)时可选的指定--http-bind-address--http-service-port作为GemFire属性。这些属性可以在你从你本地系统连到远程集群的HTTP服务上时的url中使用。例如:

gfsh>start server --name=server1 --J=-Dgemfire.jmx-manager=true \
--J=-Dgemfire.jmx-manager-start=true -J=-Dgemfire.http-service-port=8080 \
--J=-Dgemfire.http-service-bind-address=myremotecluster.example.com

这个命令必须直接在主机上执行,最终将作为远程GemFire服务器主机的HTTP服务的远程管理。(你不能在远程运行 GemFire服务器。)

3. 在你本地系统,运行gfsh连接命令来连接到远程系统。包括了--use-http--url 参数。例如:

gfsh>connect --use-http=true --url="http://myremotecluster.example.com:8080/gemfire/v1"

Successfully connected to: GemFire Manager's HTTP service @ http://myremotecluster.example.com:8080/gemfire/v1

查看 《连接》

gfsh 已经连接到远程系统。 多数 gfsh命令将在远程系统上执行;尽管如此,也有些例外,如下的命令只在本地集群上执行:

    alter disk-store
    compact offline-disk-store
    describe offline-disk-store
    help
    hint
    sh (for executing OS commands)
    sleep
    start jconsole (however, you can connect JConsole to a remote cluster when gfsh is connected to the cluster via JMX)
    start jvisualvm
    start locator
    start server
    status locator*
    status server*
    stop locator*
    stop server*
    run (for executing gfsh scripts)
    validate disk-store
    version

 *当gfsh使用--name 选项为stop/status 命令,通过JMX 或 HTTP/S连接到集群时你可以停止和获取远程定位器和服务器的状态。如果你为这些命令使用--pid--dir选项,那么stop/status命令只会在本地被执行。

      为了给远程连接(https)配置SSL,在gemfire.propertiesgfsecurity-properties文件或在启动之前指定GemFire配置参数:

    http-service-ssl-enabled
    http-service-ssl-require-authentication
    http-service-ssl-protocols
    http-service-ssl-ciphers
    http-service-ssl-keystore
    http-service-ssl-keystore-password
    http-service-ssl-keystore-type
    http-service-ssl-truststore
    http-service-ssl-truststore-password

 查看《SSL》来获取这些参数的详细信息。

以上参数也适用于所有托管在配置JMX管理器的HTTP服务,它可以包括以下

  • 开发者REST应用接口服务
  • 脉冲监控工具

猜你喜欢

转载自bewithme.iteye.com/blog/2325388