Accelerating Azure adoption
with Puppet
Martez Reed
@greenreedtech
Puppet Camp
Introduction
Principal Training Solutions Engineer @Puppet
Martez Reed
Accelerating Azure adoption with Puppet | Martez Reed
Linkedin: martezreed
Twitter: @greenreedtech
Github: martezr
Adopting a public cloud
• Deploying business applications
into a public cloud such as
Microsoft Azure.
• Reasons
• Agility
• Scalability
• Managed offerings
Cloud Adoption
Accelerating Azure adoption with Puppet | Martez Reed
Migrating on-prem workloads
Workload Migration
Accelerating Azure adoption with Puppet | Martez Reed
Datacenter
Migrating Workloads
What is lift and shift?
• Moving an application from an
on-prem datacenter to the public
cloud without changing the
application architecture.
• There are two common methods
for moving the workload to
Azure.
• Migrate the virtual machine
from vSphere to Azure.
• Redeploy the app on new
Azure IaaS VMs
Lift and Shift
Accelerating Azure adoption with Puppet | Martez Reed
Redeploy
VM Migration
Overview
• Infrastructure as Code (IaC)
integration capabilities.
• Microsoft Azure virtual machine
extensions.
Puppet Agent Deployment
Accelerating Azure adoption with Puppet | Martez Reed
ARM Template
Azure Custom Script Extensions
Accelerating Azure adoption with Puppet | Martez Reed
Virtual Machine
App v1
Bin/Libs
Terraform Agent Deployment
Accelerating Azure adoption with Puppet | Martez Reed
Overview
• Dynamically discover Terraform
resources.
• Utilizes out of band integration
instead of the Terraform
provisioner model.
Puppet Bolt Terraform Integration
Accelerating Azure adoption with Puppet | Martez Reed
Puppet Bolt Terraform Integration
Accelerating Azure adoption with Puppet | Martez Reed
Overview
• Terraform remote or local state
configuration
• Reference resource attributes for
accessing the virtual machine
version: 2
groups:
- name: webapp
targets:
- _plugin: terraform
dir: /azureterraform
resource_type: azurerm_linux_virtual_machine.frontend
backend: remote
target_mapping:
uri: private_ip_address
Puppet Bolt Terraform Integration
Accelerating Azure adoption with Puppet | Martez Reed
Virtual Machine
App v1
Bin/Libs
1. Provision virtual machine
Azure Blob
Storage
6. Deploy system configuration
3. Call Terraform
2. Store Terraform state
4. Fetch remote state
5. Parse TF state
Azure Service Integration
Accelerating Azure adoption with Puppet | Martez Reed
Virtual Machine
Azure Blob Storage
Azure Key Vault
Azure Instance
Metadata Service
Overview
• Access Azure metadata
information about the virtual
machine as Puppet facts
• keirans-azuremetadata forge
module
Azure Instance Metadata Integration
Accelerating Azure adoption with Puppet | Martez Reed
Virtual Machine
Azure Instance
Metadata Service
Overview
• Store sensitive data (passwords,
API credentials, etc.)
• Grant access based upon Azure
machine identity
• tragicode-azure_key_vault forge
module
Azure Key Vault Integration
Accelerating Azure adoption with Puppet | Martez Reed
Azure Key Vault
Virtual Machine
Azure Instance
Metadata Service
Azure Active Directory
Request token
Request token from
Azure AD
Request secret
Overview
• Store large files and sensitive
objects
• Grant access based upon Azure
machine identity
Azure Blob Storage Integration
Accelerating Azure adoption with Puppet | Martez Reed
Azure Blob Storage
Virtual Machine
Azure Active Directory
Request token
Request object
Request token from
Azure AD
Azure Instance
Metadata Service
Immutable Infrastructure
Immutable Infrastructure
Accelerating Azure adoption with Puppet | Martez Reed
App v1
Bin/Libs
What is Immutable Infrastructure?
A management paradigm that focuses on
recreating a virtual machine to push new
configuration or resolve an issue.
• Ideal for stateless applications or
applications that offload state
• Commonly referred to as treating
instances as cattle instead of pets
App v2
Bin/Libs
Immutable Infrastructure
Accelerating Azure adoption with Puppet | Martez Reed
Azure Immutable Infrastructure
• Azure scale sets enable workload
scalability and resiliency.
• Baking the software and configuration
reduces the time a virtual machine to
become ready
Scale Set
Load Balancer
Immutable Infrastructure
Accelerating Azure adoption with Puppet | Martez Reed
HashiCorp Packer
• Codifies the template creation
process
• Multi-Cloud support
• Large community and numerous
code examples
Immutable Infrastructure
Accelerating Azure adoption with Puppet | Martez Reed
Virtual Machine
App v2
Bin/Libs
1. Provision virtual machine
2. Trigger Bolt Plan
3. Deploy system configuration
Puppet Bolt Packer Provisioner
• Simplifies the integration
between Packer and Bolt.
• Custom provisioner -
https://github.com/martezr/pack
er-provisioner-puppet-bolt
• Supports Windows and Linux
Immutable Infrastructure
Accelerating Azure adoption with Puppet | Martez Reed
"provisioners": [
{
"type": "puppet-bolt",
"backend": "ssh",
"user": "centos",
"run_as": "root",
"bolt_module_path": "Bolt",
"project_path": "Bolt",
"bolt_plan": "azure::peinstall",
"log_level": "debug",
"install_modules": true,
"bolt_params": {}
}
]
Operations
Puppet Bolt Azure Inventory
• Dynamically discover Azure
virtual machines and scale sets
• Search by resource group, tags,
location or a combination of the
three
Ad-Hoc Operations
Accelerating Azure adoption with Puppet | Martez Reed
Puppet Bolt Azure Inventory
• Dynamically discover Azure
virtual machines and scale sets
• Search by resource group, tags,
location or a combination of the
three
Ad-Hoc Operations
Accelerating Azure adoption with Puppet | Martez Reed
Patch Management
• Puppet Enterprise 2019.8.0 or
later
• Supports Windows and Linux
• Deploy patches based upon node
classification and support
blackout windows
Puppet Enterprise Patch Management
Accelerating Azure adoption with Puppet | Martez Reed
Questions?
Principal Training Solutions Engineer @Puppet
Martez Reed
Linkedin: martezreed
Twitter: @greenreedtech
Github: martezr
https://www.slideshare.net/MartezReed/
accelerating-azue-adoption-with-puppet
Slide Deck
Accelerating Azure adoption with Puppet | Martez Reed

