Skip to content

Instantly share code, notes, and snippets.

@marrobi
marrobi / storageprofile.json
Created August 10, 2017 16:16
ARM Storage Profile
"storageProfile": {
"imageReference": {
"publisher": "Canonical",
"offer": "UbuntuServer",
"sku": "16.04.0-LTS",
"version": "latest"
},
"osDisk": {
"name": "myOSDisk",
"createOption": "FromImage"
@marrobi
marrobi / nsg.json
Created August 10, 2017 10:11
ARM Network Security Group
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Network/networkSecurityGroups",
"name": "VMSecurityGroup",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "VMSecurityGroup"
},
"properties": {
"securityRules": [
@marrobi
marrobi / Configure-AzureWinRMHTTPS.ps1
Last active June 26, 2017 10:15
Configure-AzureWinRMHTTPS
function Configure-AzureWinRMHTTPS {
<#
.SYNOPSIS
Configure WinRM over HTTPS inside an Azure VM.
.DESCRIPTION
1. Creates a self signed certificate on the Azure VM.
2. Creates and executes a custom script extension to enable Win RM over HTTPS and opens 5986 in the Windows Firewall
3. Creates a Network Security Rules for the Network Security Group attached the the first NIC attached the the VM allowing inbound traffic on port 5986
.EXAMPLE
Configure-AzureWinRMHTTPS -ResourceGroupName "TestGroup" -VMName "TestVM"
@marrobi
marrobi / dependson.json
Created June 22, 2017 12:29
Depends On Nested
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', 'ACR')]"
],
@marrobi
marrobi / acrinputs.json
Created June 22, 2017 12:27
ACR Inputs
"registryServer": {
"value": "[reference(resourceId('Microsoft.Resources/deployments','ACR')).outputs.registryServer.value]"
},
"registryUsername": {
"value": "[reference(resourceId('Microsoft.Resources/deployments','ACR')).outputs.registryUsername.value]"
},
"registryPassword": {
"value": "[reference(resourceId('Microsoft.Resources/deployments','ACR')).outputs.registryPassword.value]"
},
@marrobi
marrobi / acr.json
Created June 22, 2017 12:09
ACR Tempalte
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"registryName": {
"type": "string",
"metadata": {
"description": "The name of the container registry."
}
},
@marrobi
marrobi / outputs.json
Created June 22, 2017 10:48
ACR Outputs
"outputs": {
"registryServer": {
"value": "[reference(resourceId('Microsoft.ContainerRegistry/registries',parameters('acrName'))).loginServer]",
"type": "string"
},
"registryUsername": {
"value": "[parameters('acrName')]",
"type": "string"
},
"registryPassword": {
@marrobi
marrobi / geoservervm.json
Created June 12, 2017 15:41
GeoServer VM
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"type": "string",
"metadata": {
"description": "User name for the Virtual Machine."
}
},
@marrobi
marrobi / childresources.json
Last active June 12, 2017 15:39
Child Resources
"properties":{
...stuff_exists_here
},
"resources": [
...we_will_put_our_extension_here
]
@marrobi
marrobi / geoserver.json
Created June 12, 2017 15:23
Azure Docker VM extension for GeoServer
{
"type": "extensions",
"name": "DockerExtension",
"tags": {
"displayName": "DockerExtension"
},
"apiVersion": "2016-03-30",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines/', variables('vmName'))]"