Skip to content

Commit

Permalink
Adding ARM template generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Kennedy committed Apr 12, 2015
1 parent 07dd8d9 commit 6480260
Show file tree
Hide file tree
Showing 1,447 changed files with 312,259 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ This guide is written in [Asciidoc](http://www.methods.co.nz/asciidoc/) and is b
To build it, from the project's top level directory, run ./gradlew asciidoctor

Then, open build/asciidoc/Microsoft-Azure-Deployment-guide.html in a web-browser.

The project also contains code for use with the Azure Resource Manager under src/arm.
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
var fragment = {
"name": "ChildCustomScriptExtensionFragment",
"publisher": "Microsoft",
"version": "0.1.0-preview",
"content": {
"parameters": {
"resourceName": {
"paths": [],
"required": true
},
"resourceLocation": {
"paths": [
"location"
],
"required": true
},
"apiVersion": {
"paths": [
"apiVersion"
],
"required": true
},
"virtualMachineName": {
"paths": [],
"required": true
},
"fileUris": {
"paths": [
"properties.parameters.public.fileUris"
],
"required": true,
"action": "arraypush"
},
"command": {
"paths": [
"properties.parameters.public.commandToExecute"
],
"required": true
}
},
"resource": {
"type": "Microsoft.ClassicCompute/virtualMachines/extensions",
"properties": {
"extension": "CustomScriptExtension",
"publisher": "Microsoft.Compute",
"version": "1.*"
}
},
"computeds": [
{
"paths": [
"name"
],
"template": "{virtualMachineName}/{resourceName}",
"required": true
}
],
"conditionals": {
"OS": {
"Linux": {
"path": "properties",
"resource": {
"extension": "CustomScriptForLinux",
"publisher": "Microsoft.OSTCExtensions",
"version": "1.*"
}
}
}
}
},
"$schema": "https://gallery.azure.com/schemas/2014-06-01/gallerytemplate.json#"
}

module.exports.fragment = fragment;
56 changes: 56 additions & 0 deletions src/arm/TemplateGenerator/Fragments/DataDiskFragment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
var fragment = {
"name": "DataDiskFragment",
"publisher": "Microsoft",
"version": "0.1.0-preview",
"content": {
"parameters": {
"storageBlobEndpoint": {
"paths": [],
"required": true
},
"domainName": {
"paths": [],
"required": true
},
"virtualMachineName": {
"paths": [],
"required": true
},
"diskSalt": {
"paths": [],
"required": true
},
"lun": {
"paths": [
"lun"
],
"required": true
},
"caching": {
"paths": [
"caching"
],
"required": true
},
"diskSize": {
"paths": [
"diskSize"
],
"required": true
}
},
"resource": {},
"computeds": [
{
"paths": [
"vhdUri"
],
"template": "[concat({storageBlobEndpoint}, 'vhds/{domainName}-{virtualMachineName}-data-{diskSalt}.vhd')]",
"required": true
}
]
},
"$schema": "https://gallery.azure.com/schemas/2014-06-01/gallerytemplate.json#"
}

module.exports.fragment = fragment;
33 changes: 33 additions & 0 deletions src/arm/TemplateGenerator/Fragments/DomainNameFragment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
var fragment = {
"name": "DomainNameFragment",
"publisher": "Microsoft",
"version": "0.1.0-preview",
"content": {
"parameters": {
"resourceName": {
"paths": [
"name"
],
"required": true
},
"resourceLocation": {
"paths": [
"location"
],
"required": true
},
"apiVersion": {
"paths": [
"apiVersion"
],
"required": true
}
},
"resource": {
"type": "Microsoft.ClassicCompute/domainNames"
}
},
"$schema": "https://gallery.azure.com/schemas/2014-06-01/gallerytemplate.json#"
}

module.exports.fragment = fragment;
67 changes: 67 additions & 0 deletions src/arm/TemplateGenerator/Fragments/InputEndpointFragment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
var fragment = {
"name": "InputEndpointFragment",
"publisher": "Microsoft",
"version": "0.1.0-preview",
"content": {
"parameters": {
"endpointName": {
"paths": [
"endpointName"
],
"required": true
},
"enableDirectServerReturn": {
"paths": [
"enableDirectServerReturn"
],
"required": false
},
"privatePort": {
"paths": [
"privatePort"
],
"required": true
},
"publicPort": {
"paths": [
"publicPort"
],
"required": false
},
"protocol": {
"paths": [
"protocol"
],
"required": true
},
"loadBalancedEndpointSetName": {
"paths": [
"loadBalancedEndpointSetName"
],
"required": false
},
"probePort": {
"paths": [
"probe.port"
],
"required": false
},
"probeProtocol": {
"paths": [
"probe.protocol"
],
"required": false
},
"probePath": {
"paths": [
"probe.path"
],
"required": false
}
},
"resource": {}
},
"$schema": "https://gallery.azure.com/schemas/2014-06-01/gallerytemplate.json#"
}

module.exports.fragment = fragment;
59 changes: 59 additions & 0 deletions src/arm/TemplateGenerator/Fragments/ServiceCertificateFragment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
var fragment = {
"name": "ServiceCertificateFragment",
"publisher": "Microsoft",
"version": "0.1.0-preview",
"content": {
"parameters": {
"domainName": {
"paths": [],
"required": true
},
"resourceName": {
"paths": [],
"required": true
},
"certificateData": {
"paths": [
"properties.data"
],
"required": true
},
"certificatePassword": {
"paths": [
"properties.password"
],
"required": false
},
"resourceLocation": {
"paths": [
"location"
],
"required": true
},
"apiVersion": {
"paths": [
"apiVersion"
],
"required": true
}
},
"resource": {
"type": "Microsoft.ClassicCompute/domainNames/serviceCertificates",
"properties": {
"certificateFormat": "pfx"
}
},
"computeds": [
{
"paths": [
"name"
],
"template": "{domainName}/{resourceName}",
"required": true
}
]
},
"$schema": "https://gallery.azure.com/schemas/2014-06-01/gallerytemplate.json#"
}

module.exports.fragment = fragment;
39 changes: 39 additions & 0 deletions src/arm/TemplateGenerator/Fragments/StorageAccountFragment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
var fragment = {
"name": "StorageAccountFragment",
"publisher": "Microsoft",
"version": "0.1.0-preview",
"content": {
"parameters": {
"resourceName": {
"paths": [
"name"
],
"required": true
},
"resourceLocation": {
"paths": [
"location"
],
"required": true
},
"apiVersion": {
"paths": [
"apiVersion"
],
"required": true
},
"accountType": {
"paths": [
"properties.accountType"
],
"required": true
}
},
"resource": {
"type": "Microsoft.ClassicStorage/storageAccounts"
}
},
"$schema": "https://gallery.azure.com/schemas/2014-06-01/gallerytemplate.json#"
}

module.exports.fragment = fragment;
Loading

0 comments on commit 6480260

Please sign in to comment.