Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемого приложения в облаке"
Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the...
-
Upload
fwdays -
Category
Technology
-
view
170 -
download
2
Transcript of Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the...
![Page 1: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/1.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/2.jpg)
Azure deployment models
![Page 3: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/3.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/4.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/5.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/6.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/7.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/8.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/9.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/10.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/11.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/12.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/13.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/14.jpg)
Role based access control
![Page 15: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/15.jpg)
WriAng ARM templates
![Page 16: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/16.jpg)
Any JSON editor
![Page 17: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/17.jpg)
Visual Studio
![Page 18: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/18.jpg)
Deploying ARM templates
![Page 19: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/19.jpg)
Visual Studio
![Page 20: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/20.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/21.jpg)
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"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/22.jpg)
Azure portal
![Page 23: Антон Бойко "Azure Resource Manager or how to create your cloud infrastructure by the power of thought"](https://reader033.fdocuments.us/reader033/viewer/2022042907/5886b9231a28ab6d0e8b78a5/html5/thumbnails/23.jpg)
QuesAons?
AntonBoykoMicrosoYAzureUkraineCommunityFounderMicrosoYAzureMVP,MCPMicrosoYTE
[email protected]@BoykoAnthSps://facebook.com/boyko.anthSps://youtube.com/user/boykoanthSps://ua.linkedin.com/in/boykoant