订购硬件

本页面介绍了如何订购 Google Distributed Cloud connected 硬件。 Distributed Cloud connected 在以下国家/地区提供:

  • 澳大利亚
  • 奥地利
  • 比利时
  • 巴西
  • 加拿大
  • 丹麦
  • 芬兰
  • 法国
  • 德国
  • 香港
  • 日本
  • 印度
  • 印度尼西亚
  • 意大利
  • 荷兰
  • 挪威
  • 波兰
  • 沙特阿拉伯
  • 新加坡
  • 韩国
  • 西班牙
  • 瑞典
  • 瑞士
  • 英国
  • 美国

在订购硬件之前,您必须满足 Distributed Cloud connected 安装 要求

使用 Google Cloud 控制台订购 Distributed Cloud connected 硬件

  1. 在 Google Cloud 控制台中,前往 订单 页面。

    前往“订单”页面

  2. 选择目标 Google Cloud 项目。

  3. 点击创建订单

  4. 填写申请表并提交。

销售代表会审核您提交的内容,并与您联系以 完成订单。 Google Cloud 代表会执行以下操作:

  • 审核您的业务需求,帮助您选择最佳硬件配置。
  • 收集有关您的本地网络、 Google Cloud 项目、安装地点以及安装要求中列出的其他要求的信息。
  • 在发货前使用此信息配置 Distributed Cloud 硬件。

使用 GDC Hardware Management API 订购 Distributed Cloud connected 硬件

借助 GDC Hardware Management API,您可以以编程方式订购 Distributed Cloud 硬件。订单表示您打算部署 Distributed Cloud connected。订单必须包含以下信息,这些信息将在 Distributed Cloud connected 部署的整个生命周期中使用:

  • 订单管理和送货的联系人
  • 送货地址以及与送货相关的任何信息
  • 硬件配置
  • 网络配置

您必须与 Google 销售代表合作,完成客户信息问卷 (CIQ),并最终确定 Distributed Cloud connected 部署的范围和配置。

订单的结构

如需使用 GDC Hardware Management API 下单,您必须创建 Order 资源,以及 Order 资源引用的随附 SiteZoneHardware 资源。然后,您将 Order 资源提交给 Google。这些资源支持标准 CRUD 操作。 每个资源的名称都是一个路径,其中包含目标 Google Cloud 项目 ID 和 Google Cloud 区域。

这些资源具有以下功能。如需详细了解如何使用 GDC Hardware Management API,请参阅 Google Distributed Cloud CLI 和 API 参考文档

  • Order。此资源请求创建一个或多个 Distributed Cloud 可用区。 创建此资源时,它会收到一个可在 create_order_response.name 字段中访问的名称。 Order 资源名称采用以下格式:

    `projects/`PROJECT_ID`/locations/`REGION`/orders/`ORDER_ID

    其中:

    • PROJECT_ID:目标 Google Cloud 项目的 ID。
    • REGION:您要在其中部署 Distributed Cloud 可用区的 Google Cloud 区域。
    • ORDER_ID:用于标识此订单的唯一 ID。如果省略,系统会自动生成一个值。我们建议您提供一个由 小写字母、数字和短划线组成的唯一订单 ID 值。否则,失败的订单创建调用可能会生成重复订单。
  • Site。此资源表示您要部署 Distributed Cloud 硬件的实际位置。此资源包含负责协调初始送货和日后维护的负责人的联系信息。 此联系人可能与您在订单中提供的联系人不同。

  • Hardware。此资源实例化 Distributed Cloud connected SKU,并表示 Distributed Cloud 服务器或机架。每个 Hardware 资源都会引用关联的 OrderSiteZone 资源。如需查看可用的 SKU,请使用 ListSkus API 调用。

  • Zone。此资源指定 Distributed Cloud connected 机器和关联集群的网络配置。Distributed Cloud 可用区涵盖一个或多个 Distributed Cloud connected 机架,或部署在您所在位置的所有 Distributed Cloud connected 服务器机器。

