6/11/2018 2:07 PM BRK2199 Infrastructure as Code: Leverage Ansible and Terraform on Microsoft Azure Hariharan Jayaraman Principal Program Manager © Microsoft.

Slides:



Advertisements
Similar presentations
Building ARM IaaS Application Environment
Advertisements

Accelerate your DevOps with OpenShift by Red Hat
Secure Hyperconnectivity with TeamViewer and Windows technologies
Enterprise Security in Practice
From IT Pros to IT Heroes - with Azure DevTest Labs
5/21/2018 9:40 PM BRK3021 Learn about modern infrastructure roles in RDS: Next generation Windows desktop & app virtualization Clark Nicholson - Principal.
Azure Machine Learning Deploying and Managing Models in production
Creating Enterprise Grade BI Models with Azure Analysis Services
Azure on Steroids: Full Automation with PowerShell
Use any Amazon S3 application with Azure Blob Storage
6/11/2018 8:14 AM THR2175 Building and deploying existing ASP.NET applications using VSTS and Docker on Windows Marcel de Vries CTO, Xpirit © Microsoft.
Azure Cloud Shell Magic of Modern Command-line Management
Developing Hybrid Apps on Microsoft Azure Stack
Migrating your IaaS infrastructure from ASM to ARM without downtime
How to expand your Azure Stack marketplace
Learning about Containers in the Real World
Azure SDKs and Tools for You
6/26/2018 2:09 PM THR4002 Achieving Upward Mobility Top 3 Strategies for Migrating Data and Workloads to the Cloud
Optimizing Microsoft OneDrive for the enterprise
The power of common identity across any cloud
Understand Hybrid Identity with Azure and Azure Stack
Virtual Machine Diagnostics in Microsoft Azure
Microsoft Ignite /31/ :08 AM
8/6/ :17 AM THR2214 Hybrid Cloud Activated A customer case study optimizing on-premises & Azure performance and cost Mor Cohen-Tal Senior Product.
Workflow Orchestration with Adobe I/O
9/11/ :59 PM THR3021 Why Microsoft is updating the new OneDrive sync engine in a different way Hans Brender Cloud Productivity Evangelist Bright.
Automate all things! Microsoft Azure continuous deployment
Agile Planning with Visual Studio Team Services (VSTS)
9/18/ :06 AM BRK2212 Gain visibility into Network performance and availability with Network monitoring solutions in Azure Vijay Tinnanur Abhishek.
9/22/2018 3:49 AM BRK2247 Learn from MVPs: Panel discussion on all things SharePoint and OneDrive © Microsoft Corporation. All rights reserved. MICROSOFT.
Azure PowerShell Aaron Roney Senior Program Manager Cormac McCarthy
Continuous Delivery for Microsoft Azure
Port your AWS Knowledge to Azure
11/22/2018 1:43 PM THR3005 How to provide business insight from your data using Azure Analysis Services Peter Myers Bitwise Solutions © Microsoft Corporation.
Continuous Delivery with Visual Studio Team Services
Azure Advisor: Optimization in the best way
PowerShell Unplugged Jeffrey Snover Technical Fellow
Mobile Center and VSTS:​ Better together for your Mobile DevOps
11/27/2018 5:08 PM THR3057 Using a PowerShell release pipeline for a real-world service provider delivery in Microsoft Azure Niklas Åkerlund Lead Architect.
Developing for the cloud with Visual Studio
Microsoft products for non-profits
12/26/2018 1:44 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Five cool things you can do with Windows PowerShell on Office 365
Microsoft To-Do Preview
Securely pass passwords into your deployment
From Source to Production: The Latest in Container Dev
1/2/2019 5:18 PM THR3016 Customer stories: Plan and orchestrate large resource deployments on Azure infrastructure Igal Figlin Principal PM Manager – Azure.
MDM Migration Analysis Tool (MMAT)
Overview: Dynamics 365 for Project Service Automation
2/24/2019 7:49 PM BRK2198 Four new Azure management experiences to run your business critical applications Dushyant Gill | Jan Kalis.
Understand your Azure cloud assets dependencies with BMC Discovery
MDC-B203 Deploying Applications in Microsoft System Center Virtual Machine Manager Using Services John Messec Program Manager Microsoft.
Surviving identity management in a hybrid world
Breaking Down the Value of A Yammer Post: 20 Things to Do
Cool Microsoft Edge Tips and Tricks
When Bad Things Happen to Good Applications
Explore PnP Partner Pack for IT pros, admins and architects
Getting the most out of Azure resources with Azure Advisor
Manage your App Service resources using Command line tools
“Hey Mom, I’ll Fix Your Computer”
4/21/2019 7:09 AM THR2098 Unlock New Opportunities with Nintex Hawkeye Process Intelligence and Workflow Analytics Sr. Product.
Service Template Creation from the Ground Up
Consolidate, manage, backup, and secure your cloud content
Designing Bots that Fit Your Organization
Ask the Experts: Windows 10 deployment and servicing
Passwordless Service Accounts
Digital Transformation: Putting the Jigsaw Together
WCF and .NET Framework Microservices in Containers
Diagnostics and troubleshooting in Azure App Service Support Center
Optimizing your content for search and discovery
Presentation transcript:

