4/6/2019 6:34 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
4/6/2019 6:34 AM P4029 Leveraging Azure’s Instance Metadata for instance bootstrap and runtime Hariharan Jayaraman Senior Program Manager © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Beyond the VM!
APPLICATION CUSTOMIZATION VM CUSTOMIZATION CLUSTER SETUP CONTAINER PLACEMENT CLOUD DETECTION RESOURCE MANAGEMENT CUSTOMER SUPPORT AGENT SERVER CONNECTION PLANNED MAINTENANCE NETWORK DISCOVERY APPLICATION TELEMETRY NETWORK SETUP
Challenges today All data regarding VM are behind an authenticated channel Customizations needs to be passed during creation Ability to know JIT information about maintenance events are not present Telemetry around your Apps doesn’t have a unique per VM identifier …
What is Instance Metadata Service, and how can it help?
Instance Metadata Overview Virtual Machine Information about the VMs’ Compute/Network/ upcoming maintenance REST Interface exposed to all Azure Resource Manager created VMs Only available to VM instance via non routable IP No additional auth needed to get VM information REST call on 169.254.169.254 Instance Metadata Service
Instance Metadata quick look
Semantics… RESTful Supports both JSON and TEXT responses Requires request headers Versioned Discoverable GET interface
So where can I use it ?
Cluster setup Which Racks are the VMs in ? FaultDomain Call Metadata Service Learn more here - https://community.hortonworks.com/articles/43057/rack-awareness-1.html
Rack Aware Cassandra Demo
Support Call Contoso Service on the VM is not working Information regarding VM and Network present in Metadata Service Need information regarding VM Size, image, version information etc … Call Metadata Service to get information for support
Support call demo
Managing planned downtime for your setup Master Slave Application accessing database Maintenance
Leverage Scheduled Events Scheduled Events is a part of Metadata Service in Azure Provides Just In Time information for upcoming planned maintenance RESTful call to know if there are upcoming maintenance events Get upto 15 min to do In VM actions before the action takes place
MySQL failover on reboot event
Where is it available?
Service Release Map Currently Available in Public Preview in West Central US Region Send us Feedback @ feedback.azure.com or azureimds@microsoft.com We are working hard to meet Service goals and will make the service Generally available in the upcoming months
Learn More Metadata Service docs Scheduled Events docs https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-instancemetadataservice-overview Scheduled Events docs https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-scheduled-events
Code Samples Getting all the metadata curl -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2017-03-01 Getting publicIP for a VM curl -H Metadata:true http://169.254.169.254/metadata/instance/network/interface/0/ipv4/ipaddress/0/publicip?api-version=2017-03-01&format=text
Github and samples Scheduled events logging https://github.com/Azure-Samples/virtual-machines-python-scheduled-events-central-logging Cassandra node setup for rack awareness https://github.com/harijayms/azure-resource-manager-dse/blob/master/extensions/node.sh
What is in the Road Map? Some of the fields that we are working on for future releases … Fields Details SubscriptionID Azure Subscription the VM is under ResourceGroup Azure Resource Group the VM is under Custom_data Custom data associated with the VM Tags VM tags Plan information Azure Marketplace Virtual Machine plan sshpublic key Public key VM Storage information Disk layout information AccessTokens Managed Service Identity information via Metadata … Want to see a new field send us feedback at azureimds@Microsoft.com or @ feedback.azure.com
4/6/2019 6:34 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.