当您向 Google 提交 Order 资源且其状态从 DRAFT 更改为 SUBMITTED 时,大多数字段值都会变为只读。

订单的生命周期

Order 资源可以具有 State 中列出的状态之一。 相关方可以在订单中留下评论,这些评论会存储为嵌套在相应 Order 资源下的 Comment 资源。您可以通过 GDC Hardware Management API 和 Google Cloud 控制台读取和提交评论。

如果订单包含所有必需信息,并且您已与 Google 签署合同,则订单 将按以下状态顺序进行:ACCEPTED, BUILDING, SHIPPINGINSTALLINGCOMPLETED. 关联的 ZoneHardware 资源的状态会与 Order 资源同步更新。 如果我们还需要您提供更多信息,或者您尚未与 Google 签署合同,则订单将进入 ADDITIONAL_INFO_NEEDED 状态,并等待通过评论解决。必须通过评论请求修改或取消订单。

选择目标 Google Cloud 项目

项目是一种结构,用于封装一组 Google Cloud 资源,让您可以使用这些资源,并为这些资源建立访问权限控制和结算规则。 Google Cloud

我们建议您为每个管理网域(例如国家/地区或公司部门)以及高级别应用场景(例如边缘与核心)创建一个单独的 Google Cloud 项目,并通过该 Google Cloud 项目管理该网域的 Distributed Cloud connected 部署。

借助 Google Cloud 项目,您可以执行以下管理任务:

  • 订购 Distributed Cloud connected 硬件。
  • 配置 Distributed Cloud connected 集群并在舰队中注册这些集群。
  • 管理软件发布。
  • 管理 Cloud Storage 中的 Distributed Cloud connected 数据。
  • 管理 Secret Manager 中的 Distributed Cloud connected 凭据。
  • 管理 Cloud Monitoring 中的 Distributed Cloud connected 日志和指标。

您的确切 Google Cloud 项目拓扑取决于您的业务需求。我们建议您避免跨项目依赖项,并始终在每个 Google Cloud 项目中创建和使用资源。

在特定 Google Cloud 项目中订购的硬件始终在该 Google Cloud 项目中进行管理。

选择目标 Google Cloud 区域

为 Distributed Cloud connected 部署选择特定区域取决于您的业务需求以及目标地理位置的法律影响。 Google Cloud

如果您要将 Distributed Cloud connected 部署集成到现有的多区域 Google Cloud 覆盖范围中,我们建议您将每个 Distributed Cloud connected 可用区 映射到托管该可用区依赖项的 Google Cloud 区域。

如果您不将 Distributed Cloud connected 部署与现有 Google Cloud 覆盖范围集成,我们建议您多样化选择 Google Cloud 区域,以提高可靠性。例如:

  • 将每个 Distributed Cloud connected 可用区映射到其最近的支持 Google Cloud 区域。这会将管理平面故障的影响限制在单个地理区域内。
  • 将 Distributed Cloud connected 分布在多个 Google Cloud 区域中。这会限制可能受管理平面故障影响的 Distributed Cloud connected 可用区的数量;不过,受影响的可用区分布在更大的地理区域内。

    Distributed Cloud connected 支持以下 Google Cloud 区域:

  • 亚洲asia-east1asia-east2asia-northeast1asia-northeast3asia-south1asia-south2asia-southeast1asia-southeast2

  • 欧洲europe-central2europe-north1europe-west1europe-west2europe-west3europe-west4europe-west6europe-west8europe-west9

  • 中东me-central1me-west1

  • 大洋洲australia-southeast1

  • 北美洲northamerica-northeast1northamerica-northeast2us-central1us-central2us-east1us-east4us-east5us-east7us-south1us-west1us-west2us-west3us-west4us-west8

  • 南美洲southamerica-east1southamerica-west1

设置环境

在开始之前,请完成以下前提条件:

  1. 设置 Python 开发环境

  2. 使用以下命令安装 GDC Hardware Management API 客户端库:

    python3 -m pip install google-cloud-gdchardwaremanagement
    
  3. 在目标 Google Cloud 项目上启用 GDC Hardware Management API

