Exploring
- Lets create a Ubuntu Server 20.04 with size Standard_B1s
- Select the necessary options and create the virtuam machine

- Lets download the template

- Overview of Templates
- When we try to create any thing in Azure, Azure will create a template and deploy it.
- The deployment of template leads to creation of resources

- Basic Idea behind templates:
- When we want to do the same activity again, rather that reselecting the stuff from azure portal, we can deploy the template.
- Assume your application deployment has lot of vms and other azure resources, creating them manually for every environment will be difficult to create, so as a solution
- We can create the reusable template and deploy this reusable template with different parameters for different environments.
Azure Resource Manager Templates
- So, to automate application deployments on Azure we should be able to create/modify the templates to suit to your application needs
- Skills to acquire
- Understanding JSON
- Writing ARM Template from scratch
- Modify the existing ARM Templates
- ARM Templates can be deployed from
- Portal
- CLI/Powershell
- API
- This gives us the flexibility to integrate the ARM Template deployment with any CI/CD tool.
- Azure has developed a Domain Specific language where we can use declarative syntax to deploy Azure resources which is called as Bicep
JSON
-
Refer Here for the JSON and YAML Tutorial
-
Json is all about writing the data in the form of name value pairs
-
Here when we try to do this value can be of the following formats
- text
- number
- true/false
- list
- complex i.e it has more name value pairs
-
For doing this json has specific syntax
<name>: <value>
- string/text
'name' : 'QualityThought'
- number
'started': 2010
'age': 11
- boolean
'classroom': false
'online': true
- list
'courses': [ 'AWS', 'Azure', 'DevOps', 'Python', 'DataScience' ]
- complex or object
address: {
'flatno': '209-B',
'building': 'Nilgiri Block',
'landmark': 'Ameerpet Metro'
}
- Academics json
{
"schooling": {
"name": "Bhartiya Vidya Bhavan",
"academic percentage": 85.6
},
"intermediate": {
"name" : "FITJEE",
"academic percentage" : 94,
"specialization": ["Maths", "Physics", "Chemistry"]
},
"graduation": {
"name": "NIT",
"academic percentage": 75,
"specialization" : "Computer Science and Engieering",
"degree": "B.Tech"
}
}
- Json is generally stored in files with .json extension.
- JSON is widely used to represent data and is a common format in web applications.
