Share via


Understanding Azure Provisioning

I'm producing a series of blog post that highlights the work I've done with an O'Reilly media video course. I will produce several posts a week to support this course, as seen below.

https://bit.ly/bruno-does-linux-data-java

slide0

The course is targeted towards developers who want to write Java applications on Linux and host those application in Azure.

These applications talk to today's top data stores, including:

  • Azure Tables
  • Azure Blobs
  • Azure Queues
  • SQL Server
  • SQL Database
  • MySQL
  • PostGres
  • DocumentDB
  • MongoDB
  • Cassandra
  • Redis

How you can provision compute, networking, and storage in Azure

  • The preferred way is through ARM - the declarative way
    • JSON-based text files let's you provision infrastructure
  • The imperative way is through scripting - doesn't scale as well
    • Some customers take the approach to generate an ARM template with code as an effort to abstract away the complexities of the ARM templates

smallslide001

Slide 1 of 11 - Provisioning infrastructure

Compute, networking, and storage are bundled up into a resource group

  • Typically, resource groups contain resources related to a specific application
    • For example, you might bundle a SQL Server database, a web application, and the storage account in one resource group
  • If you delete a resource group, you delete all the resources in that resource group
  • Resource groups encapsulate the lifecycle of the resources inside of it
  • When you provision resources with the Azure resource manager,, you always provision in the context of specific resource group
    • Resources can be linked across resource groups

smallslide002

2lide 2 of 11 - Resource groups are containers

The Azure portal is also organized through resource groups

  • The image to the right shows the "javavm" resource group
  • You can see that it has a virtual machine, a network card, and a public IP address

smallslide003

Slide 2 of 11 - Resource groups are part of the Azure portal

Connecting to a VM

  • Regardless of whether you have a Linux or Windows virtual machine, you can remote into it
  • Putty is one of the approaches you can take with Windows to SSH into a Linux virtual machine
  • Simply provide the IP address ( public IP address ) of your virtual machines remote into
    • The default is port 22 for SSH, but that can be modified
    • You can use network security groups to open and close specific ports in a virtual machine

smallslide004

Slide 3 of 11 - several options connecting to virtual machines (Linux or Windows)

Mac or Windows Support

  • Mac OS comes in with the built-in ability for SSH
  • For Windows you can download Putty

smallslide005

Slide 4 of 11 - Mac or Windows support

Code or JSON

  • As explained previously, you can either use code or the declarative syntax using JSON with the Azure resource manager templates
    • The three main sections for templates are:
      • parameters
      • variables
      • resources

smallslide006

Slide 5 of 11 - The declarative JSON approach is preferred

Better to define the end results, then all the steps

  • The Azure resource manager lets you define the end state
    • It's a way of expressing to Azure what you want the final outcome to look like

smallslide007

Slide 6 of 11 - Defining the end state

Your deployment consists of two files: parameters file in the template file

smallslide008

Slide 7 of 11 - It's about the parameters file in the template file

The goals of the Azure resource manager

smallslide010

Slide 8 of 11 - Some simple goals

Infrastructure lives in resource groups and resource groups get deployed to a data center

  • Resource groups do not span data centers

smallslide011

Slide 9 of 11 - Deployments end up in a data center

Azure XPlat CLI

  • Notice the azure group create command
  • You specify the resource group, the region, the deployment name
  • More importantly, you pass in the deployment file in the parameters file

smallslide013

Slide 10 of 11 - Azure XPlat CLI

Your deployment ends up in the data center

smallslide014

Slide 11 of 11 - Choosing from one of many global data centers