加载中

从 Elastic Cloud Hosted 中的旧版跨集群搜索部署模板迁移

旧版跨集群搜索部署模板已从 Elastic Cloud 控制台中移除。您不再需要专用的模板来进行跨部署搜索。相反,您现在可以使用任何模板来 配置远程集群 并对其进行跨集群搜索。使用此模板创建的现有部署不受影响,但在升级到 Elastic Stack 8.x 之前,它们必须迁移到其他模板。

有两种不同的方法来进行此迁移

您可以使用 PUT 请求来更新您的部署,同时更改部署模板 ID 和新模板所需的实例。

  1. 首先,选择您要使用的新模板并获取其 ID。可以从 Elastic Cloud 控制台Create Deployment 页面中获取此模板 ID,具体方法是选择 Equivalent API request 并检查结果中的 deployment_template 字段。例如,我们将使用“Storage optimized”部署模板,在我们的 GCP 区域中,其 id 是 gcp-storage-optimized-v5

    您还可以在 每个区域可用的模板列表 中找到该模板。

    Deployment Template ID
  2. 发起请求以通过以下两项更改来更新您的部署:

    1. deployment_template 下,将 id 设置为在上一步中获取的值。
    2. 更改集群拓扑以匹配您的部署将要迁移到的新模板。
    curl -H 'Content-Type: application/json' -X PUT -H "Authorization: ApiKey $EC_API_KEY" https://api.elastic-cloud.com/api/v1/deployments/$DEPLOYMENT_ID -d "{
      "resources": {
        "integrations_server": [
          {
            "elasticsearch_cluster_ref_id": "main-elasticsearch",
            "region": "gcp-us-central1",
            "plan": {
              "cluster_topology": [
                {
                  "instance_configuration_id": "gcp.integrationsserver.n2.68x32x45.2",
                  "zone_count": 1,
                  "size": {
                    "resource": "memory",
                    "value": 1024
                  }
                }
              ],
              "integrations_server": {
                "version": "8.7.1"
              }
            },
            "ref_id": "main-integrations_server"
          }
        ],
        "elasticsearch": [
          {
            "region": "gcp-us-central1",
            "settings": {
              "dedicated_masters_threshold": 6
            },
            "plan": {
              "cluster_topology": [
                {
                  "zone_count": 2,
                  "elasticsearch": {
                    "node_attributes": {
                      "data": "hot"
                    }
                  },
                  "instance_configuration_id": "gcp.es.datahot.n2.68x10x45",
                  "node_roles": [
                    "master",
                    "ingest",
                    "transform",
                    "data_hot",
                    "remote_cluster_client",
                    "data_content"
                  ],
                  "id": "hot_content",
                  "size": {
                    "resource": "memory",
                    "value": 8192
                  }
                },
                {
                  "zone_count": 2,
                  "elasticsearch": {
                    "node_attributes": {
                      "data": "warm"
                    }
                  },
                  "instance_configuration_id": "gcp.es.datawarm.n2.68x10x190",
                  "node_roles": [
                    "data_warm",
                    "remote_cluster_client"
                  ],
                  "id": "warm",
                  "size": {
                    "resource": "memory",
                    "value": 0
                  }
                },
                {
                  "zone_count": 1,
                  "elasticsearch": {
                    "node_attributes": {
                      "data": "cold"
                    }
                  },
                  "instance_configuration_id": "gcp.es.datacold.n2.68x10x190",
                  "node_roles": [
                    "data_cold",
                    "remote_cluster_client"
                  ],
                  "id": "cold",
                  "size": {
                    "resource": "memory",
                    "value": 0
                  }
                },
                {
                  "zone_count": 1,
                  "elasticsearch": {
                    "node_attributes": {
                      "data": "frozen"
                    }
                  },
                  "instance_configuration_id": "gcp.es.datafrozen.n2.68x10x95",
                  "node_roles": [
                    "data_frozen"
                  ],
                  "id": "frozen",
                  "size": {
                    "resource": "memory",
                    "value": 0
                  }
                },
                {
                  "zone_count": 3,
                  "instance_configuration_id": "gcp.es.master.n2.68x32x45.2",
                  "node_roles": [
                    "master",
                    "remote_cluster_client"
                  ],
                  "id": "master",
                  "size": {
                    "resource": "memory",
                    "value": 0
                  }
                },
                {
                  "zone_count": 2,
                  "instance_configuration_id": "gcp.es.coordinating.n2.68x16x45.2",
                  "node_roles": [
                    "ingest",
                    "remote_cluster_client"
                  ],
                  "id": "coordinating",
                  "size": {
                    "resource": "memory",
                    "value": 0
                  }
                },
                {
                  "zone_count": 1,
                  "instance_configuration_id": "gcp.es.ml.n2.68x32x45",
                  "node_roles": [
                    "ml",
                    "remote_cluster_client"
                  ],
                  "id": "ml",
                  "size": {
                    "resource": "memory",
                    "value": 0
                  }
                }
              ],
              "elasticsearch": {
                "version": "8.7.1",
                "enabled_built_in_plugins": []
              },
              "deployment_template": {
                "id": "gcp-storage-optimized-v5"
              }
            },
            "ref_id": "main-elasticsearch"
          }
        ],
        "enterprise_search": [
          {
            "elasticsearch_cluster_ref_id": "main-elasticsearch",
            "region": "gcp-us-central1",
            "plan": {
              "cluster_topology": [
                {
                  "node_type": {
                    "connector": true,
                    "appserver": true,
                    "worker": true
                  },
                  "instance_configuration_id": "gcp.enterprisesearch.n2.68x32x45",
                  "zone_count": 1,
                  "size": {
                    "resource": "memory",
                    "value": 2048
                  }
                }
              ],
              "enterprise_search": {
                "version": "8.7.1"
              }
            },
            "ref_id": "main-enterprise_search"
          }
        ],
        "kibana": [
          {
            "elasticsearch_cluster_ref_id": "main-elasticsearch",
            "region": "gcp-us-central1",
            "plan": {
              "cluster_topology": [
                {
                  "instance_configuration_id": "gcp.kibana.n2.68x32x45",
                  "zone_count": 1,
                  "size": {
                    "resource": "memory",
                    "value": 1024
                  }
                }
              ],
              "kibana": {
                "version": "8.7.1"
              }
            },
            "ref_id": "main-kibana"
          }
        ]
      },
      "settings": {
        "autoscaling_enabled": false
      },
      "name": "My deployment",
      "metadata": {
        "system_owned": false
      }
    }"
    		
DEPLOYMENT_ID
您的部署 ID,如 Cloud UI 中所示或通过 API 获取。
REGION
您的部署区域,如 Cloud UI 中所示或通过 API 获取。

请注意,您的资源的 ref_id 和版本号可能与此示例中显示的不同。请确保使用您的部署实际具有的资源。

您可以在用户 Elastic Cloud 控制台 中进行此更改。此方法唯一的缺点是它会更改用于访问 Elasticsearch 集群和 Kibana 的 URL。

  1. 从部署菜单中,打开 Snapshots 页面并点击 Take Snapshot now。等待快照完成。

  2. 在主要的 Hosted deployments 页面中,点击 Create deployment。在 Settings 旁边,开启 Restore snapshot data,然后选择您的部署和您创建的快照。

    Create a Deployment using a snapshot
© . This website operates independently and is not affiliated with or endorsed by Elasticsearch B.V. All brand names, logos, and trademarks are the property of their respective owners.