This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
404 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,256 @@ | ||
{ | ||
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"adminUserName": { | ||
"type": "string", | ||
"defaultValue": "azureSample", | ||
"metadata": { | ||
"description": "User name for the Virtual Machine." | ||
} | ||
}, | ||
"sshKeyData": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "SSH rsa public key file as a string." | ||
} | ||
}, | ||
"dnsLabelPrefix": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Unique DNS Name for the Public IP used to access the Virtual Machine." | ||
} | ||
}, | ||
"vmSize": { | ||
"type": "string", | ||
"defaultValue": "Standard_D1", | ||
"metadata": { | ||
"description": "Size of the VM" | ||
} | ||
}, | ||
"vmName": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Name of the VM" | ||
} | ||
}, | ||
"imagePublisher": { | ||
"type": "string", | ||
"defaultValue": "canonical", | ||
"metadata": { | ||
"description": "Name of the image publisher" | ||
} | ||
}, | ||
"imageOffer": { | ||
"type": "string", | ||
"defaultValue": "ubuntuserver", | ||
"metadata": { | ||
"description": "Name of the image offer" | ||
} | ||
}, | ||
"imageSku": { | ||
"type": "string", | ||
"defaultValue": "16.04.0-DAILY-LTS", | ||
"metadata": { | ||
"description": "Name of the image sku" | ||
} | ||
}, | ||
"imageVersion": { | ||
"type": "string", | ||
"defaultValue": "latest", | ||
"metadata": { | ||
"description": "Name of the image sku" | ||
} | ||
}, | ||
"subnetName": { | ||
"type": "string", | ||
"defaultValue": "azsample-subnet", | ||
"metadata": { | ||
"description": "Name of the subnet" | ||
} | ||
}, | ||
"virtualNetworkName": { | ||
"type": "string", | ||
"defaultValue": "azsampleVNET", | ||
"metadata": { | ||
"description": "Name of the virtual network" | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'azsample')]", | ||
"location": "[resourceGroup().location]", | ||
"osDiskName": "osDisk1", | ||
"addressPrefix": "10.0.0.0/16", | ||
"subnetPrefix": "10.0.0.0/24", | ||
"vmStorageAccountContainerName": "azsample-vhds", | ||
"nicName": "[concat(parameters('vmName'), '-azsampleNIC')]", | ||
"publicIPAddressName": "[concat(parameters('vmName'), '-azsamplePublicIP')]", | ||
"publicIPAddressType": "Dynamic", | ||
"storageAccountType": "Standard_LRS", | ||
"networkSecurityGroupName": "[concat(parameters('vmName'), '-azsampleNSG')]", | ||
"sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", | ||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", | ||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('subnetName'))]", | ||
"apiVersion": "2015-06-15" | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Storage/storageAccounts", | ||
"name": "[variables('storageAccountName')]", | ||
"apiVersion": "[variables('apiVersion')]", | ||
"location": "[variables('location')]", | ||
"properties": { | ||
"accountType": "[variables('storageAccountType')]" | ||
} | ||
}, | ||
{ | ||
"apiVersion": "[variables('apiVersion')]", | ||
"type": "Microsoft.Network/networkSecurityGroups", | ||
"name": "[variables('networkSecurityGroupName')]", | ||
"location": "[variables('location')]", | ||
"properties": { | ||
"securityRules": [ | ||
{ | ||
"name": "ssh_rule", | ||
"properties": { | ||
"description": "Locks inbound down to ssh default port 22.", | ||
"protocol": "Tcp", | ||
"sourcePortRange": "*", | ||
"destinationPortRange": "22", | ||
"sourceAddressPrefix": "*", | ||
"destinationAddressPrefix": "*", | ||
"access": "Allow", | ||
"priority": 123, | ||
"direction": "Inbound" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"apiVersion": "[variables('apiVersion')]", | ||
"type": "Microsoft.Network/publicIPAddresses", | ||
"name": "[variables('publicIPAddressName')]", | ||
"location": "[variables('location')]", | ||
"properties": { | ||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]", | ||
"dnsSettings": { | ||
"domainNameLabel": "[parameters('dnsLabelPrefix')]" | ||
} | ||
} | ||
}, | ||
{ | ||
"apiVersion": "[variables('apiVersion')]", | ||
"type": "Microsoft.Network/virtualNetworks", | ||
"name": "[parameters('virtualNetworkName')]", | ||
"location": "[variables('location')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" | ||
], | ||
"properties": { | ||
"addressSpace": { | ||
"addressPrefixes": [ | ||
"[variables('addressPrefix')]" | ||
] | ||
}, | ||
"subnets": [ | ||
{ | ||
"name": "[parameters('subnetName')]", | ||
"properties": { | ||
"addressPrefix": "[variables('subnetPrefix')]", | ||
"networkSecurityGroup": { | ||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"apiVersion": "[variables('apiVersion')]", | ||
"type": "Microsoft.Network/networkInterfaces", | ||
"name": "[variables('nicName')]", | ||
"location": "[variables('location')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", | ||
"[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" | ||
], | ||
"properties": { | ||
"ipConfigurations": [ | ||
{ | ||
"name": "ipconfig1", | ||
"properties": { | ||
"privateIPAllocationMethod": "Dynamic", | ||
"publicIPAddress": { | ||
"id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" | ||
}, | ||
"subnet": { | ||
"id": "[variables('subnetRef')]" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"apiVersion": "[variables('apiVersion')]", | ||
"type": "Microsoft.Compute/virtualMachines", | ||
"name": "[parameters('vmName')]", | ||
"location": "[variables('location')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", | ||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" | ||
], | ||
"properties": { | ||
"hardwareProfile": { | ||
"vmSize": "[parameters('vmSize')]" | ||
}, | ||
"osProfile": { | ||
"computerName": "[parameters('vmName')]", | ||
"adminUsername": "[parameters('adminUsername')]", | ||
"linuxConfiguration": { | ||
"disablePasswordAuthentication": "true", | ||
"ssh": { | ||
"publicKeys": [ | ||
{ | ||
"path": "[variables('sshKeyPath')]", | ||
"keyData": "[parameters('sshKeyData')]" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"storageProfile": { | ||
"imageReference": { | ||
"publisher": "[parameters('imagePublisher')]", | ||
"offer": "[parameters('imageOffer')]", | ||
"sku": "[parameters('imageSku')]", | ||
"version": "latest" | ||
}, | ||
"osDisk": { | ||
"name": "osdisk", | ||
"vhd": { | ||
"uri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', variables('osDiskName'),'.vhd')]" | ||
}, | ||
"caching": "ReadWrite", | ||
"createOption": "FromImage" | ||
} | ||
}, | ||
"networkProfile": { | ||
"networkInterfaces": [ | ||
{ | ||
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" | ||
} | ||
] | ||
}, | ||
"diagnosticsProfile": { | ||
"bootDiagnostics": { | ||
"enabled": "true", | ||
"storageUri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net')]" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# IPython Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
.venv/ | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
||
# Rope project settings | ||
.ropeproject |
Oops, something went wrong.