Use Oomnitza workflows to complete actions in Google Cloud such as such as, starting, and stopping, resetting, and getting Google Cloud Platform instances.
Surface key information in operational dashboards and create scheduled reports to share knowledge with your colleagues.
Before you start
1. Your Google credentials
Before you can create the integration with Oomnitza, you need to have added your Google OAuth credentials to Oomnitza. For further information, see Adding Google (OAuth 2.0) credentials.
Please use the following scopes when working with the workflows:
https://www.googleapis.com/auth/compute.readonly-
https://www.googleapis.com/auth/compute -
https://www.googleapis.com/auth/cloud-platform
2. Field mappings
All of the following API presets assume that you have created standard field mappings as follows:
- GCP Project field is mapped to the custom Oomnitza asset field gcp_project
- GCP Zone field is mapped to the custom Oomnitza asset field gcp_zone
- GCP Instance Id field is mapped to the Oomnitza asset field serial_number
Creating the workflow
To create a workflow, you must complete these steps:
- Click Configuration > Workflows.
- Click Add
and select Assets from the Objects list.
- Edit the Begin Block and add rules to trigger the workflow.
- Click Edit on the API block and enter Google Cloud in the search field.
- Select a preset from the list below.
- Select your Google credentials.
- Enter any mandatory information when prompted.
- Select Advanced Mode and review the information in the Information and Body tab. You can map the API response in the Response tab.
- Connect the Blocks.
- Save, validate, and activate your workflow.
GCP get instance details
The GCP get instance details preset enables you to get CGP instance details.
Use the Advanced Mode to configure the message payload.
- In the API block window, click the Advanced Mode button located in the upper right of the window.
- In the Information tab, you will notice that the fields {gcp_project}, {gcp_zone} and {serial_number} are referenced in the URL path. It is assumed you mapped these Oomnitza fields to GCP fields when you created custom mappings.
- Select the Response tab. You have the option to map the Response fields to an Oomnitza field.
For further information, refer to the Google Cloud API Documentation: Method: instances.
Using the GCP reset instance preset
The GCP reset instance preset enables you to reset a GCP instance. Use the Advanced Mode to configure the message payload. To do this,
- In the API block window, click the Advanced Mode button located in the upper right of the window.
- In the Information tab, you will notice that the fields {gcp_project}, {gcp_zone} and {serial_number} are referenced in the URL path. It is assumed you mapped these Oomnitza fields to GCP fields when you created custom mappings.
- Select the Response tab. For troubleshooting purposes, you can map the Response field {{response}} to a custom long text Oomnitza field. Once you have the entire response, you can then map to individual JSON values to custom fields. To create a custom field, click Configuration > Data Model > Field Configuration and then select Users from the Objects list. For further information, see Creating Custom Fields in Oomnitza.
For further information, refer to the Google Cloud API Documentation: Method: instances.
Using the GCP start instance preset
The GCP start instance preset enables you to start a GCP instance. Use the Advanced Mode to configure the message payload by following the steps in Using the GCP reset instance preset.
For further information, refer to the Google Cloud API Documentation: Method: instances.
Using the GCP stop instance preset
The GCP stop instance preset enables you to stop a GCP instance. Use the Advanced Mode to configure the message payload by following the steps in Using the GCP reset instance preset.
For further information, refer to the Google Cloud API Documentation: Method: instances.
Additional instance operations
Check out the Google Cloud API Documentation on instances to create your own API presets or customize your existing API presets in Oomnitza.
Comments
0 comments
Please sign in to leave a comment.