Azure: Agent Deployment (Beta)

How-to create and register

πŸ“

Prerequisites

  1. You are an admin in Azure and have installed Terraform (>= 1.3) with Azure Authentication (for step 1).
  2. You are an Account Owner (for step 2).

This guide outlines how to setup an Agent (with object storage) in your Azure cloud.

The FAQs answer common questions like how to review resources and what integrations are supported.

Steps

1. Deploy the Agent

You can use the mcd-agent Terraform module to deploy the Agent and manage resources as code (IaC).

For instance, using the following example Terraform config:

module "apollo" {
  source  = "monte-carlo-data/mcd-agent/azurerm"
  version = "0.1.3"
}

output "resource_group" {
  value       = module.apollo.mcd_agent_resource_group_name
  description = "Agent service resource group."
}

output "function_url" {
  value       = module.apollo.mcd_agent_function_url
  description = "The URL for the agent."
}

output "function_name" {
  value       = module.apollo.mcd_agent_function_name
  description = "Agent function name."
}

You can build and deploy via:

terraform init && terraform apply

Please note that this module is configured to delete all resources when the resource group is deleted (e.g., when executing terraform destroy). Ensure you review your resources and take appropriate measures before proceeding. For more information, see here.

When deploying an agent, if you wish to connect to a VNet, please see the details here. Specifying a VNet is not strictly required to run the agent, but it enables certain connectivity scenarios, such as when you have an IP allowlist for your resource, want to peer, use PrivateLink for egress, or deploy within your existing network.

Additional module inputs, options, and defaults can be found here. Other details can be found here.

2. Register the Agent

After deploying the agent you can register either via the Monte Carlo UI or CLI.

And see here for examples on how to retrieve Terraform output (i.e. registration input). Note that the Application Key is the "Default Host Key" in Azure Function Apps.

After this step is complete all supported integrations will automatically use this agent (and object store for troubleshooting and temporary data). You can add these integrations as you normally would using Monte Carlo's UI wizard or CLI.

UI

πŸ‘

If you are onboarding a new account, you can also register by following the steps on the onscreen


  1. Navigate to settings/integrations/agents and select the Create button.
  2. Follow the onscreen wizard for the "Azure" Platform and "Data Store + Agent" Type.
Azure Agent Registration Wizard

Azure Agent Registration Wizard

CLI

Use montecarlo agents register-azure-agent to register.

See reference documentation here. And see here for how to install and configure the CLI.

montecarlo agents register-azure-agent --url https://mcd-agent-service-example.azurewebsites.net --app-key -1

FAQs

What integrations does the Agent support?

The agent supports all integrations except for the following:

  • Data Lake Query Logs from S3 Buckets are not supported: Learn more.
  • Tableau requires using the connected app authentication flow: Learn more.

Note that onboarding (connecting) any supported integration will use the agent if one is provisioned. Otherwise, any other integrations will use the cloud service to connect directly.

Some integrations, such as dbt Core, Atlan, and Airflow, either leverage our developer toolkit or are managed by a third party and do not require an agent. These integrations natively push data to Monte Carlo, so an agent is not needed.

Can I use more than one Agent?

Yes, please reach out to [email protected] or contact your account representative if you would like to use more than one.

Can I review agent resources and code?

Absolutely! You can find details here:

How do I retrieve registration input from Terraform?

The endpoint (url) can be retrieved via: terraform output function_url.

The application key (default) can be fetched via the az functionapp keys list command using the function name and resource group from terraform output. For instance:

az functionapp keys list -g $(terraform output -raw resource_group) -n $(terraform output -raw function_name) | jq -r '.functionKeys.default'

If you prefer this value can also be retrieved from the Azure portal from Function Apps service page. For instance:

Azure portal example

Azure portal example

How do I monitor the Agent?

The Agent automatically generates a log of all operations, which can retrieved via this CLI command or the Azure portal from the Function Apps service page.

Operational metrics can similarly be retrieved from the Function Apps service page.

How do I upgrade the Agent?

If you have opted out of remote upgrades (i.e. set remote_upgradable = false) you can upgrade the agent image by setting the image variable in the module.

Please reach out to your Monte Carlo representative or support at [email protected] for the correct tag for your deployment.

Otherwise, and by default, Monte Carlo will automatically manage upgrades for you. If you prefer to manually upgrade, you can do so using the upgrade command on the CLI or the "Upgrade" button from the hamburger menu in the UI. Alternatively, if you're using the Azure console, you can follow these steps:

  1. Navigate to Function -> Deployment -> Deployment Center.
  2. Update the "Full Image Name and Tag" to montecarlodata/agent:latest-azure.
  3. Save your changes.

Please note that the version displayed in the Monte Carlo UI may take 1-2 hours to update. However, you can always fetch the latest version and other details by running a reachability test. For more information, see details.

Can I further constraint inbound access (ingress) to the Agent?

Absolutely! By default this is done via the function app key, but if you prefer you can further restrict requests via an IP allowlist. For instance you can:

  1. Please refer to the documentation for the list of IP addresses that need to be allowlisted for your platform version.
  2. Update the configuration for the agent's function app. For instance on the Azure portal*:
    1. Navigate to the Networking setting and select the "Public network access" configuration.
    2. Update the network access to "Enabled from select virtual networks and IP addresses" and add a rule for the IP address from step #1. Save your configuration.

*Note that changes made on the Azure portal might be reverted via Terraform. You might want to consider using the ip_restriction block to manage as code.

For more information on connectivity, please refer to our Network Connectivity documentation.

Can I use private endpoints to configure inbound access (ingress) to the agent?

Yes, please refer to the documentation for more details.

Can I further constraint outbound access (egress) from the Agent?

Absolutely! As with any Azure Function, you can control egress in multiple ways. You can find more details here.

Some scenarios where you might want to do this can include:

  1. You want to allowlist IP connectivity between the agent and your resource.
  2. You want to deploy the agent in a new VNet with peering and/or set up a Private Link between services.
  3. You want to deploy the agent in your existing VNet.

Depending on your integration, this might be necessary to establish connectivity.

To connect the agent to a VNet, specify a subnet using the subnet_id variable in the module (version 0.1.3 or newer required). If needed, you can use this Azure CLI command to fetch the subnet ID.

Note that the subnet must already be delegated to Microsoft.Web/serverFarms, or the deployment will fail.

How do I check the reachability between Monte Carlo and the Agent?

Reachability is automatically validated during registration. However, you can also test it at any time using this CLI command or the "Test" button from the hamburger menu in the UI.

How do I debug connectivity between the Agent and my integration?

Please refer to the documentation here.