Антон Бойко "azure resource manager or how to create your cloud infrastructure by the...

23
Azure Resource Manager or how to create your cloud infrastructure by the power of thought Anton Boyko Microsoft Azure MVP, MCP Microsoft TE [email protected] [email protected]

Upload: fwdays

Post on 24-Jan-2017

170 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Azure Resource Manager or how to create your cloud infrastructure by the power of thought Anton Boyko Microsoft Azure MVP, MCP Microsoft TE [email protected] [email protected]

Page 2: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Azure deployment models

Page 3: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Service model (aka classic)

Applica'onInsight

SqlDatabase

MobileApp

Storage WebApp

Page 4: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Resource model

ResourceGroup

Applica'onInsight

SqlDatabase

MobileApp

Storage WebApp

Page 5: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Resource group

•  Groupof'ghtlycoupledresourcesthatsharealifecycle

•  Containerformul'pleresources

•  Resourcesexistinoneresourcegroup

•  Resourcegroupscanspanregions

•  Resourcegroupscanspanservices

Page 6: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Power of repeatability

ARMtemplatescan•  Ensureidempotency•  Simplifyorchestra'on• Providecross-resourceconfigura'onandupdatesupport

•  IntegrateinCI/CDpipeline

ARMtemplatesare•  Sourcefile,checked-in•  Specifiesresourcesanddependencies(VMs,WebApps,DBs)andconnec'ons(config,LBsets)

•  Input/outputwithparameters

Page 7: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

ARM templates

•  Parameters•  userinputforthetemplate

•  Variables•  Datatobereusedinthetemplate•  Nouserinput•  Ex:subnetIPrange,resourcesnameswithprefixes

•  Resources•  Modelsalltheresourcesintheresourcegroup

•  Outputs•  informa'ontobesendfromtheexecu'on•  Ex:DNSnameforthecreatedblog

Page 8: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

ARM template parameters "parameters": {

"EnvironmentName": {

"type": "string",

"minLength": 1,

"maxLength": 10

},

"WebFarmSKU": {

"type": "string",

"allowedValues": [ "Standard", "Premium" ],

"defaultValue": "Standard"

},

"WebFarmWorkersCount": {

"type": "int",

"allowedValues": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ],

"defaultValue": 1

}

}

Page 9: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

ARM template variables

"variables": {

"WebFarmName": "[concat('WebFarm-‘, parameters('EnvironmentName'), '-', uniqueString(resourceGroup().id))]",

"SqlServerName": "[toLower(concat('SqlServer-', parameters('EnvironmentName'), '-', uniqueString(resourceGroup().id)))]",

"CdnProfileName": "[concat('Cdn-', parameters('EnvironmentName'), '-', uniqueString(resourceGroup().id))]",

"StorageName": "[toLower(concat(parameters('EnvironmentName'), uniqueString(resourceGroup().id)))]"

}

Page 10: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

ARM template resources

"resources": [{

"name": "[variables('WebFarmName')]",

"type": "Microsoft.Web/serverfarms",

"location": "[resourceGroup().location]",

"apiVersion": "2014-06-01",

"dependsOn": [],

"tags": {},

"properties": {

"name": "[variables('WebFarmName')]",

"sku": "[parameters('WebFarmSKU')]",

"workerSize": "[parameters('WebFarmWorkersSize')]",

"numberOfWorkers": "[parameters('WebFarmWorkersCount')]"

}

}]

Page 11: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

ARM template and parameters

Template"parameters": {

},

"variables": {

},

"resources": [

],

"outputs": {

}

Parameters"parameters": {

"EnvironmentName": {

"value": "demo"

},

"SqlServerAdminLogin": {

"value": "master"

},

"SqlServerAdminPassword": {

"value": "Qwerty12!"

}

}

Page 12: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

ARM template execuAon

Start

AppPlan

SqlServer

WebApp

SqlDB

Conn.String

AlertRule

StorageAcc.

Backuppolicy

End

Page 13: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Moving to ARM

• ARMtemplatecanbeextractedfromanyexis'ngresourcegroupviaexportdeploymentfunc'onality(currentlyinpreview)

• Resourceexplorercanbeusedtofindoutcurrentresourceconfigura'onhSps://resources.azure.com/

• QuickstarttemplatesonGitHubhSps://github.com/Azure/azure-quickstart-templates

• UkrainianAzureCommunitytemplatesonGitHubhSps://github.com/AzureUA/ARM-Templates

Page 14: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Role based access control

Page 15: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

WriAng ARM templates

Page 16: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Any JSON editor

Page 17: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Visual Studio

Page 18: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Deploying ARM templates

Page 19: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Visual Studio

Page 20: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Azure PowerShell

PS C:\Users\v-anboyk>

New-AzureRmResourceGroupDeployment

-TemplateFile <path-to-template>

-TemplateParameterFile <path-to-params>

-ResourceGroupName <group-name>

-Name <deployment-name>

Page 21: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Azure xPlat CLI

C:\Users\v-anboyk>

azure group deployment create

--template-file <path-to-template>

--parameters-file <path-to-params>

--resource-group <group-name>

--name <deployment-name>

Page 22: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

Azure portal

Page 23: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"

QuesAons?

AntonBoykoMicrosoYAzureUkraineCommunityFounderMicrosoYAzureMVP,MCPMicrosoYTE

[email protected]@BoykoAnthSps://facebook.com/boyko.anthSps://youtube.com/user/boykoanthSps://ua.linkedin.com/in/boykoant