Nutanix Prism Central – Configure Apps (Calm) and Google Cloud Platform (GCP)

Updated 2018-10-23: Added information about GCP Compute Engine API and the GCP account privileges/Role assignment required.

One of the new features included in the Nutanix Prism Central (PC) 5.7 UI is the option to connect the Apps (Calm product) section to Google Cloud Platform (GCP) and manage your workload. This blog post will cover the PC Apps to GCP configuration and another one will show how to manage your apps in GCP. This blog post is divided into three sections:

GCP Configuration

Follow the below steps to setup a GCP connection in Calm and make it possible for a project to use GCP as a target.

  1. Log in to GCP and search for “Service accounts”.
  2. If you don’t have a Service Account, you need to create one and the required account privileges/Role assignment depends on your use case.
    The Service Account used in this blog post has the Compute Admin Role which is found via Compute Engine section in the Role configuration.
  3. This account is already associated with a Key but we’ll create a new one. Click the three dots to the right and select “Create Key”
  4. Select download forma, use JSON.
  5. Just info about that you should treat this key like an important asset.
  6. Make sure Compute Engine API is enabled by searching for “Compute Engine API” in the GCP console, click Overview and press Enable.

    Once done you should have an option to “DISABLE API”

PC Apps Configuration

Now we have the GCP key required to establish the connection from PC Apps to GCP. Follow these steps.

  1. Log in to PC, select Apps and click settings on the right hand side
  2. Click “Add Settings”
  3. Give the new setting a:
    1. Name
    2. Select GCP as the Type
  4. Click “Service Account File” and select the one you just downloaded from GCP.
  5. When done you’ll see a bunch of fields filled out. Remove any potential Region you do not want to use. The regions are greyed out as well as some part of the Project ID in the below print screen.
  6. Click Save
  7. Click Verify
  8. Now if you check the Apps, Settings section you’ll see the newly GCP setting added and verified.
  9. Last thing is to add the GCP images you want to make available. Click the check-box next to the newly created GCP type and use the drop-down. on the right-hand side to add the images.

PC Self Service Project Configuration

Last this will be to enable GCP for a Self Service Project and I’ve decided to create a new project.

  1. Click Projects on the left hand side in the Apps section
  2. Click Create Project
  3. Fill out the following:
    1. Project Name
    2. Select the directory users and or groups and assign the appropriate Project roles. In my case I only added the group admin_gcp to the project.
    3. Select Infrastructure. In my case I only selected “Local and Cloud resources” so I can deploy VMs both on-premises and to GCP. I selected:
      1. AHV Cluster = SolPerf01
      2. Network (AHV Network) = All
    4. For GCP i selected GCP_01 which I created in the PC Apps Configuration section.
    5. Click Save
  4. Click Environment to configure GCP
  5. Create two credentials.
    Note: These credentials will be use for direct launch of MarketPlace blueprints from MarketPlace manager. Custom user created blueprints will still need their own credentials created during configuration.

    1. Password based
    2. SSH Key based and you must use an SSH Key without a password so the PC can login to the VM and do post configuration tasks. I used the following keygen command, ssh-keygen -t rsa -C centos@nutanix.com (but sue whatever username you want) , on my MacBook to create a key pair. Fill out.
      1. Credential Name
      2. Username = same as the the username specified when creating the Key Pais with keygen.
      3. Secret Type = Password / Key
  6. Fill out the following in the VM Configuration section for AHV on Nutanix. This is not needed, unless you will deploy Marketplace blueprint from Marketplace manager, but the information provided at the Project level can be used when creating a Blueprint, via the Blueprint “Clone from environment” feature, so you won’t have to fill out everything again.
    1. VM Name
    2. Image – One available from the Image Service
    3. Device Type = Disk
    4. Device Bus = SCSI
    5. Check Bootable – You can add additional disk if needed
    6. vCPUs = Give whatever value you want to use as default
    7. Core per vCPU = Give whatever value you want to use as default
    8. vCPU = Give whatever value you want to use as default
    9. Memory (GiB) = Give whatever value you want to use as default
    10. NIC 1 = Select your default network
    11. Connection
      1. Check the check box “Check log-in upon create” and use
        1. The on-premises credentials created earlier
        2. NIC1 since that is the only one we currently have
        3. SSH connection type
        4. leave rest default
    12. The rest (VDISK, VGPU, CATEGORIES)  of the values I didn’t touch.
  7. Fill out the following in the VM Configuration section for GCP:
    1. Instance Name = What you want. If you try characters not allowed, you’ll be notified.
    2. GCP Zone = The one you want to use as default for the Project.
    3. GCP Machine Type = The one you want to use as a default
    4. Boot Disk
      1. Storage Type
      2. Source Image (select from the once you enabled in the PC Apps Configuration section)
      3. Size in GB
  8. Now on to the Network and SSH section section. Fill out:
    1. GCP Network
    2. GCP Subnetwork
    3. Access Configuration Name
    4. Access Configuration Type
    5. SSH-KEYS = I decided not to use any key here. Will specify per Blueprint
  9. The last section includes
    1. Management – Didn’t use anything for this Project.
    2. API Access – No changes
    3. Connection
        1. The gcp_centos credentials created earlier
        2. Public IP for remote access.
        3. SSH connection type
        4. leave rest default

If you click the “Running Man” next to the option so he turns blue you can change the default value when you Launch the Blueprint.