使用 GDC Hardware Management API 创建和提交 Distributed Cloud connected 硬件订单

本部分中的步骤是一些示例,说明了如何使用 GDC Hardware Management API 创建 Order 资源并将其提交给 Google。如需完成本部分中的步骤,您必须在 Google Cloud 项目中拥有 GDC Hardware Management Admin (roles/gdchardwaremanagement.admin) 角色。

  1. 创建 Order 资源。例如:

    import datetime
    from google.cloud import gdchardwaremanagement_v1alpha
    from google.protobuf.timestamp_pb2 import Timestamp
    from google.type import postal_address_pb2
    
    client = gdchardwaremanagement_v1alpha.GDCHardwareManagementClient()
    
    contact = gdchardwaremanagement_v1alpha.Contact(
        given_name="John",
        family_name="Customer",
        email="jcustomer@example.com",
        phone="+1 123 456 7890",
    )
    
    organization_contact = gdchardwaremanagement_v1alpha.OrganizationContact(
        address=postal_address_pb2.PostalAddress(
            organization="Example Organization",
            address_lines=["1800 Amphibious Blvd."],
            locality="Mountain View",
            administrative_area="CA",
            postal_code="94045",
            region_code="US",
        ),
        contacts=[contact],
    )
    
    order = gdchardwaremanagement_v1alpha.Order(
        organization_contact=organization_contact,
        customer_motivation="I like Google Distributed Cloud!",
        fulfillment_time=Timestamp(
            seconds=int(datetime.datetime(2024, 11, 22, 9, 0).timestamp()),
        ),
        region_code="US",
    )
    
    create_order_response = client.create_order(
        request=gdchardwaremanagement_v1alpha.CreateOrderRequest(
            parent="projects/myProject/locations/us-east1",
            order_id="myOrderID",
            order=order,
        ),
    ).result()

    您的订单现在处于 DRAFT 状态,并且已分配一个存储在 create_order_response.name 字段中的资源名称。修改或跟踪此订单的状态时,请使用此资源名称。

  2. 创建 Site 资源。例如:

    site = gdchardwaremanagement_v1alpha.Site(
        organization_contact=organization_contact,
        google_maps_pin_uri="https://maps.app.goo.gl/z7bE8z8fffg6Sri46",
    )
    
    create_site_response = client.create_site(
        request=gdchardwaremanagement_v1alpha.CreateSiteRequest(
            parent="projects/myProject/locations/us-east1",
            site_id="mySite",
            site=site,
        ),
    ).result()
  3. 创建 Zone 资源。例如:

    zone = gdchardwaremanagement_v1alpha.Zone(
        contacts=[contact],
        network_config=gdchardwaremanagement_v1alpha.ZoneNetworkConfig(
            management_ipv4_subnet=gdchardwaremanagement_v1alpha.Subnet(
                address_range="192.0.2.0/24",
                default_gateway_ip_address="192.0.2.1",
            ),
            machine_mgmt_ipv4_range="192.0.2.8/29",
            kubernetes_ipv4_subnet=gdchardwaremanagement_v1alpha.Subnet(
                address_range="203.0.113.0/24",
                default_gateway_ip_address="203.0.113.1",
            ),
            kubernetes_node_ipv4_range="203.0.113.8/29",
            kubernetes_control_plane_ipv4_range="203.0.113.16/29",
        ),
    )
    
    create_zone_response = client.create_zone(
        request=gdchardwaremanagement_v1alpha.CreateZoneRequest(
            parent="projects/myProject/locations/us-east1",
            zone_id="myZone",
            zone=zone,
        ),
    ).result()
  4. 创建 Hardware 资源。您必须为 Distributed Cloud connected 部署中的每台机器指定唯一的 hardware_id 值。 例如:

    from google.type import date_pb2
    
    hardware = gdchardwaremanagement_v1alpha.Hardware(
        order=create_order_response.name,
        site=create_site_response.name,
        zone=create_zone_response.name,
        config=gdchardwaremanagement_v1alpha.HardwareConfig(
            sku="projects/myProject/locations/us-east1/skus/gdce-server-l",
            power_supply=gdchardwaremanagement_v1alpha.types.PowerSupply.POWER_SUPPLY_AC,
        ),
        physical_info=gdchardwaremanagement_v1alpha.HardwarePhysicalInfo(
            power_receptacle=gdchardwaremanagement_v1alpha.types.HardwarePhysicalInfo.PowerReceptacleType.NEMA_5_15,
            network_uplink=gdchardwaremanagement_v1alpha.types.HardwarePhysicalInfo.NetworkUplinkType.RJ_45,
            voltage=gdchardwaremanagement_v1alpha.types.HardwarePhysicalInfo.Voltage.VOLTAGE_110,
            amperes=gdchardwaremanagement_v1alpha.types.HardwarePhysicalInfo.Amperes.AMPERES_15,
        ),
        installation_info=gdchardwaremanagement_v1alpha.HardwareInstallationInfo(
            rack_location="Floor 2, Room 201, Row 7, Rack 3",
            power_distance_meters=2,
            switch_distance_meters=2,
            rack_unit_dimensions=gdchardwaremanagement_v1alpha.Dimensions(
                width_inches=19,
                height_inches=1.75,
                depth_inches=30,
            ),
            rack_space=gdchardwaremanagement_v1alpha.RackSpace(
                start_rack_unit=12,
                end_rack_unit=12,
            ),
            rack_type=gdchardwaremanagement_v1alpha.types.HardwareInstallationInfo.RackType.FOUR_POST,
        ),
        requested_installation_date=date_pb2.Date(year=2024, month=11, day=22),
    )
    
    create_hardware_response = client.create_hardware(
        request=gdchardwaremanagement_v1alpha.CreateHardwareRequest(
            parent="projects/myProject/locations/us-east1",
            hardware_id="machineHardwareID",
            hardware=hardware,
        ),
    ).result()
  5. Order 资源提交给 Google:

    submit_order_response = client.submit_order(
        request=gdchardwaremanagement_v1alpha.SubmitOrderRequest(
            name=create_order_response.name,
        ),
    ).result()

