Azure: Agent Deployment
How-to create and register
Prerequisites
- You are an admin in Azure and have installed Terraform (>= 1.3) with Azure Authentication (for step 1).
- 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 = "1.0.2"
}
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 using this deployment 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
- Navigate to settings/integrations/agents and select the
Create
button. - Follow the onscreen wizard for the "Azure" Platform and "Data Store + Agent" Type.
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 using this deployment 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:
How do I monitor the Agent?
Please refer to the documentation here.
How do I upgrade the Agent?
Please refer to the documentation here.
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:
- Please refer to the documentation for the list of IP addresses that need to be allowlisted for your platform version.
- Update the configuration for the agent's function app. For instance on the Azure portal*:
- Navigate to the Networking setting and select the "Public network access" configuration.
- 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:
- You want to allowlist IP connectivity between the agent and your resource.
- You want to deploy the agent in a new VNet with peering and/or set up a Private Link between services.
- 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?
Please refer to the documentation here.
How do I debug connectivity between the Agent and my integration?
Please refer to the documentation here.
Updated about 1 month ago