Set up Cloud Volumes Service for Google Cloud
Create a Cloud Volumes Service for Google Cloud working environment in Cloud Manager to create and manage volumes and snapshots.
Quick start
Get started quickly by following these steps, or go to the next section for full details.
Enable the Cloud Volumes Service API
From Google, enable the Cloud Volumes Service for GCP API so that Cloud Manager can manage the subscription and cloud volumes.
Create a GCP service account and download credentials
From Google, create a GCP service account and role so that Cloud Manager can access your Cloud Volumes Service for GCP account.
Create a Cloud Volumes Service for GCP working environment
In Cloud Manager, click Add Working Environment > Google Cloud > Cloud Volumes Service and then provide details about the service account and Google Cloud project.
Enable the Cloud Volumes Service API
In Google Cloud Shell, run the following command to enable the Cloud Volumes Service API:
gcloud --project=<my-cvs-project> services enable cloudvolumesgcp-api.netapp.com
Give Cloud Manager access to the Cloud Volumes Service for GCP account
You must complete the following tasks so that Cloud Manager can access your Google Cloud project:
-
Create a new service account
-
Add the new service account member to your project and assign it specific roles (permissions)
-
Create and download a key pair for the service account that is used to authenticate to Google
-
In the Google Cloud Console, go to the Service Accounts page.
-
Click Select a project, choose your project, and click Open.
-
Click Create Service Account, enter the service account name (friendly display name) and description, and click Create.
-
From the IAM page click Add and fill out the fields in the Add Members page:
-
In the New Members field, enter the full service account ID, for example, user1-service-account-cvs@project1.iam.gserviceaccount.com.
-
Add these roles:
-
NetApp Cloud Volumes Admin
-
Compute Network Viewer
-
Folder Viewer
-
-
Click Save.
-
-
From the Service account details page click Add key > Create new key.
-
Select JSON as the key type and click Create.
By clicking Create your new public/private key pair is generated and downloaded to your system. It serves as the only copy of the private key. Store this file securely because it can be used to authenticate as your service account.
For detailed steps, see the Google Cloud topics Creating and managing service accounts, Granting, changing, and revoking access to resources, and Creating and managing service account keys.
Create a Cloud Volumes Service for GCP working environment
Set up a Cloud Volumes Service for GCP working environment in Cloud Manager so you can start creating volumes.
Regardless of whether you have already created volumes from the Google Cloud Console, or if you just signed up for Cloud Volumes Service for GCP and have no volumes yet, the first step is to create a working environment for the volumes based on your GCP subscription.
If cloud volumes already exist for this subscription, then the volumes will appear in the new working environment. If you haven't added any cloud volumes yet for the GCP subscription, then you do that after you create the new working environment.
If you have subscriptions and volumes in multiple GCP projects, you need to perform this task for each project. |
You must have the following information available when adding a subscription for each project:
-
Service account credentials (JSON private key you downloaded)
-
Project name
-
In Cloud Manager, add a new Working Environment, select the location Google Cloud, and click Continue.
-
Select Cloud Volumes Service and click Continue.
-
Provide information about your Cloud Volumes Service subscription:
-
Enter the Working Environment Name you want to use.
-
Copy/paste the JSON private key you downloaded in the previous steps.
-
Select the name of your Google Cloud project.
-
Click Add.
-
Cloud Manager displays your Cloud Volumes Service for Google Cloud working environment.
If cloud volumes already exist for this subscription, then the volumes appear in the new working environment, as shown in the screenshot. You can add additional cloud volumes from Cloud Manager.
If no cloud volumes exist for this subscription, create them now.