How to Enable Azure Automations & Actions in Hyperglance

Find out how to deploy Automations from our Github repository, and connect them to your Hyperglance VM

Pre-Requisites

Before you can deploy automations you will need:

  1. Terraform CLI - Install instructions
  2. Azure CLI - Install instructions
  3. Func CLI - Install instructions

Azure role assignments

This deployment utilizes system assigned managed identities to limit the scope of the Azure function to the subscription it is deployed in.

To assign Azure roles to a managed identity, you must have:

  • Microsoft.Authorization/roleAssignments/write permissions

Storage account permissions

The account under which Hyperglance run needs to be able to write to the Storage Account used by the automations. This may be achieved by granting Hyperglance the Storage Account Contributor built-in role.

Quick Start

  1. Follow the pre-requisite steps above.

  2. Connect the Azure CLI to the Azure account that you wish to deploy the function in and set the subscription to use: az login

    Note: Guidance on authenticating to Azure can be found here

    Example:

     az login
    az account set --subscription <subscription name>
  3. Clone our repo or download the zip

     git clone https://github.com/hyperglance/azure-rule-automations.git
  4. Navigate to the terraform deployment directory

    cd azure-rule-automations/deployment/terraform/automations

    Create a a file subscriptions.csv with the subscriptions you want to act on separated by a comma.

    MySubscription, AnotherSubscriptionOfMine, ...
  5. Deploy the stack:

    Terraform will prompt for the region you wish to deploy to and for final confirmation.

     terraform init
    terraform apply
  6. Once complete, the storage account ID and will be returned:

    Apply complete! Resources: 11 added, 0 changed, 0 destroyed.

    Outputs:

    func_command = "func azure functionapp publish hyperglance-automations-legible-buffalo"
    storage_account_resource_id = "/subscriptions/<subscription ID>/resourceGroups/hyperglance-automations-legible-buffalo/providers/Microsoft.Storage/storageAccounts/rii5it09y343"

    The storage account ID is required to configure automations in Hyperglance The func command is required to deploy the function code to the Azure function

    Copy the storage account ID into the Hyperglance UI: Settings ➔ Automations ➔ Azure ➔ Storage Account Resource ID or visit this URL: https://your-hyperglance-ip/#/admin/automations

  7. Deploy the function code to the function

    Note: We're working on integrating this step into the Terraform deployment...

    Change directory to the root of the repo and execute the func command generated by Terraform:

     cd azure-rule-automations
    func azure functionapp publish hyperglance-automations-legible-buffalo
  8. That's it - Automations are now enabled against this subscription!

    • Within Hyperglance click on any rule or visit the Advanced Search page to start exploring automations features.