Azure Game Streaming VM management
Gamezure is a serverless application/API, which allows you to define a Pool of VMs; with an additional API call, Gamezure will take care of having as many VMs as specified in that pool - see docs below. The pool not only consists of the created VMs, but also of two networks, two NICs per VM and a network security group for each of those networks, the machines have an internal network (e.g. for gameservers) and an external interface, reachable from the public Internet. The API is built using C# and Azure Functions, making use of the Durable Functions framework. Data is stored in a Cosmos Db, which uses serverless billing to reduce the baseline cost, as there is not much happening on database side.
Name | Description |
---|---|
AZURE_SUBSCRIPTION_ID |
Azure Subscription ID; id property when executing az account show |
AZURE_TENANT_ID |
Azure Tenant ID; tenantId property when executing az account show |
TF_VAR_sp_client_id |
ID of the Azure Service Principal who should have permissions to change the VM pool, appId in az ad sp list --show-mine |
terraform init -backend-config='.\config\backend.local.config.tf'
terraform apply
- An Azure Subscription
- An Azure Service Principal
- .NET Core 3.1 SDK
- CosmosDB, either on Azure, or using the CosmosDB Emulator
- Azure BlobStorage, or use Azurite as a local storage emulator.
{{BASE_URI}}/AddPool?code={{AZURE_FUNCTION_KEY}}
With a body consisting like the following example JSON:
{
"id": "pool-2",
"resourceGroupName": "rg-pool1-test",
"location": "westeurope",
"desiredVmCount": 2
}
{{BASE_URI}}/CreateVmOrchestrator_HttpStart??code={{AZURE_FUNCTION_KEY}}&poolId={{poolId}}