Skip to content

Instantly share code, notes, and snippets.

View PlagueHO's full-sized avatar
😼
Working on Game Master Copilot using Semantic Kernel, Azure OpenAI and Blazor 8

Daniel Scott-Raynsford PlagueHO

😼
Working on Game Master Copilot using Semantic Kernel, Azure OpenAI and Blazor 8
View GitHub Profile
@PlagueHO
PlagueHO / AzureArcLinuxCustomScriptExtensions.json
Created August 23, 2020 04:11
Azure ARM Template to enable Azure Monitor Log Analytics Container Monitoring on a Linux Docker host in Azure Arc managed machines
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"MachineName": {
"type": "String"
},
"Location": {
"type": "String"
},
@PlagueHO
PlagueHO / EnableSendingContainerTelemetryToAzureMonitorLogAnalytics.sh
Last active August 23, 2020 03:31
Shell command to enable sending container telemetry to an Azure Monitor Log Analytics workspace
sudo docker run --privileged -d -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/containers:/var/lib/docker/containers -e WSID="<YOUR WORKSPACE ID>" -e KEY="<YOUR WORKSPACE KEY>" -h=`hostname` -p 127.0.0.1:25225:25225 --name="omsagent" --restart=always microsoft/oms:1.8.1-256
@PlagueHO
PlagueHO / Invoke-AzureArcLinuxMonitoringExtensionsArmDeployment.ps1
Last active August 23, 2020 01:39
PowerShell Command to deploy Azure Arc Monitoring Extensions using ARM Template
New-AzResourceGroupDeployment `
-ResourceGroupName '<NAME OF RESOURCE GROUP CONTAINING ARC MACHINES>' `
-TemplateFile ~/AzureArcLinuxMonitoringExtensions.json `
-TemplateParameterObject @{
MachineName = '<NAME OF AZURE ARC MACHINE>'
Location = '<LOCATION OF AZURE ARM MACHINE>'
WorkspaceId = '<WORKSPACE ID OF LOG ANALYTICS WORKSPACE>'
WorkspaceKey = '<WORKSPACE KEY OF LOG ANALYTICS WORKSPACE>'
}
@PlagueHO
PlagueHO / Download-AzureArcLinuxMonitoringExtensionsArm.ps1
Last active August 23, 2020 04:12
PowerShell script to download Azure ARM Template to deploy Microsoft Monitoring Agent extension to Azure Arc managed machines
Invoke-WebRequest -Uri https://gist.githubusercontent.com/PlagueHO/74c5035543c454daf3d28f33ea91cde0/raw/AzureArcLinuxMonitoringExtensions.json -OutFile ~\AzureArcLinuxMonitoringExtensions.json
@PlagueHO
PlagueHO / AzureArcLinuxMonitoringExtensions.json
Last active August 23, 2020 04:09
Azure ARM Template to deploy Microsoft Monitoring Agent extension to Azure Arc managed machines
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"MachineName": {
"type": "String"
},
"Location": {
"type": "String"
},
@PlagueHO
PlagueHO / Invoke-AzureArcOnboardingScript.ps1
Created August 22, 2020 09:08
Invoke Azure Arc Onboarding Script Generator
./Get-AzureArcOnboardingScript.ps1 -TenantId '<TENANT ID>' -SubscriptionId '<SUBSCRIPTION ID>' -Location '<LOCATION>' -ResourceGroup '<RESOURCE GROUP>'
@PlagueHO
PlagueHO / Download-AzureArcOnboardingScriptGenerator.ps1
Last active August 23, 2020 00:36
Download the Azure Arc onboarding script Generator PowerShell script
Invoke-WebRequest -Uri https://gist.githubusercontent.com/PlagueHO/64a2fd67489ea22b3ca09cd5bf3a0782/raw/Get-AzureArcOnboardingScript.ps1 -OutFile ~\Get-AzureArcOnboardingScript.ps1
@PlagueHO
PlagueHO / Get-AzureArcOnboardingScript.ps1
Last active October 25, 2020 05:45
PowerShell Function to create a Service Principal and return the script to onboard a machine to Azure Arc
[CmdletBinding()]
param (
[Parameter()]
[System.String]
$ServicePrincipalName = 'AzureArcMachineOnboarding',
[Parameter()]
[ValidateSet('Linux','Windows')]
[System.String]
$OperatingSystem = 'Linux',
@PlagueHO
PlagueHO / Deploy-AksClusterWithAadIntegration.ps1
Created August 8, 2020 05:01
PowerShell Command to deploy AKS Cluster ARM template with AAD Integration passing an Object Id of the Cluster Admins AD Group
New-AzResourceGroupDeployment `
-ResourceGroupName 'MyAksWithAad_RG `
-TemplateFile 'ArmTemplateAksClusterWithManagedAadIntegration.json' `
-TemplateParameterObject @{
clusterAdminGroupObjectIds = @( $clusterAdminGroupObjectIds )
}
@PlagueHO
PlagueHO / ArmTemplateAksClusterWithManagedAadIntegration.json
Created August 8, 2020 04:14
ARM Template for deploying an AKS Cluster with Managed AAD Integration
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterAdminGroupObjectIds": {
"defaultValue": [],
"type": "array",
"metadata": {
"description": "Array of Azure AD Group object Ids to use for cluster administrators."
}