Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Managing the Infrastructure Stack with PowerShell

567 views

Published on

In this talk I outline the growth of PowerShell's ability to manage the infrastructure stack. I highlight some core challenges, and provide potential solutions for future challenges and environments at scale.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Managing the Infrastructure Stack with PowerShell

  1. 1. Managing the Infrastructure Stack with PowerShell Josh Atwell Developer Advocate SolidFire, now part of NetApp @josh_atwell #PSHSUMMIT
  2. 2. Celebrating 10 Years of PowerShell 2006 - 2016 • Jeffrey Snover • Kenneth Hansen • Lee Holmes • Narayanan Lakshmanan • Hemant Mahawar • Bruce Payette • Hitesh Raigandhi • Dan Travison • Jim Truher • Krishna Vutukuri Congratulations to the team members who’ve been there since the beginning… ...and thanks for all the great work!
  3. 3. github.com/joshatwell Josh.Atwell@NetApp.com @josh_atwell
  4. 4. Why PowerShell the Stack? Why wouldn’t you? PowerShell ALL the things!
  5. 5. Twitter Poll I polled twitter to see how many layers people are managing with PowerShell
  6. 6. We Now Have • More Layers • More complexity • Consumption models have shifted Seeking • Management at Scale • DevOps / Lean Ops • More IT as a Service Physical Hardware Operating System App Virtualization NSX ACI vCenter Server vRealize Suite Orchestrator Operating System App App VIO Hyper-V System Center Orchestrator
  7. 7. Let’s Start with the Tools When you’re a hammer every problem is a nail.
  8. 8. More APIs = More PowerShell Growth of infrastructure extensibility means more opportunities for PowerShell and its users
  9. 9. Infrastructure Tools • PowerShell • VMware PowerCLI • OpenStack PoshShell • Cisco UCS Powertool • HP Scripting Tools for PowerShell • SolidFire PowerShell Tools • NetApp PowerShell Toolkit • Community • PowerNSX • EMC {Code}
  10. 10. Physical Hardware Operating System App Virtualization NSX ACI vCenter Server vRealize Suite Orchestrator Operating System App App VIO Hyper-V System Center Orchestrator
  11. 11. Use Cases What to do with this toolbox
  12. 12. PowerShelling Stack Duh • Reporting • Implementation • DevOps • Configuration • Extending Tools
  13. 13. Physical Operating System App Virtualization Virtual Switch Uplink VLAN MTU Ethernet Port Switch Port Storage Adapter
  14. 14. Physical Operating System App Virtualization VMDK / VHD Datastore Storage Volume/Lun Disk / Mount Hard Drives Which VMDK? Which Datastore? Which Lun? Process{ $scsiID = ((Get-ScsiLun -Datastore $datastore).CanonicalName).Split(".")[1] $result = Get-SFVolume | Where{$_.ScsiNAAdeviceID -eq $scsiID} Return $result }
  15. 15. DMZDSC in the DMZ Operating System App DSC vCenter Server ESXi DSC DSC VMware Tools https://github.com/DevOpsForVMwareAdministrators/powershell-dsc ? # Copy the script to the designated directory on target VM Copy-VMGuestFile -Source $script -Destination $mofpath -LocalToGuest -VM $vm - HostCredential $cred -Server $vcenter - GuestCredential $guestcred # Invoke the copied script on the target VM Invoke-VMScript -ScriptText $moffile -VM $vm - HostCredential $cred -Server $global:DefaultVIServer -GuestCredential $guestcred No Open Ports
  16. 16. PowerActions • Embeds PowerCLI with vSphere Web Client • Extend web client capabilities
  17. 17. Let’s learn some cmdlets Just Kidding. Let’s talk challenges
  18. 18. Core Challenges • Managing Multiple Modules/Tools • Relationship Mapping • Scale
  19. 19. Multiple Providers • PSSnapin vs Modules • Each Vendor has an installer • $env:PSModulePath Defaults • $homeDocumentsWindowsPow erShellModules; $pshomeModules.
  20. 20. Physical Operating System App Virtualization VMDK / VHD Datastore Storage Volume/Lun Disk / Mount Hard Drives Which VMDK? Which Datastore? Which Lun? Query for that information can be cumbersome Collect All | Filter | Grab Piece you really wanted
  21. 21. Physical Operating System App Virtualization Virtual Switch Uplink VLAN MTU Ethernet Port Switch Port Adapter
  22. 22. Application DNA Applying Relationship Maps Physical Operating System Virtualization Virtual Switch Uplink Ethernet Port Switch Port Storage Adapter VMDK / VHD Datastore Volume/Lun Disk / Mount Hard Drives JSON XML CSV SQL DB vRAM Sys Memory pRAM Server ESXi Host
  23. 23. Example $scsiID = ((Get-ScsiLun -Datastore $datastore).CanonicalName).Split(".")[1] $result = Get-SFVolume | Where{$_.ScsiNAAdeviceID -eq $scsiID} $result | ConvertTo-JSON | Set-Content Datastore-Volume.JSON $global:DSVol = (Get-Content Datastore-Volume.JSON) –join “`n” | ConvertFrom-JSON $scsiID = ($global:DSVol | Where{$_.DatastoreName –eq ‘DatastoreName’}).scsiID $result = Get-SFVolume | Where{$_.ScsiNAAdeviceID -eq $scsiID}
  24. 24. Why App DNA? • Quicker Reporting • Shorter Time to Resolution • Faster Implementation • Improve Value Stream • Dynamic Parameter Sets • Faster PowerActions or vRO calls.
  25. 25. Growth Areas • More DSC Resources • Cisco UCS PowerTool DSC • Moving away from PSSnapins
  26. 26. Questions?

×