Cobrowse.io Docs
  • Getting started
  • SDK Installation
    • Web
    • iOS
    • Android
    • React Native
    • Flutter
    • .NET Mobile
    • macOS
    • Windows
  • SDK Features
    • Account config
    • Identify your devices
    • Use 6-digit codes
    • Redact sensitive data
    • Viewing PDFs
    • Universal Cobrowse
    • Customize the interface
      • Active session controls
      • 6-digit code screen
      • User consent dialog
      • Remote control consent dialog
      • Full device consent dialog
      • Localization / translation
    • Initiate sessions with push
    • Listening for events
    • Full device capabilities
      • Full device screen sharing
      • Full device remote control
      • Managing full device mode
    • Advanced configuration
      • Starting and stopping the SDK
      • Declaring capabilities
      • Intercepting mobile SDK network requests
      • Web
        • IFrames support
        • IE 11 polyfills
        • Cross-domain session support
        • Ignore Views
      • iOS
        • Alternate render method
        • Custom touch handling
      • Android
        • Backporting TLS to older Android versions
  • Agent-side integrations
    • Agent-side overview
    • Platform integrations
      • Zendesk
      • Salesforce
        • Migrating from legacy to v2
        • Salesforce (Legacy)
      • Genesys
        • Genesys Cloud
        • Engage Workspace Web Edition (WWE)
        • Engage Workspace Desktop Edition (WDE)
      • Intercom
      • Freshworks
      • Talkdesk
      • NICE
    • Custom integrations
    • Agent SDK
      • API Reference
      • Sample code snippets
    • Authentication (JWTs)
      • JWT Policies
    • Authentication (SAML 2.0)
    • IFrame embeds
  • Enterprise self-hosting
    • Self-hosting overview
    • Docker Compose
    • Helm chart
      • Image Pull Secret
      • Environment Variables
      • Optional recording components
      • Pod Annotations
    • AWS terraform
      • AWS metrics configuration
    • Azure terraform
      • Azure metrics configuration
    • GCP terraform
      • GCP metrics configuration
    • Sizing guidelines
    • Running your instance
      • Adding a superuser
      • Limiting account creation
      • Limiting magic link recipients
      • Configuring SMTP
      • Managing your deployment
    • Monitoring your instance
      • Available metrics
      • Self-Hosted Prometheus
    • Advanced configuration
      • Air gap configuration
      • Pin web SDK version
      • L7 firewall configuration
      • Docker proxy configuration
    • Troubleshooting
Powered by GitBook
On this page
  • Initial Setup
  • Installation steps
  • 1. Database setup
  • 2. Set up the Azure CLI
  • 3. Create initial Azure resources
  • 4. Generate the config directory
  • 5. Deploy the Terraform
  • 6. Configure your DNS provider and SSL certificate
  • 7. Check your deployment
  • Managing your deployment

Was this helpful?

  1. Enterprise self-hosting

Azure terraform

Learn how to use Terraform for Azure to set up Cobrowse Enterprise in your cloud.

PreviousAWS metrics configurationNextAzure metrics configuration

Last updated 7 months ago

Was this helpful?

This is the documentation for how to use our Terraform for Azure to set up Cobrowse Enterprise in your cloud.

Initial Setup

You will need the following installed locally:

  • – at least

  • Azure CLI

  • kubectl

Installation steps

These are the steps you'll need to go through to get Cobrowse running:

1. Database setup

The first thing you'll need is access to a MongoDB database. Cobrowse will need a connection string containing the address and authentication information for your cluster.

A MongoDB cluster is required for running Cobrowse. We do not provide this as part of the terraform environment.

You will need to create a cluster and provide the connection URL as a part of the Cobrowse configuration. You can either and manage the deployment and backups yourself. Alternatively, we recommend using a hosted service such as . They have a required by many enterprises with compliance requirements.

2. Set up the Azure CLI

Terraform requires the Azure CLI to be installed and authenticated.

3. Create initial Azure resources

There are some resources that are not created by our Terraform. You will need to manually create:

  1. A storage bucket to save terraform state (this is optional but strongly recommended)

  2. Add a secret in the key vault called "mongo-url" with the value set to the url of the Mongo database from step 1.

Azure CLI Examples

# 1. Create a resource group (replace <your location> with your Azure region)
az group create --location <your location> --name CobrowseEnterprise

# 2. Create a key vault
az keyvault create --resource-group CobrowseEnterprise --name CobrowseEnterpriseKV

# 3. Add a secret in the key vault called "mongo-url"
az keyvault secret set --vault-name CobrowseEnterpriseKV --name mongo-url --file ./mongo-url.txt

4. Generate the config directory

We have provided a small command line utility to help you get started. This utility will gather the required config for your deployment. Run the following command from your terminal:

npx cobrowse-enterprise create azure ./example

You can replace "./example" with the directory where you wish to save the configuration data. The directory will be created if it does not exist yet.

5. Deploy the Terraform

Once you have successfully generated a configuration directory via our command line utility you are then ready to deploy the terraform to Azure. Navigate to the configuration directory you created and run the following commands:

terraform init

This will instruct terraform to prepare the resources it needs to deploy. Run the following command to start the deployment of resources to Azure:

terraform apply

This will list the modifications that terraform will make to your Azure account. If that looks good, type 'yes' to continue the deployment.

Configure kubectl

kubectl is an essential utility for navigating and inspecting the kubernetes cluster deployed with the terraform scripts. Once the terraform finishes applying, we recommend installing and configuring kubectl to communicate with the kubernetes cluster.

If you have not installed kubectl you can do so by running:

az aks install-cli

Once installed, you can configure it by running:

az aks get-credentials --resource-group CobrowseEnterprise --name cobrowse-enterprise

When complete, test that it works by running:

kubectl get pod

6. Configure your DNS provider and SSL certificate

Configure your DNS provider with an A record to point to the IP address provisioned by the terraform. We recommend doing this as soon as the IP is provisioned in the Azure portal to prevent DNS propagation delays, although this is not essential

Once the terraform is deployed and the DNS is configured you will have to wait for the certificate to be provisioned. Depending on DNS propagation delays this can take some time (usually between 5 minutes and an hour).

How is SSL Configured?

In practice, this means that upon initial deployment, a pod resource is polling your configured public service domain at the HTTP-01 path. Once the DNS provider configuration has finished propagating, the HTTP-01 challenge check will succeed and your SSL certificate will be issued.

Only once the SSL certificate is issued will an HTTPS listener be created for your deployment. Once complete, the Let's Encrypt resources used to verify your DNS name will be destroyed.

7. Check your deployment

Your Cobrowse instance should now be deployed. Head to /registeron your domain to create an account.

Managing your deployment

Next, learn about managing and upgrading your deployment.

the Azure CLI

the Azure CLI (hint: az login)

A resource group for Cobrowse. You create it via the cli or in the Azure portal:

A key vault for Cobrowse secrets. You can do this via the cli or in the Azure portal:

Make sure you have with your access credentials.

Warning: This will store all Terraform state locally. We strongly recommend configuration for almost all deployment scenarios.

The terraform automatically creates an SSL certificate for you using the .

Terraform
NodeJS
minimum LTS version
run your own MongoDB cluster
MongoDB Atlas
range of certifications
Install
Authenticate
https://portal.azure.com/#blade/HubsExtension/BrowseResourceGroups
https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.KeyVault%2Fvaults
initialized the Azure CLI
adding a backend
Let's Encrypt HTTP-01 challenge
Running your instance
Managing your deployment