要获得真正具有高可用性的 ArcGIS Server 站点,您必须在具有高可用性的共享位置中存储 ArcGIS Server 配置存储和目录。 您可以将 Amazon Simple Storage Service (S3)、Amazon DynamoDB 和 Amazon Simple Queue Service (SQS) 用于配制存储和目录。
您需要 Amazon Web Services (AWS) 账户,还需要账户的访问密钥和保密密钥或带有合适 IAM 策略的预定义 IAM 角色来完成以下工作流,以便配置高可用性 ArcGIS Server 站点。
在此工作流中,您将启动两个 Amazon Elastic Compute Cloud (EC2) 实例以用于 ArcGIS Server 站点。 配置存储和共享目录将存储在 S3、DynamoDB 和 SQS 上。
- 登录 AWS Management Console 并启动两个 EC2 实例。
有关详细信息,请参阅启动运行 ArcGIS Server 的 EC2 实例。
如果您启动了 Amazon Virtual Private Cloud (VPC) 中的实例,请务必进行以下操作:
- 配置子网以自动分配公共 IP 地址。
有关详细信息,请参阅 AWS VPC IP 地址文档。
- 打开您将与实例配合使用的安全组中的端口 6443。
- 配置子网以自动分配公共 IP 地址。
- 连接到实例,然后在这些实例上安装 ArcGIS Server。
有关连接到 EC2 实例的说明,请参阅 AWS 帮助。
- 请勿从 ArcGIS Server Manager 创建 ArcGIS Server 站点,请打开第一个 EC2 实例的 ArcGIS Server 管理员目录 URL (https://<public DNS>:6443/arcgis/admin),然后单击 createNewSite。
- 在主管理员名称和密码字段中相应地提供 ArcGIS Server 主站点管理员的用户名和密码。
- 将以下内容之一复制到配置原生配置 (JSON) 字段,然后将变量信息替换为特定于账户和实施的信息。
- 如果配置了 IAM 角色,请将以下内容复制到配置原生配置 (JSON):
[ { "name": "AWS", "namespace": "<namespace>", "region": "<AWS region>", "credential": { "type": "IAM-ROLE" }, "cloudServices": [ { "name": "AWS S3", "type": "objectStore", "usage": "DEFAULT", "connection": { "bucketName": "<Name of S3 bucket>", "regionEndpointUrl": "<Regional endpoint URL>", "rootDir": "<root directory>" }, "category": "storage" }, { "name": "Amazon Dynamo DB", "type": "tableStore", "connection":{ "regionEndpointUrl": "<your regional Endpoint URL>" }, "category": "storage" }, { "name": "Amazon Queue Service", "type": "queueService", "connection":{ "regionEndpointUrl": "<regional Endpoint URL>" }, "category": "queue" } ], "cloudServiceTags":[ {"<Your key name 1>": "tag value"}, {"<Your key name 2>": "tag value"}, {"<Your key name 3>": "tag value"} ] } ] - 如果没有配置 IAM 角色,请将以下内容复制到配置原生配置 (JSON):
[ { "name": "AWS", "namespace": "<namespace>", "region": "<AWS region>", "credential": { "type": "ACCESS-KEY", "secret": { "accessKey": "<your access key>", "secretKey": "<your secret key>" }, "cloudServices": [ { "name": "AWS S3", "type": "objectStore", "usage": "DEFAULT", "connection": { "bucketName": "<Name of S3 bucket>", "regionEndpointUrl": "<Regional endpoint URL>", "rootDir": "<root directory>" }, "category": "storage" }, { "name": "Amazon Dynamo DB", "type": "tableStore", "connection":{ "regionEndpointUrl": "<your regional Endpoint URL>" }, "category": "storage" }, { "name": "Amazon Queue Service", "type": "queueService", "connection":{ "regionEndpointUrl": "<regional Endpoint URL>" }, "category": "queue" } ], "cloudServiceTags":[ {"<Your key name 1>": "tag value"}, {"<Your key name 2>": "tag value"}, {"<Your key name 3>": "tag value"} ] } ]
存储段所使用的命名空间必须对此 ArcGIS Server 站点唯一。
为了实现最佳性能,您所指定的 AWS 区域应该与 ArcGIS Server 站点中包含的所有实例一致。
提示:
例如每种类型的 physicalPath 的值,请参阅 ArcGIS REST API 帮助中的创建站点的“使用示例”部分。
您不需要提供服务器目录 (JSON) 和配置存储 (JSON) 字段的值。
- 如果配置了 IAM 角色,请将以下内容复制到配置原生配置 (JSON):
- 还可将以下内容复制到日志设置 (JSON) 字段,然后根据需要替换实例的值。
如果不指定日志信息,ArcGIS 会使用默认的日志级别(警告)、目录(Windows 实例为 C:\\arcgisserver\\logs\\;Ubuntu 实例为 /arcgis/server/usr/logs)、最大存储日志文件数 (10) 以及最大存储日志文件天数 (90)。
注:
在 JSON 中,反斜杠字符 (\) 为转义字符。 要提供包含反斜杠的文本(例如在 Windows 目录路径中),您必须使用两个反斜杠。
{ "logLevel": "<DEBUG | VERBOSE | FINE | INFO | WARNING | SEVERE>", "logDir": "<directory>", "maxErrorReportsCount": 10, "maxLogFileAge": 90 }在以下示例中,将在 ArcGIS Server 计算机上的日志文件夹中创建多达 25 个调试日志文件,并且日志文件将保留 30 天。
{ "logLevel": "DEBUG", "logDir": "C:\\arcgisserver\\logs\\", "maxErrorReportsCount": 25, "maxLogFileAge": 30 } - 要使用默认集群,请将集群 (JSON) 字段留空。
- 单击创建。
- 创建 ArcGIS Server 站点后,请返回 AWS Management Console 并验证 S3 存储段、DynamoDB 表和 SQS 队列是否存在。
注:
在此版本中,ArcGIS Enterprise 不支持 Amazon S3 目录存储段。
- 单击服务 > 存储和内容传递 > S3,然后验证 S3 存储段是否包含服务和配置存储文件夹。
- 单击服务 > 数据库 > Dynamo DB,然后验证以下项目是否存在:
- ArcGISConfigStore<namespace>
- ArcGISConfigStores
- ArcGISGP<namespace>
- ArcGISLocks<namespace>
- ArcGISResources
- 单击服务 > 应用集成 > 简单队列服务,然后验证队列是否存在。
队列名称的格式为 ArcGIS-GP-<namespace>-<uniqueid>.fifo。
- 为第二个 AWS 实例打开 ArcGIS Server Manager。
URL 是 https://<public DNS>:6443/arcgis/manager。
- 完成以下步骤以将此第二个 AWS 实例连接到 ArcGIS Server 站点:
- 单击加入现有站点。
- 提供您在第一个实例中创建的 ArcGIS Server 站点的 URL。
- 提供您在第一个实例中创建的主站点管理员用户名和密码。
现在您即拥有了高可用性 ArcGIS Server 站点,该站点包含两台在 S3、DynamoDB 和 SQS 上存储配置存储和共享目录的计算机。