-
-
Save justinyoo/acdfc3c854f21f4e10f56e3d9d75e4c7 to your computer and use it in GitHub Desktop.
Provisioning Applications on Azure Virtual Machine with Chocolatey for Live Streaming
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install Chocolatey | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
#Install Software | |
choco install microsoft-edge -y | |
choco install obs-studio -y | |
choco install obs-ndi -y | |
choco install skype -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
... | |
}, | |
"variables": { | |
... | |
}, | |
"resources": [ | |
{ | |
"comments": "=== STORAGE ACCOUNT ===", | |
"type": "Microsoft.Storage/storageAccounts", | |
... | |
}, | |
{ | |
"comments": "=== PUBLIC IP ADDRESS ===", | |
"type": "Microsoft.Network/publicIPAddresses", | |
... | |
}, | |
{ | |
"comments": "=== NETWORK SECURITY GROUP: DEFAULT ===", | |
"type": "Microsoft.Network/networkSecurityGroups", | |
... | |
}, | |
{ | |
"comments": "=== VIRTUAL NETWORK ===", | |
"type": "Microsoft.Network/virtualNetworks", | |
... | |
}, | |
{ | |
"comments": "=== NETWORK INTERFACE ===", | |
"type": "Microsoft.Network/networkInterfaces", | |
... | |
}, | |
{ | |
"comments": "=== VIRTUAL MACHINE ===", | |
"type": "Microsoft.Compute/virtualMachines", | |
"apiVersion": "[variables('virtualMachine').apiVersion]", | |
... | |
"properties": { | |
"hardwareProfile": { | |
"vmSize": "Standard_D8s_v3" | |
}, | |
... | |
"storageProfile": { | |
"imageReference": { | |
"publisher": "MicrosoftWindowsDesktop", | |
"offer": "Windows-10", | |
"sku": "20h1-pro-g2", | |
"version": "latest" | |
}, | |
... | |
}, | |
... | |
} | |
}, | |
{ | |
"comments": "=== VIRTUAL MACHINE EXTENSION: CUSTOM SCRIPT ===", | |
"type": "Microsoft.Compute/virtualMachines/extensions", | |
... | |
} | |
], | |
"outputs": {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"comments": "=== VIRTUAL MACHINE EXTENSION: CUSTOM SCRIPT ===", | |
"type": "Microsoft.Compute/virtualMachines/extensions", | |
"apiVersion": "[providers('Microsoft.Compute', 'virtualMachines/extensions').apiVersions[0]]", | |
"name": "[concat('mystreamingvm', '/config-app')]", | |
"location": "[resourceGroup().location]", | |
"dependsOn": [ | |
"[resourceId('Microsoft.Compute/virtualMachines', 'mystreamingvm')]" | |
], | |
"properties": { | |
"publisher": "Microsoft.Compute", | |
"type": "CustomScriptExtension", | |
"typeHandlerVersion": "1.10", | |
"autoUpgradeMinorVersion": true, | |
"settings": { | |
"fileUris": "https://raw.githubusercontent.com/devkimchi/LiveStream-VM-Setup-Sample/main/install.ps1" | |
}, | |
"protectedSettings": { | |
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File ', './install.ps1')]" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-AzResourceGroupDeployment ` | |
-Name <deployment-name> ` | |
-ResourceGroupName <resource-group-name> ` | |
-TemplateFile ./azuredeploy.json ` | |
-TemplateParameterFile ./azuredeploy.parameters.json ` | |
-Verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az group deployment create \ | |
-n <deployment-name> \ | |
-g <resource-group-name> \ | |
--template-file ./azuredeploy.json \ | |
--parameters ./azuredeploy.parameters.json \ | |
--verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment