Example: Automating service requests to create a virtual machine in Google Cloud Platform


Use the Google Cloud Platform sample service in BMC Helix Digital Workplace Catalogto automate service requests for creating virtual machines in GCP (Google Cloud Platform).

Scenario

Ajay, an application business analyst, wants to create a service to automate the task of creating virtual machines in GCP. He uses the Google Cloud Platform sample service content package. Ajay first creates a GCP connector configuration. He updates the service and publishes it to make it available to users.

Task 1: To create a Google Cloud Platform connector

  1. Log in to BMC Helix Innovation Suite.
  2. On the Administration tab, click Connectors.
  3. Select  Connectors > Google Cloud Platform, and click  Add new setting
  4. Complete the following fields: 

    Field

    Description

    Connection Id

    Connection ID for the connection.

    Name

    Name for the connection.

    Project Id

    Unique identifier of the Google Cloud project.

    Client Email

    Email address of the associated service account. The service account represents an application. 

    Client Id

    Unique identifier that you get when you register your application with GCP.

    Private Key

    Cryptographic key that is used to authenticate a service account when the key interacts with GCP services.

    Private Key Id

    Unique identifier for the private key. It is a key file in JSON format. 

  5. Click Save.

Task 2: To verify that the Google Cloud Platform service is visible

  1. Log in to BMC Helix Digital Workplace Catalog.
  2. On the Services tab, click Services.
  3. In the My Services tab, verify that the Google Cloud Platform service is visible.
    image-2024-2-20_20-11-27.png

Task 3: To define the Google Cloud Platform service workflow

  1. Log in to BMC Helix Digital Workplace Catalog.
  2. On the Services tab, click Services.
  3. In the My Services tab, select the Google Cloud Platform service.
  4. Click Actions and click Open.
  5. Under the Service Options pane, click Edit next to the Workflow option.
    image-2024-2-20_20-18-21.png
  1. Under the Workflow and Questions pane, in the Workflow section, click Edit.
    image-2024-2-20_10-26-50.png
    The following workflow is displayed in the Workflow designer. It uses the Create GCP VM element
    image-2024-2-20_10-28-24.png

  2. Map the input variables to the service questionnaire so that the user responses to service questions are used as variable values.
    The following input variables are available:

    image-2024-2-20_10-31-50.png 

  3. Save the changes.

Task 4: To define the Google Cloud Platform service questionnaire

  1. Log in to BMC Helix Digital Workplace Catalog.
  2. On the Services tab, click Services.
  3. In the My Services tab, select the Google Cloud Platform service.
  4. Click Actions and click Open.
  5. In the Service Options pane, click Edit next to the Workflow option.
    image-2024-2-20_20-18-21.png
  1. In the Workflow and Questions pane, in the Questions section, click Edit.
    image-2024-2-20_10-35-58.png
    The following questions are displayed in the Questions Designer:

    Questions

    Description

    Project Id

    The unique identifier of the Google Cloud project.

    Vm Name

    The value specifies the name of the virtual machine. Users can specify any name.

    Zone

    The name of the zone in which you want to create the virtual machine. 

    A zone is a subset of a geographical region. 

    For more information about the regions and zones, see GCP regions and zones.

    Image Publisher

    (Optional) The name of the organization that provides a virtual machine image in the GCP marketplace that you can use

    Image Version

    The version of the virtual machine image. This field is required only if you select Image Publisher.

    Machine Configuration

    A machine image of a Compute Engine resource that stores the
    configuration, metadata, permissions, and data from one or more disks that are required to create a virtual machine instance. 

    Disk Type

    The storage option for your virtual machine instance.

    Disk Size

    The size of the disk.

    Auto Delete

    The option to configure the automatic delete behavior for disks attached to the Compute Engine virtual machines.

    Device Disk Name

    The option to provide a custom name for the disk.

    Host Name

    The option to specify a custom host name for the virtual machine.

    Public Ssh Key

    The SSH key-pair used to connect to the virtual machine instance.

    Gpu Type

    The graphics processing unit (GPU) types that you can add to your virtual machine. 

    Network Tag

    A character string that you can add to a virtual machine resource to provide a way to conditionally allow or deny policies.

    Instance Template

    A template containing the configuration properties such as machine type, disk type, metadata, startup scripts, which you can use to create a virtual machine instance.

    Custom Image Id

    A custom image with all the required resources that you can use to create a virtual machine instance.

    Additional Blank Disk Type

    The parameters you can set to configure additional disk space for your virtual machine.




    Additional Blank Disk Size

    Additional Blank Auto Delete

    Additional Blank Disk Device Name

    Custom Network Subnet

    A subnet is a group of IP addresses in a Virtual Private Cloud  (VPC) network that you can select when you create a virtual machine.

  2. (Optional) If you have added additional input variables in the workflow to receive inputs from the service requester, add questions that correspond to those variables.
  3. Save the changes.

Task 5: To publish the Google Cloud Platform service

  1. Log in to BMC Helix Digital Workplace Catalog.
  2. On the Services tab, click Services.
  3. In the My Services tab, select the Google Cloud Platform service.
  4. In the Service Options pane, click 22_1_Example_Icon for publishing service.png, and click Publish.
    image-2024-2-20_20-20-52.png

After you publish the service, the service is available to users.

Task 6: To test the Google Cloud Platform service

  1. Log in to BMC Helix Digital Workplace application.
  2. Submit a virtual machine creation request by using the Google Cloud Platform service.
    image-2024-2-20_19-49-39.png

Result

By using this service, users can submit Google virtual machine creation requests, which are processed automatically.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*