6/11/2018 2:07 PM BRK2199 Infrastructure as Code: Leverage Ansible and Terraform on Microsoft Azure Hariharan Jayaraman Principal Program Manager © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Virtual machines Physical hardware Traditional Infrastructure …

Infrastructure as Code? 6/11/2018 2:07 PM Infrastructure as Code? © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Infrastructure as code ! Cloud is software defined ! And code defines it

Cloud deployment patterns Mutable Infrastructure Immutable Infrastructure Capable of change Install the infrastructure and all updates are in place What you and most of us are used to Legacy software will be managed by this pattern Not capable or susceptible of change Deploy infrastructure as per specification , change is a new infra deployment Newer pattern, cloud native Works best with new application patterns

Mutable Infra Demo

Immutable Infra Demo

General Industry Trend and Multi cloud tools

191% of respondents planning to deploy to cloud 6/11/2018 2:07 PM 177% planning to deploy to multiple cloud 191% of respondents planning to deploy to cloud Explosion in multi-cloud OSS tools 270% of enterprises to have multi cloud strategy by 2019 Dimensional Research study Gartner Study of Future of Datacenter in Cloud Era © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Provision Any Infrastructure For Any Application Why Terraform Terraform is a product to provision infrastructure and application resources across private cloud, public cloud, and external services using a common workflow Multi cloud Easy to describe json like format call HCF Supports for both on-prem and clouds Provision Any Infrastructure For Any Application

Terraform on Azure 6/11/2018 2:07 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Terraform Resource Support Containers Load balancers Automation WebApps Database cdns Network DNS VMSS VMs Events Storage Expressroute … Traffic mgr Grid ACI

Terraform Customer example

What's coming next Additional resource support Azure stack support Terraform enterprise integrations

What is Ansible? Modular Agent-less SSH-based 6/11/2018 2:07 PM What is Ansible? Modular Many built-in modules, or you can write your own Agent-less Your Ansible controller will connect to hosts to run the tasks SSH-based Connect to your hosts with SSH Keys (recommended), passwords, or Kerberos (Windows is supported) © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

POWERFUL SIMPLE AGENTLESS 6/11/2018 2:07 PM POWERFUL App deployment Configuration management Workflow orchestration Orchestrate the app lifecycle SIMPLE Human readable automation No special coding skills needed Tasks executed in order Get productive quickly AGENTLESS Agentless architecture Uses OpenSSH & WinRM No Agents to exploit or udpate More efficient and more secure © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

ANSIBLE’S AUTOMATION ENGINE How Ansible Works ANSIBLE’S AUTOMATION ENGINE ANSIBLE PLAYBOOK PUBLIC / PRIVATE CLOUD CMDB USERS INVENTORY HOSTS NETWORKING PLUGINS API MODULES

