Azure Subscription Linking
#
IntroductionAzure subscription linking creates the required Rimo3 resources for testing with the Rimo3 Cloud platform in a customer's own Azure subscription. This enables applications being tested to have access to backend systems such as databases and license servers.
The Rimo3 resources that are created are:
- The Gateway - which facilitates secure communication between the Web Host and the Task Tunners
- Task Runners - the testing resources that execute test workloads
note
With the introduction of on demand task runner provisioning and deprovisioning task runners are only recreated when needed and are disposed of when no longer required.
Linking an Azure Subscription to a Rimo3 Tenant is done in 2 steps:
- Populate the settings.json file
- Execute the Create-R3AzureLinkedSubscription.ps1 script
The above files are described in detail below.
#
Understanding the settings.json fileThe settings.json file is used by the Tenant Creation Script to populate variables. Instead of having to edit the script directly, the variable information that is required to connect to the customer tenant and create the necessary resources is easily edited here.
A sample settings.json file is shown below.
- AzureTenant is the tenant ID that can be found in the Azure Portal under Azure Active Directory – Tenant ID.
- AzureSubscription is the subscription ID found in the Azure Portal under Subscriptions.
- AzureRegion is used to specify where the Azure Region where the virtual machines necessary to use Rimo3 will be located.
- AzureProjectName is supplied by Rimo3 and should not be edited. This is a prefix used by Rimo3 to identify resources created in the customer tenant by Rimo3. For example, the resource group created by the script would be r3prj-Rimo3Tenant-rg.
- TenantName is supplied by Rimo3 and should not be changed. This refers to the tenant created by Rimo3 for the customer in the Rimo3 back end.
- HostUrl is supplied by Rimo3 and should not be changed. This is the URL used by the Gateway virtual machine to communicate with Rimo3.
- SubNetAddressPrefix The script will create a new subnet within the customer tenant. This information is supplied by the customer to align with their networking.
- RdpipAddresses is used in the Network Security Group to secure RDP to only allow from the specified IP address(s). The prepopulated address is supplied by Rimo3 and is included for support but is not required. The customer can define a list of IP addresses for their own support and management or include both theirs and the Rimo3 address. The Gateway virtual machine is not given a public IP address.
important
settings.json must be saved to the same location as the resource creation script.
#
Understanding the Create-R3AzureLinkedSubscription.ps1 scriptThis is the script that is run against the customer tenant to create the necessary Azure resources to be able to use Rimo3. The script uses only publicly available Azure PowerShell cmdlets. This section will break down each step of the PowerShell script.
To Successfully Run the Script the PowerShell execution policy must be set to Unrestricted:
The person running the script should be an Owner of the Azure subscription.
#
Connect to Azure Subscription & Assign VariablesThis section is connecting to Azure and importing the data from the settings.json and creating the variables that will be used in the rest of the script.
You will be prompted to "Remove all accounts and subscriptions in all sessions for the current user?" this is only clearing active connections to Azure to ensure that we login to the correct subscription in the next step. You will then be prompted for Azure credentials, these need to be for a user who is a Subscription Owner to ensure that the script can properly assign roles.
#
Provide CredentialsHere the customer is prompted for two sets of credentials:
The first prompt for credentials will be for the Gateway virtual machine that will be created. This is provided by the customer and can be whatever they prefer. This account is used to autologin and allow the Gateway components to run.
The second set of credentials are the credentials created by the customer when they registered on the Rimo3 Portal. These credentials are used to register the Gateway with the Rimo3 Portal.
#
Resource Group, Storage Account and File Share CreationThese next few sections the script is creating the resource group, a storage account, file share and saving the Access Key to the Key Vault.
note
By default, the file share has a quota of 50GB but the quota can be edited or the Quota line can be removed as preferred (see below).
info
Proxy servers can sometimes prevent the Access Key from being saved to the Azure Key Vault. If an error occurs stating "Unable to add the Storage Account Access Key to the Azure Storage Vault" then you can manually add the Access Key via the Edit Tenant screen in your Rimo3 Cloud Tenant. You will need Admin rights to your tenant to set the Storage Account Access Key.
#
Subnet, Network Security Group, and virtual Network CardThese sections create the Subnet, Network Security Group and rules, and the virtual network card.
There is an inbound and outbound rule named SignalR that is for communication between the Gateway and Rimo3 portal. The port used is 5000.
There is an Inbound RDP rule to allow the RDPIPAddress specified in the settings.json file to be able to access the subnet through port 3389 but there is no public IP address assigned to the virtual machine.
note
The rule is in place if support by Rimo3 is required and access to the Gateway is required. At that time, a public IP can be assigned temporarily for support.
#
Gateway Virtual Machine Creation and Role AssignmentThe last part of the script creates the Gateway virtual machine, assigns a custom extension to configure the virtual machine after it boots, and then assigns the Gateway as ‘Owner’ of the resource group. This is accomplished by enabling system managed identity which gives it its own entry in the customers Azure Active Directory. the Gateway virtual machine This role is required for the Gateway to be able to create Task Runners and manage other tasks within the resource group as required.
System manage ID enabled so it will get an entry in the customers Azure Active Directory.
#
Further Information and SupportFor further information or if you have any issues with the resource creation script please contact technicalsupport@rimo3.com