2. Introduction
Principal Training Solutions Engineer @Puppet
Martez Reed
Accelerating Azure adoption with Puppet | Martez Reed
Linkedin: martezreed
Twitter: @greenreedtech
Github: martezr
3. 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
6. 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
7. Overview
• Infrastructure as Code (IaC)
integration capabilities.
• Microsoft Azure virtual machine
extensions.
Puppet Agent Deployment
Accelerating Azure adoption with Puppet | Martez Reed
ARM Template
10. 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
11. 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
12. 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
13. Azure Service Integration
Accelerating Azure adoption with Puppet | Martez Reed
Virtual Machine
Azure Blob Storage
Azure Key Vault
Azure Instance
Metadata Service
14. 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
15. 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
16. 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
18. 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
19. 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
20. 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
21. 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
22. 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": {}
}
]
24. 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
25. 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
26. 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
27. 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