Azure… via Ansible? Why? Use your favorite tooling? 6/11/2018 2:07 PM Azure… via Ansible? Why? Use your favorite tooling? You shouldn’t have to worry about the “nooks and crannies” of Azure Immutable CI/CD One Ring to Rule Them All © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Python Dependencies Install dependencies `pip install ansible[azure]` 6/11/2018 2:07 PM Python Dependencies Install dependencies `pip install ansible[azure]` … or from source `pip install .[azure]` (root of the ansible git repository) But… what packages are these instead? Take a look! `pip freeze | grep azure` `cat packaging/requirements/requirements-azure.txt` (root of the ansible repo) © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Authentication/Authorization 6/11/2018 2:07 PM Authentication/Authorization Environment variables AZURE_CLIENT_ID AZURE_SECRET AZURE_SUBSCRIPTION_ID AZURE_TENANT Task parameters client_id secret subscription_id tenant Note: create the service principal through the Azure CLI (https://aka.ms/InstallAzureCli) or from the Azure portal © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Matt Davis Sr. Principal Software Engineer, Ansible Core / Red Hat Ansible with Azure Matt Davis Sr. Principal Software Engineer, Ansible Core / Red Hat

Ansible Demo

Ansible Azure Module support Availability sets DNS Function App Load balancer Managed disk Network PublicIP Security Group Storage Virtual Machines Virtual Machine Scale Sets VNET …

What is coming next … Device login Additional Azure modules Azure Stack support

Summary Infrastructure as code is the future ! Multi cloud tools like Terraform and Ansible help make this easier There will be a mix of mutable and immutable deployments

Please evaluate this session Tech Ready 15 6/11/2018 Please evaluate this session From your Please expand notes window at bottom of slide and read. Then Delete this text box. PC or tablet: visit MyIgnite https://myignite.microsoft.com/evaluations Phone: download and use the Microsoft Ignite mobile app https://aka.ms/ignite.mobileapp Your input is important! © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

6/11/2018 2:07 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

VM Provisioning – Creating the Resource Group - name: create a resource group azure_rm_resourcegroup: name: ansible-rg location: eastus

VM Provisioning – Creating the Virtual Network - name: create virtual network azure_rm_virtualnetwork: resource_group: ansible-rg name: ansiblevnet address_prefixes_cidr: - “11.1.0.0/16”

VM Provisioning – Creating the Subnet - name: create subnet azure_rm_subnet: name: ansiblesubnet resource_group: ansible-rg virtual_network: ansiblevnet address_prefix_cidr: “11.1.0.0/16”

VM Provisioning – Creating the Network Security Group - name: create nsg azure_rm_securitygroup: resource_group: ansible-rg name: ansiblefinalnsg rules: - name: allowssh protocol: Tcp destination_port_range: 22 access: Allow priority: 100 direction: Inbound

VM Provisioning – Creating the Public IP Address - name: create pip azure_rm_publicipaddress: name: ansiblepip resource_group: ansible-rg

VM Provisioning – Creating the Network Interface - name: create nic azure_rm_networkinterface: name: ansiblefinalnic resource_group: ansible-rg public_ip_address: ansiblepip subnet: ansiblesubnet virtual_network: ansiblevnet security_group: ansiblensg

VM Provisioning – Creating the Storage Account - name: create storage account azure_rm_storageaccount: name: ansiblestor resource_group: ansible-rg account_type: Standard_LRS

VM Provisioning – Retrieve your SSH Public Key - name: get ssh key command: cat ~/.ssh/id_rsa.pub register: sshkey

VM Provisioning – Create the Virtual Machine - name: create vm azure_rm_virtualmachine: resource_group: ansible-rg name: ansiblevm vm_size: Standard_D1 storage_account: ansiblestor admin_username: adminUser ssh_password_enabled: false ssh_public_keys: - path: /home/adminUser/.ssh/authorized_keys key_data: '{{ sshkey.stdout }}' network_interfaces: ansiblenic image: offer: CentOS publisher: OpenLogic sku: '7.3' version: latest