Skip to main content

Set up Azure Integration

Automate TurboScale helps you to create a browser automation grid hosted on your Azure account. With this setup, you get a self-hosted, private and auto-scaling grid that supports browser automation testing at scale with on-demand resource consumption along with other tools to monitor the grid utilization.

Use this document if you want to set up a browser automation grid from scratch. This document explains the steps required to create a custom role, app and service principal on Azure to generate secrets with relevant permissions to create and manage a fully functional grid with dependent services using BrowserStack CLI.

Setting up your Azure Account

Once you visit our setup guide, you can select the desired region to set up your automation grid on Azure. Once you’ve selected the region, you need to create a new custom role and service principal with the secret.

  • Use the correct Azure account where BrowserStack can create your automation grid and make use of relevant services like AKS, and Azure Blob storage for different grid-related functionalities.
  • The recommendation is to use the same account where development or staging services are hosted.

Create custom Role

Once you’ve selected the region, you can start the process of creating a new custom user on your Azure account using the ARM Template Link.

In a new window, you’ll be prompted to sign into your Azure account to complete the setup. Once you sign in, The template will create the required custom role user with the name turboscale-custom-role in your Azure account.

This is just a user creation template and it will not yet set up any compute resources in your Azure account.

Creating a Service Principal in the Azure Portal

A Service Principal is an application within Azure Active Directory whose authentication tokens can be used as the client_id, client_secret, and tenant_id fields needed by BrowserStack CLI (subscription_id can be independently recovered from your Azure account details).

There are three tasks necessary to create a Service Principal using the Azure Portal:

  1. Create an Application in Azure Active Directory, which will create an associated Service Principal.
  2. Generating a Client Secret for the Azure Active Directory Application, which you’ll to authenticate.
  3. Attach the custom role created above to the Service Principal and Grant the Service Principal access to manage resources in your Azure subscriptions.

1. Creating an Application in Azure Active Directory

Firstly navigate to the Azure Active Directory overview within the Azure Portal. Click the New Registration button at the top to add a new Application within Azure Active Directory. On this page, set the following values then press Create:

  • Name - This is a friendly identifier and can be anything (e.g. “turboscale-service-principal”)
  • Supported Account Types - this should be set to “Accounts in this organizational directory only (single-tenant)”

At the top of this page, you’ll need to take note of the “Application (client) ID” and the “Directory (tenant) ID”, which you can use for the values of client_id and tenant_id respectively.

2. Generating a Client Secret for the Azure Active Directory Application

After Step 1, the new application should be visible in your account. Now we can create a Client Secret which can be used for authentication - to do this select Certificates & secrets.

On this screen, click the New client secret button, enter a Description, select an Expiry Date, and then press Add. Once the Client Secret has been generated it will be displayed on screen - this is only displayed once so be sure to copy it now (otherwise you will need to regenerate a new secret). The value displayed is the client_secret you will need it.

3. Attach a custom role to the Service Principal and Grant access to manage resources

Navigate to the Subscriptions section within the Azure Portal, then select the Subscription you wish to use, click Access Control (IAM), and finally Add > Add role assignment.

Select the role turboscale-custom-role created using the ARM template link and click the option Select members. Secondly, search for and select the name of the Service Principal (turboscale-service-principal) created in Azure Active Directory to assign and then press Save.

You can now use this client_id, client_secret, tenant_id and subscription_id from Azure Portal with BrowserStack CLI to create and manage your grids.

Troubleshooting

Visibility on Resources

BrowserStack adds Azure tags whenever a new resource(Compute or Non-Compute) is being created as part of Automate TurboScale in your Azure account.

Tags are key-value pairs that you can use to view your Azure resources and identify, organize, or search for resources. Here is a list of tags added by BrowserStack on all the resources.

Tag Key Tag value
browserstack:managedBy BrowserStack
browserstack:service BrowserStack-Automate-TurboScale
browserstack:grid <grid name> used while creating a browser Automation Grid
browserstack:cluster <cluster name> used while creating a browser Automation Grid
browserstack:creationDate Epoch Timestamp of resource creation

Contact Us

Need help? Reach out to us here.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy