Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Google+ Youtube

Github Stackoverflow Pinterest

Let me do it for you


Overview

This article describes the use of Windows PowerShell Desired State Configuration (DSC).

“PowerShell” refers to both the command-line shell and scripting language designed system administration.

Built on the .NET Framework, Windows PowerShell helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows.

Windows PowerShell cmdlets (command-lets) enables computers to be managed from the command line, much like Bash on Linux machines.

However, PowerShell offers much more consistence than the various commands added over time by various parties.

  • It reads Excel files natively as well as JSON, XML, and even ASCII.

Open source on Linux and MacOS

From the PowerShell and DSC Team YouTube channel:

This 51-minute series of demos was published Aug 18, 2016.

This article notes Desired State Configuration for Linux and the promise of SSH support arrived in 2014 (several months before Microsoft open sourced .NET and brought .NET Core to Linux). But “you had to author your scripts on the Windows platform, you had to configure things on the Windows platform and then deliver the desired configuration to a Linux box and have it be configured; now you can do all of that on Linux.”

On August 18 2016, PowerShell became open-source at
https://github.com/PowerShell/PowerShell.

Join the conversation on Gitter

Noteworthy pages in the FAQ:

  • https://blogs.msdn.microsoft.com/kebab/2013/06/09/an-introduction-to-error-handling-in-powershell/
  • http://ss64.com/ps/syntax.html
  • https://github.com/PoshCode/PowerShellPracticeAndStyle

Deploy as MOF

MOF is a file extension for a Windows Management Object file format.

MOF files created in the Managed Object Format have syntax based on Microsoft Visual C++.

MOF files can be compiled into the Windows Management Instrumentation (WMI) repository using mofcomp.exe.

MOF files often have a partner DLL (dynamic link library) file that stores data needed for retrieval in the MOF file.

Chef incorporates DSC

Resources

Windows PowerShell 4.0 introduces Desired State Configuration (DSC),

http://stackoverflow.com/questions/8153750/how-to-search-a-string-in-multiple-files-and-return-the-names-of-files-in-powers How to search a string in multiple files and return the names of files in Powershell

Infrastructure as Code

Ravikanth Chaganti (MVP) (of PowerShell Magazine and book PowerShell Desired State Configuration Revealed) notes that “Infrastructure as Code” requires:

  • Reusable automation
  • Source Control
  • Unit Testing
  • Continuous Deployment
  • Integration tests, which validate the desired state
  • Operations Validation, which validates the functionality at desired state!

Operation Validation Framework

https://github.com/PowerShell/Operation-Validation-Framework
runs

Get-Command -Module OperationValidation

It has two functions:

Get-OperationValidation to Retrieve operational tests from modules

Invoke-OperationValidation to run operational tests from modules

Additionally

http://kunaludapi.blogspot.in/2015/09/multiple-ways-to-install-software.html

More on API Microservices

This is one of a series:

More on DevOps

This is one of a series on DevOps:

  1. DevOps_2.0
  2. User Stories for DevOps

  3. Choices for DevOps Technologies
  4. Java DevOps Workflow
  5. AWS DevOps (CodeCommit, CodePipeline, CodeDeploy)
  6. AWS server deployment options

  7. Digital Ocean
  8. Cloud regions
  9. AWS Virtual Private Cloud
  10. Azure Cloud Powershell

  11. Git and GitHub vs File Archival
  12. Git Commands and Statuses
  13. Data Security GitHub
  14. Git Commit, Tag, Push
  15. Git Utilities
  16. GitHub API

  17. TFS vs. GitHub

  18. Jenkins Server Setup
  19. Jenkins Plug-ins
  20. Jenkins Freestyle jobs
  21. Jenkins2 Pipeline jobs using Groovy code in Jenkinsfile

  22. Dockerize apps
  23. Docker Setup
  24. Docker Build

  25. Maven on MacOSX

  26. Powershell Ecosystem
  27. Powershell on MacOS
  28. Powershell Desired System Configuration

  29. Ansible

  30. MySQL Setup

  31. SonarQube static code scan

  32. API Management Microsoft
  33. API Management Amazon

  34. Scenarios for load