问题排查

本部分介绍了最常遇到的错误、错误原因和可用的补救措施。

错误:400 FAILED_PRECONDITION

如果您在收到 API 调用响应时收到 400 错误代码以及 FAILED_PRECONDITION 状态,请检查您的请求对于您尝试完成的操作是否有效。无效请求的示例包括提交缺少字段或值的 Order 资源,或者尝试删除与之前提交的 Order 资源关联的 Hardware 资源。

错误:400 INVALID_ARGUMENT

如果您在收到 API 调用响应时收到 400 错误代码以及 INVALID_ARGUMENT 状态,请检查是否存在不正确的字段名称和值(与预期类型不匹配)或缺少值的情况。如果您在 PATCH 请求中使用 updateMask,并且 updateMask 中指定的一个或多个字段无效,您也可能会收到此错误。

如需解决此问题,请参阅 GDC Hardware Management API ,以验证所有字段名称和值(包括格式)是否正确。如果使用 JSON 载荷,请确认载荷中包含所有必需信息。

错误:401 UNAUTHENTICATED

如果您在收到 API 调用响应时收到 401 错误代码以及 UNAUTHENTICATED 状态,请检查您的身份验证配置。如需了解详情,请参阅 设置应用默认凭证

错误:403 PERMISSION_DENIED

如果您在收到 API 调用响应时收到 403 错误代码以及 PERMISSION_DENIED 状态,请检查用于进行 API 调用的服务帐号是否具有足够的权限来访问目标对象和资源。另请验证凭据是否正确且未过期。

错误:404 NOT_FOUND

如果您在收到 API 调用响应时收到 404 错误代码以及 NOT_FOUND 状态,请检查 API 调用中指定的资源名称和路径是否有效。请参阅 GDC Hardware Management API ,以验证您的请求网址的结构是否正确,以及网址中包含的所有字段 是否有效。

后续步骤