Microsoft Azure

Microsoft Azure

Microsoft Azure is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers.

The documentation below explains how to configure Microsoft Azure cloud provider.

Azure Setup

Prerequisites

Before trying to configure Microsoft Azure, make sure you have:

  • A Microsoft Azure Account with a valid subscription.

Resource Group

Microsoft Azure Resource Group

The resource group is a container that holds related Azure resources.

How to create a resource group

  • Go to Resource Groups,
  • Click on Add,
  • In Basics section, select the subscription and enter octoperf in Resource group name,
  • Select the region where the group should be located (Here in (Europe) France Central),
  • Click on Review + Create.

The resource group must be named octoperf (all lowercase characters).

Enterprise Application

The next step is to create Azure application credentials so OctoPerf can programmatically start and stop virtual machines on Microsoft Azure. Please see How to Use Azure to create an application that can access resources.

Basically, you need to:

  • Create an Azure Application Registration in App Registrations with the name you want (Example: OctoPerf), Application type Web app / API and no sign-on URL needed,
  • Assign the newly created application a Contributor or equivalent so the application can create, start and stop virtual machines,
  • Create an Application Client Secret later used to authenticate from OctoPerf.

Once done, please keep a-side:

  • (Client) Application Id,
  • Client Secret,
  • Tenant Id,
  • And subscription Id.

Those information are needed to allow OctoPerf to connect to your Microsoft Azure account.

Virtual Networks

Microsoft Azure Virtual Network

A virtual network for each Azure Location is required. Virtual machines spinned up by octoperf are configured with this virtual network.

Creating a virtual network

  • Go to Virtual Networks,
  • Click on + Add,
  • Name the virtual network with octoperf- prefix followed by the location id. Example: octoperf-francecentral in France Central,
  • Enter Address Space. Example: 10.1.0.0/16,
  • Select octoperf resource group,
  • Select the location where to create the virtual network. Example: France Central,
  • Enter the Address Range. Example: 10.1.0.0/24,
  • DDos Protection set at your convenience. Defaults to Basic,
  • Service Endpoints and Firewall can be left as Disabled.

Make sure the name of the virtual network starts with octoperf-. Create a virtual network per location, preferrably named octoperf-location (replace location by the actual location).

Public IP Addresses

Microsoft Azure Public IP Address

Public IP addresses must be configured per virtual network.

Creating Public IP Addresses

  • Open Public IP Addresses,
  • Click on + Add,
  • Name it with octoperf- prefix, followed by the location id (Example: octoperf-francecentral),
  • Select SKU, IP Version and IP address Assignment relevant to you case,
  • Assign it to octoperf resource group,
  • Select the location.

Repeat this operation for each location in which you would like to start / stop virtual machines from OctoPerf.

Virtual Machine Images

Microsoft Azure Virtual Machine Image

OctoPerf requires that you setup a virtual machine image per location. This virtual machine image should preferrably have:

Creating A Virtual Machine Image

  • Start a virtual machine with Ubuntu operating system in the target location where the image will be stored,
  • SSH into the virtual machine,
  • Install Docker, pull docker images,
  • From Azure portal, create the virtual machine image and name it with octoperf- prefix. Example: octoperf-francecentral.

This step is mandatory: OctoPerf needs a custom linux image to create and start virtual machines on Azure.

Azure Provider

Azure Settings

Microsoft Azure Provider

The final step is to create the Microsoft Azure provider from OctoPerf UI:

  • Click on your account menu, then Private Hosts,
  • Click on + Add Provider button, then Microsoft Azure,
  • Enter the relevant information being asked.

Azure requires the following settings:

  • Application (client) ID: id of the application,
  • Client Secret: the secret password generated when creating the Azure enterprise application,
  • Directory (tenant) ID: tenant ID,
  • Subscription ID: id of the subscription to use,
  • Environment: Azure by default,
  • Resource Group: octoperf by default,
  • SSH: virtual machines created by OctoPerf can be sshed using the settings provided here,
  • SSH User: username to use to ssh into the virtual machine instance from outside,
  • SSH Password or Public Key: Either a password or an SSH public key.

Instance Types

The following Instances are available:

  • SMALL: cloud instance with about 2GB RAM, (STANDARD_B1MS used)
  • MEDIUM: cloud instance with about 4GB RAM, (STANDARD_B2S used)
  • LARGE: cloud instance with about 8GB RAM, (STANDARD_D2_V3 used)
  • XLARGE: cloud instance with about 16GB RAM. (STANDARD_D4_V3 used)

Select the instance which suits your needs. Smaller instances can simulate less concurrent users.

Shutdown Policy

The shutdown policy specifies the minimum amount of time a cloud instance should be running before being eligible for automatic shutdown.

Example: shutdown specified after 55min.

Info

Only idle machines (not running load tests) are eligible for shutdown. OctoPerf waits until the test ends before shutting the instance down.

Memory Usage

Memory Usage

These settings are the same as for the self-hosted provider.

Regions

Microsoft Azure Provider

OctoPerf automatically detected your Azure locations based on a naming convention. OctoPerf expects that you have in each location you want to use:

  • a virtual machine image prefixed with octoperf-,
  • a virtual network prefixed with octoperf-,
  • a subnet with the name of your choice, usually default,
  • a public IP address prefixed with octoperf-.

If no location is being pre-configured, make sure you followed all the steps in Azure Setup prior to trying to configure Azure in OctoPerf.