Accelerating azure adoption with puppet

  • 1.
    Accelerating Azure adoption withPuppet Martez Reed @greenreedtech Puppet Camp
  • 2.
    Introduction Principal Training SolutionsEngineer @Puppet Martez Reed Accelerating Azure adoption with Puppet | Martez Reed Linkedin: martezreed Twitter: @greenreedtech Github: martezr
  • 3.
    Adopting a publiccloud • Deploying business applications into a public cloud such as Microsoft Azure. • Reasons • Agility • Scalability • Managed offerings Cloud Adoption Accelerating Azure adoption with Puppet | Martez Reed
  • 4.
    Migrating on-prem workloads WorkloadMigration Accelerating Azure adoption with Puppet | Martez Reed Datacenter
  • 5.
  • 6.
    What is liftand shift? • Moving an application from an on-prem datacenter to the public cloud without changing the application architecture. • There are two common methods for moving the workload to Azure. • Migrate the virtual machine from vSphere to Azure. • Redeploy the app on new Azure IaaS VMs Lift and Shift Accelerating Azure adoption with Puppet | Martez Reed Redeploy VM Migration
  • 7.
    Overview • Infrastructure asCode (IaC) integration capabilities. • Microsoft Azure virtual machine extensions. Puppet Agent Deployment Accelerating Azure adoption with Puppet | Martez Reed ARM Template
  • 8.
    Azure Custom ScriptExtensions Accelerating Azure adoption with Puppet | Martez Reed Virtual Machine App v1 Bin/Libs
  • 9.
    Terraform Agent Deployment AcceleratingAzure adoption with Puppet | Martez Reed
  • 10.
    Overview • Dynamically discoverTerraform resources. • Utilizes out of band integration instead of the Terraform provisioner model. Puppet Bolt Terraform Integration Accelerating Azure adoption with Puppet | Martez Reed
  • 11.
    Puppet Bolt TerraformIntegration Accelerating Azure adoption with Puppet | Martez Reed Overview • Terraform remote or local state configuration • Reference resource attributes for accessing the virtual machine version: 2 groups: - name: webapp targets: - _plugin: terraform dir: /azureterraform resource_type: azurerm_linux_virtual_machine.frontend backend: remote target_mapping: uri: private_ip_address
  • 12.
    Puppet Bolt TerraformIntegration Accelerating Azure adoption with Puppet | Martez Reed Virtual Machine App v1 Bin/Libs 1. Provision virtual machine Azure Blob Storage 6. Deploy system configuration 3. Call Terraform 2. Store Terraform state 4. Fetch remote state 5. Parse TF state
  • 13.
    Azure Service Integration AcceleratingAzure adoption with Puppet | Martez Reed Virtual Machine Azure Blob Storage Azure Key Vault Azure Instance Metadata Service
  • 14.
    Overview • Access Azuremetadata information about the virtual machine as Puppet facts • keirans-azuremetadata forge module Azure Instance Metadata Integration Accelerating Azure adoption with Puppet | Martez Reed Virtual Machine Azure Instance Metadata Service
  • 15.
    Overview • Store sensitivedata (passwords, API credentials, etc.) • Grant access based upon Azure machine identity • tragicode-azure_key_vault forge module Azure Key Vault Integration Accelerating Azure adoption with Puppet | Martez Reed Azure Key Vault Virtual Machine Azure Instance Metadata Service Azure Active Directory Request token Request token from Azure AD Request secret
  • 16.
    Overview • Store largefiles and sensitive objects • Grant access based upon Azure machine identity Azure Blob Storage Integration Accelerating Azure adoption with Puppet | Martez Reed Azure Blob Storage Virtual Machine Azure Active Directory Request token Request object Request token from Azure AD Azure Instance Metadata Service
  • 17.
  • 18.
    Immutable Infrastructure Accelerating Azureadoption with Puppet | Martez Reed App v1 Bin/Libs What is Immutable Infrastructure? A management paradigm that focuses on recreating a virtual machine to push new configuration or resolve an issue. • Ideal for stateless applications or applications that offload state • Commonly referred to as treating instances as cattle instead of pets App v2 Bin/Libs
  • 19.
    Immutable Infrastructure Accelerating Azureadoption with Puppet | Martez Reed Azure Immutable Infrastructure • Azure scale sets enable workload scalability and resiliency. • Baking the software and configuration reduces the time a virtual machine to become ready Scale Set Load Balancer
  • 20.
    Immutable Infrastructure Accelerating Azureadoption with Puppet | Martez Reed HashiCorp Packer • Codifies the template creation process • Multi-Cloud support • Large community and numerous code examples
  • 21.
    Immutable Infrastructure Accelerating Azureadoption with Puppet | Martez Reed Virtual Machine App v2 Bin/Libs 1. Provision virtual machine 2. Trigger Bolt Plan 3. Deploy system configuration
  • 22.
    Puppet Bolt PackerProvisioner • Simplifies the integration between Packer and Bolt. • Custom provisioner - https://github.com/martezr/pack er-provisioner-puppet-bolt • Supports Windows and Linux Immutable Infrastructure Accelerating Azure adoption with Puppet | Martez Reed "provisioners": [ { "type": "puppet-bolt", "backend": "ssh", "user": "centos", "run_as": "root", "bolt_module_path": "Bolt", "project_path": "Bolt", "bolt_plan": "azure::peinstall", "log_level": "debug", "install_modules": true, "bolt_params": {} } ]
  • 23.
  • 24.
    Puppet Bolt AzureInventory • Dynamically discover Azure virtual machines and scale sets • Search by resource group, tags, location or a combination of the three Ad-Hoc Operations Accelerating Azure adoption with Puppet | Martez Reed
  • 25.
    Puppet Bolt AzureInventory • Dynamically discover Azure virtual machines and scale sets • Search by resource group, tags, location or a combination of the three Ad-Hoc Operations Accelerating Azure adoption with Puppet | Martez Reed
  • 26.
    Patch Management • PuppetEnterprise 2019.8.0 or later • Supports Windows and Linux • Deploy patches based upon node classification and support blackout windows Puppet Enterprise Patch Management Accelerating Azure adoption with Puppet | Martez Reed
  • 27.
    Questions? Principal Training SolutionsEngineer @Puppet Martez Reed Linkedin: martezreed Twitter: @greenreedtech Github: martezr https://www.slideshare.net/MartezReed/ accelerating-azue-adoption-with-puppet Slide Deck Accelerating Azure adoption with Puppet | Martez Reed