本页面介绍了如何订购 Google Distributed Cloud Connected 硬件。 Distributed Cloud Connected 可在以下国家/地区使用:
- 澳大利亚
- 奥地利
- 比利时
- 巴西
- 加拿大
- 丹麦
- 芬兰
- 法国
- 德国
- 香港
- 日本
- 印度
- 印度尼西亚
- 意大利
- 荷兰
- 挪威
- 波兰
- 沙特阿拉伯
- 新加坡
- 韩国
- 西班牙
- 瑞典
- 瑞士
- 英国
- 美国
在订购硬件之前,您必须满足分布式云连接安装要求。
使用 Google Cloud 控制台订购 Distributed Cloud connected 硬件
在 Google Cloud 控制台中,前往订单页面。
选择目标 Google Cloud 项目。
点击创建订单。
填写申请表单并提交。
Google Cloud 销售代表会审核您提交的申请,并与您联系以完成订单。客服人员会执行以下操作:
- 审核您的业务需求,帮助您选择最佳的硬件配置。
- 收集有关本地网络、 Google Cloud 项目、安装地点以及安装要求中列出的其他要求的信息。
- 使用此信息在交付之前配置 Distributed Cloud 硬件。
使用 GDC Hardware Management API 订购 Distributed Cloud connected 硬件
借助 GDC Hardware Management API,您可以以程序化方式订购 Distributed Cloud 硬件。订单表示您有意部署 Distributed Cloud connected。订单必须包含以下信息,这些信息将在整个 Distributed Cloud 连接部署生命周期内使用:
- 订单管理和配送方面的联系人
- 配送地点地址以及与配送相关的任何信息
- 硬件配置
- 网络配置
您必须与 Google 销售代表合作,填写客户信息问卷 (CIQ),并最终确定 Distributed Cloud connected 部署的范围和配置。
订单的结构
如需使用 GDC Hardware Management API 下单,您必须创建 Order 资源,以及 Order 资源引用的随附 Site、Zone 和 Hardware 资源。然后,您将 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资源都会引用关联的Order、Site和Zone资源。如需查看可用的 SKU,请使用 ListSkus API 调用。Zone。此资源用于指定 Distributed Cloud 连接的机器和关联集群的网络配置。Distributed Cloud 可用区涵盖一个或多个 Distributed Cloud connected 机架,或部署在您位置的所有 Distributed Cloud connected 服务器机器。
当您向 Google 提交 Order 资源且其状态从 DRAFT 更改为 SUBMITTED 时,大多数字段值都会变为只读。
订单的生命周期
Order 资源可以处于 State 中列出的状态之一。相关方可以在订单中添加评论,这些评论会作为嵌套在相应 Order 资源下的 Comment 资源进行存储。您可以通过 GDC 硬件管理 API 和 Google Cloud 控制台阅读和提交评论。
如果订单包含所有必需信息,并且您已与 Google 签订合同,则订单会按以下状态顺序进行处理:ACCEPTED, BUILDING, SHIPPING、INSTALLING 和 COMPLETED.。关联的 Zone 和 Hardware 资源的状态会与 Order 资源的状态同步更新。
如果我们还需要您提供更多信息,或者您尚未与 Google 签订合同,订单会进入 ADDITIONAL_INFO_NEEDED 状态,等待通过评论解决问题。必须通过注释请求修改或取消订单。
选择目标 Google Cloud 项目
Google Cloud 项目是一种结构,用于封装一组 Google Cloud 资源,使您可以使用这些资源,并为这些资源建立访问权限控制和结算规则。
我们建议您为每个管理网域(例如国家/地区或公司部门)和高级别使用情形(例如边缘与核心)创建一个单独的 Google Cloud 项目,并通过该 Google Cloud 项目管理网域的 Distributed Cloud 连接部署。
借助 Google Cloud 项目,您可以执行以下管理任务:
- 订购 Distributed Cloud connected 硬件。
- 配置 Distributed Cloud 连接的集群,并将其注册到舰队中。
- 管理软件发布。
- 管理 Cloud Storage 中的 Distributed Cloud 连接数据。
- 在 Secret Manager 中管理 Distributed Cloud connected 凭据。
- 在 Cloud Monitoring 中管理 Distributed Cloud 连接的日志和指标。
确切的 Google Cloud 项目拓扑取决于您的业务需求。我们建议您避免跨项目依赖关系,并始终在每个 Google Cloud 项目中创建和使用资源。
在特定 Google Cloud 项目内订购的硬件始终在该 Google Cloud 项目中进行管理。
选择目标 Google Cloud 地区
为 Distributed Cloud Connected 部署选择 Google Cloud 区域的具体方式取决于您的业务需求以及目标地理位置的法律影响。
如果您要将分布式云互联部署集成到现有的多区域Google Cloud 覆盖区,建议您将每个分布式云互联可用区映射到托管该可用区依赖项的 Google Cloud 区域。
如果您未将 Distributed Cloud 连接部署与现有 Google Cloud覆盖范围集成,建议您多样化 Google Cloud 区域选择,以提高可靠性。例如:
- 将每个 Distributed Cloud Connected 可用区映射到其最近的支持 Google Cloud 的区域。这样可将管理平面故障的影响范围限制在单个地理区域内。
在多个 Google Cloud 区域中对分布式云进行条带化。这限制了可能受到管理平面故障影响的 Distributed Cloud Connected 可用区数量;不过,受影响的可用区分布在更大的地理区域内。
Distributed Cloud Connected 支持以下 Google Cloud 区域:
亚洲:
asia-east1、asia-east2、asia-northeast1、asia-northeast3、asia-south1、asia-south2、asia-southeast1、asia-southeast2欧洲:
europe-central2、europe-north1、europe-west1、europe-west2、europe-west3、europe-west4、europe-west6、europe-west8、europe-west9中东:
me-central1、me-west1大洋洲:
australia-southeast1北美:
northamerica-northeast1、northamerica-northeast2、us-central1、us-central2、us-east1、us-east4、us-east5、us-east7、us-south1、us-west1、us-west2、us-west3、us-west4、us-west8南美洲:
southamerica-east1、southamerica-west1
设置环境
在开始之前,请完成以下前提条件:
使用以下命令安装 GDC 硬件管理 API 客户端库:
python3 -m pip install google-cloud-gdchardwaremanagement
在目标 Google Cloud 项目上启用 GDC Hardware Management API。
使用 GDC Hardware Management API 创建并提交 Distributed Cloud connected 硬件订单
本部分中的步骤是一些示例,用于说明如何使用 GDC 硬件管理 API 创建 Order 资源并将其提交给 Google。如需完成此部分中的步骤,您必须在 Google Cloud 项目中拥有 GDC Hardware Management Admin (roles/gdchardwaremanagement.admin) 角色。
创建
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字段中的资源名称。在修改或跟踪相应订单的状态时,请使用此资源名称。创建
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()
创建
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()
创建
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()
向 Google 提交
Order资源: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 硬件管理 API,验证所有字段名称和值(包括格式)是否正确。如果使用 JSON 载荷,请确认载荷中包含所有必需的信息。
错误:401 UNAUTHENTICATED
如果您在 API 调用的响应中收到 401 错误代码和 UNAUTHENTICATED 状态,请检查您的身份验证配置。如需了解详情,请参阅设置应用默认凭证。
错误:403 PERMISSION_DENIED
如果您在 API 调用的响应中收到 403 错误代码和 PERMISSION_DENIED 状态,请检查用于进行 API 调用的服务账号是否具有足够的权限来访问目标对象和资源。另请验证凭据是否正确且未过期。
错误:404 NOT_FOUND
如果您在响应 API 调用时收到 404 错误代码和 NOT_FOUND 状态,请检查 API 调用中指定的资源名称和路径是否有效。请参阅 GDC 硬件管理 API,验证您的请求网址结构是否正确,以及网址中包含的所有字段是否有效。