将现有 Cloud Volumes ONTAP 部署转换为 Infrastructure Manager
从 2026 年 1 月 12 日起,Google Cloud 中的新 Cloud Volumes ONTAP 部署可以使用 Google Cloud Infrastructure Manager。Google 即将弃用 Google Cloud Deployment Manager,转而使用 Infrastructure Manager。因此,您需要手动运行过渡工具,将现有 Cloud Volumes ONTAP 部署从 Deployment Manager 转换为 Infrastructure Manager。这是一个一次性流程,之后您的系统将自动开始使用 Infrastructure Manager。
转换工具在 "NetApp 支持站点" 中可用,并创建以下工件:
-
Terraform 工件,保存在 `conversion_output/deployment_name`中。
-
转化摘要,保存在
conversion_output/batch_summary_<deployment_name>_<timestamp>.json。 -
调试日志,保存在
<gcp project number>-<region>-blueprint-config/<cvo name>目录中。您需要这些日志来进行故障排除。<gcp project number>-<region>-blueprint-config存储桶存储 Terraform 日志。
|
|
使用 Infrastructure Manager 的 Cloud Volumes ONTAP 系统将数据和记录存储在 Google Cloud Storage 存储桶中。您可能需要为这些存储桶支付额外费用,但不要编辑或删除存储桶或其内容:
|
-
确保您的 Cloud Volumes ONTAP 系统为 9.16.1 或更高版本。
-
请确保未从 Google Cloud Console 手动编辑任何 Cloud Volumes ONTAP 资源或其属性。
-
请确保已启用 Google Cloud API。请参阅 "启用 Google Cloud API"。请确保与其他 API 一起启用 Google Cloud Quotas API。
-
验证 NetApp Console 代理的服务帐户是否具有所需的所有权限。请参阅 "控制台代理的 Google Cloud 权限"。
-
转换工具使用以下域。在网络中的端口 443 上启用它们:
域 端口 协议 方向 目的 cloudresourcemanager.googleapis.com
443
TCP
EGRESS
项目验证
deploymentmanager.googleapis.com
443
TCP
EGRESS
部署发现
config.googleapis.com
443
TCP
EGRESS
基础架构管理器 API
storage.googleapis.com
443
TCP
EGRESS
GCS 存储桶操作
iam.googleapis.com
443
TCP
EGRESS
服务帐户验证
compute.googleapis.com
443
TCP
EGRESS
Google Cloud 和 Terraform Import 和 Plan 使用的计算 API 调用
openidconnect.googleapis.com
443
TCP
EGRESS
身份验证
oauth2.googleapis.com
443
TCP
EGRESS
OAuth2 令牌交换
registry.terraform.io
443
TCP
EGRESS
Terraform 提供程序注册表
releases.hashicorp.com
443
TCP
EGRESS
Terraform 二进制文件下载
apt.releases.hashicorp.com
443
TCP
EGRESS
HashiCorp APT 存储库
us-central1-docker.pkg.dev
443
TCP
EGRESS
GCP Artifact Registry
metadata.google.internal
80
HTTP
内部
VM 元数据和身份验证令牌
按照下面的步骤从部署管理器过渡到基础架构管理器,并为现有的 Cloud Volumes ONTAP 部署运行工具。
-
创建角色并将其附加到服务帐户:
-
创建具有以下权限的 YAML 文件:
title: NetApp Dm TO IM Convert Solution description: Permissions for the service account associated with the VM where the tool will run. stage: GA includedPermissions: - compute.addresses.get - compute.disks.get - compute.forwardingRules.get - compute.healthChecks.get - compute.instanceGroups.get - compute.instances.get - compute.regionBackendServices.get - config.deployments.create - config.deployments.get - config.deployments.getLock - config.deployments.lock - config.deployments.unlock - config.deployments.update - config.deployments.delete - config.deployments.updateState - config.operations.get - deploymentmanager.deployments.get - deploymentmanager.deployments.list - deploymentmanager.manifests.get - iam.serviceAccounts.get - storage.buckets.create - storage.objects.create - storage.objects.delete - storage.objects.get - storage.objects.list -
使用 YAML 文件中定义的权限在 Google Cloud 中创建自定义角色。
`gcloud iam roles create dmtoim_convert_tool_role --project=PROJECT_ID \
--file=YAML_FILE_PATH`有关详细信息,请参阅 "创建和管理自定义角色"。 -
将自定义角色附加到将用于创建 VM 的服务帐户。
-
将 `roles/iam.serviceAccountUser`角色添加到此服务帐户。请参阅 "服务账户概述"。
-
-
-
机器类型:Google Compute Engine 机器类型 e2-medium
-
操作系统:Ubuntu 25.10 AMD64 Minimal(镜像:ubuntu-minimal-2510-amd64)
-
网络:允许 HTTP 和 HTTPS 的防火墙
-
磁盘大小:20GB
-
安全:服务帐户:您创建的服务帐户
-
安全性:访问范围 - 为每个 API 设置访问权限:
-
云平台:已启用
-
Compute Engine:只读
-
存储:只读(默认)
-
Google Cloud Logging(以前称为 Stackdriver Logging)API:仅写入(默认)
-
Stackdriver Monitoring(现已成为 Google Cloud Operations 的一部分)API:仅写入(默认)
-
服务管理:只读(默认)
-
服务控制:已启用(默认)
-
Google Cloud Trace(以前称为 Stackdriver Trace):仅写入(默认)
-
-
-
使用 SSH 连接到新创建的虚拟机:
gcloud compute ssh dmtoim-convert-executor-vm --zone <region where VM is deployed> -
使用您的 NSS 凭据从 "NetApp 支持站点"下载转换工具:
wget <download link from NetApp Support site> -
提取下载的 TAR 文件:
tar -xvf <downloaded file name> -
下载并安装以下必备软件包:
-
Docker:28.2.2 build 28.2.2-0ubuntu1 或更高版本
-
Terraform:1.14.1 或更高版本
-
Python:3.13.7、python3-pip、python3 venv
sudo apt-get update sudo apt-get install python3-pip python3-venv -y wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com noble main" | sudo tee /etc/apt/sources.list.d/hashicorp.list sudo apt update && sudo apt install terraform sudo apt-get install -y docker.io sudo systemctl start dockerGoogle Cloud CLI
gcloud已预安装在虚拟机上。
-
-
将当前用户添加到 Docker 组中,以便该工具可以在没有 `sudo`权限的情况下使用 Docker。
sudo usermod -aG docker $USER newgrp docker -
安装转换工具:
cd <folder where you extracted the tool> ./install.sh这将在隔离环境中安装工具,
dmconvert-venv,并验证是否已安装所有必需的软件包。 -
输入安装工具的环境:
source dmconvert-venv/bin/activate -
以
non-sudo用户身份运行转换工具。请确保使用与 Console 代理的服务帐户相同的服务帐户,并且服务帐户具有所有 "Google Cloud Infrastructure Manager 的必要权限"。dmconvert \ --project-id=<the Google Cloud project ID for the Cloud Volumes ONTAP deployment> \ --cvo-name=<Cloud Volumes ONTAP system name> \ --service-account=<the service account attached to the Console agent>完成后该工具显示所有 Cloud Volumes ONTAP 系统和 SVM 详细信息的列表。当它完成运行时,您可以看到所有已转换系统的状态。每个转换后的系统都以 <converted system name-imdeploy> 格式显示在 Google Console 的 Infrastructure Manager 下,表明 Console 现在使用 Infrastructure Manager API 来管理该 Cloud Volumes ONTAP 系统。
转换后,请勿在 Google Cloud Console 中删除 Deployment Manager 的部署对象。此部署对象包含 Infrastructure Manager 用于管理 Cloud Volumes ONTAP 系统的元数据。
如果需要回滚转换,则必须使用相同的 VM。如果已转换所有系统,并且不需要回滚到 Deployment Manager,则可以删除 VM。
回滚转换
如果不想继续转换,可以按照以下步骤回滚到 Deployment Manager:
-
在同一个 为运行工具而创建的虚拟机 上,运行此命令:
dmconvert \ --project-id=<the Google Cloud project ID for the Cloud Volumes ONTAP deployment> \ --cvo-name=<Cloud Volumes ONTAP system name> \ --service-account=<the service account attached to the Console agent> \ --rollback -
等待回滚完成。