Presentation is loading. Please wait.

Presentation is loading. Please wait.

Service Management Automation: 3,2,1, Automate!

Similar presentations


Presentation on theme: "Service Management Automation: 3,2,1, Automate!"— Presentation transcript:

1 Service Management Automation: 3,2,1, Automate!
This session will cover the base requirements for configuring and installing Service Management Automation. This will include the nuts and bolts of how it to configure, troubleshoot, and the basics of importing and running your runbooks. Walk away ready to automate Nash Pherson @KidMystic Blog or address Steve Jesok @SteveJesok Blog or address

2 Nash Pherson City, Country @KidMystic
Microsoft MVP Enterprise Mobility MNSCUG Board Member Schlepping IT for 12 years…. #MMSMOA

3 Steve Jesok Minneapolis, United States @SteveJesok MNSCUG Board Member
Sr Design Engineer Schlepping IT for 15 years…. #MMSMOA

4 System Center Orchestration
Automation Tool Primary Function Orchestrator Orchestrator is intended for automation of all on-premises resources. It uses a different runbook engine than Service Management Automation and Azure Automation. Service Management Automation Service Management Automation is installed locally in your data center as a component of Windows Azure Pack and is intended to automate management tasks in the private cloud. Azure Automation Azure Automation runbooks run in the Azure public cloud and are intended to automate Azure-related management tasks.

5 Service Management Automation SMA
Architecture at a glance…

6 SMA in 60 minutes What we need to start System Requirements
Install SMA Create repeatable process, and document them. Code Versioning PowerShell ISE

7 SMA Hardware Recommendations
Minimum of two cores and 4 GB of RAM for each virtual machine 60 GB of available disk space Test with a single system, and use multiple systems with load-balanced incoming traffic for production.

8 Software Requirements
Server 2012 R2 PowerShell 4 .Net and IIS Prerequisites A SQL instance 2 service accounts, on for the IIS AppPool, on for the Worker

9 Not a requirement, or is it? A very pretty GUI
Windows Azure Pack Not a requirement, or is it? A very pretty GUI Adds additional server requirements Do you want/need it? Can be installed quickly (sort of) to try. configuring-series.aspx

10 WAP Challenge The setup can be very challenging…

11 Installing SMA #Install the pre-reqs Install-WindowsFeature Web-Server, Web-Basic-Auth, Web-Windows-Auth, Web-Url- Auth, Web-Asp-Net45, NET-Framework-Core, Net-Framework-45-Core, NET-WCF-HTTP- Activation, Web-Mgmt-Console #PowerShell Module msiexec.exe /i PowershellModuleInstaller.msi /L*v C:\SMAPoShModInstaller.log #WebService msiexec.exe /i WebServiceInstaller.msi /L*v C:\SMAWebServiceInstaller.log CREATEDATABASE="Yes" SQLSERVER="localhost\SMA" DATABASEAUTHENTICATION="Windows" SQLDATABASE="SMADEV" APPOOLACCOUNT="sma-ap" APPOOLPASSWORD=“Password” #Worker msiexec.exe /i WorkerInstaller.msi /L*v C:\SMAWorkerInstaller.log CREATEDATABASE="NO" SQLSERVER="localhost\SMA" DATABASEAUTHENTICATION="Windows" SQLDATABASE="SMADEV" SERVICEACCOUNT="sma-sa" SERVICEPASSWORD=“Password”

12 First thing, what’s our plan?
Have an approach to what you are doing… What do we want to automate? Standard processes=standard runbooks, naming conventions, etc Code management Testing, testing, testing

13 Have an approach to measure what you do
What to automate first? Have an approach to measure what you do What are the biggest wins? Very repeatable and measureable. Automate small repeatable tasks for big gains. Start with the things you do first! Get clear requirements when working with other teams. Document, document, document.

14 SMA Basics Assets Runbooks Jobs Credentials, variables, schedules
The workflows we create Jobs The automated work we do Modules Shared code

15 A walk around the block…

16 PowerShell SMA Cmdlets
#List SMA commands Get-Command -Module Microsoft.SystemCenter.ServiceManagementAutomation #Save some time $sma = " #List Runbooks Get-SmaRunbook -WebServiceEndpoint $sma

17 PowerShell SMA Cmdlets
#Credentials $Credential = Get-Credential Set-SmaCredential -WebServiceEndpoint $sma -Name SMADemo -Value $Credential -Description "This is the account I am using for this demo" Get-SMACredential -WebServiceEndpoint $sma #Variables Set-SmaVariable -WebServiceEndpoint $sma -Name "SMTP-Server" -Value "Test-Mail.mydomain.com" - Description "This is my mail server" Set-SmaVariable -WebServiceEndpoint $sma -Name "SMTP-Port" -Value "5150" -Description "This is my mail server port" Get-SmaVariable -WebServiceEndpoint $sma | Where-Object {$_.Name -like 'SMTP-*'} #Schedules $StartDate = "Friday, November 6, :00:00 PM" $EndDate = "Friday, November 13, :01:00 PM" Set-SmaSchedule -WebServiceEndpoint $sma -StartTime $StartDate -ExpiryTime $EndDate -DayInterval 1 - Name "Daily-2:00PM" -ScheduleType "DailySchedule" -Description "A test schedule to demo with" Get-SmaSchedule -WebServiceEndpoint $sma -Name "Daily-2:00PM"

18 Test, test, test…. Test your scripts, always! Define testing as part of process documentation, what are specific cases. What to do when the process fails. Pester your scripts.

19 Version Control with GIT/SouceTree
Visual visual representation of changes. Single or many branches. Rollback when required. Comments on each commit.

20 Basic GIT versioning

21 Simplify Commits and Pushes
PowerShell ISE Add-ons Automate manual tasks Speed up the process to commit changes, if it’s easy enough you will do it all the time. Build your own, or find one that work. One is coming for SMA! powershell-ise-add-on-tools.aspx

22 Git Commits

23 All the data is present…
Look in the database All the data is present… SELECT rb.RunbookName ,rb.LastModifiedTime ,rb.LastModifiedBy ,rbs.[TotalJobCount] ,rbs.[LastStart] ,rbs.[FailedCount] ,rbs.[StoppedCount] ,rbs.[RunningCount] ,rbs.[CompletedCount] ,rbs.[SuspendedCount] FROM [Stats].[vwRunbookSummary] rbs inner join [Core].[vwRunbooks] rb on rbs.RunbookId=rb.RunbookId Where LastStart IS NOT NULL

24 Reporting! Will be posted next week!

25 Don’t create elaborate Runbooks.
Stop, Drop, and Roll…. Keep things basic. Don’t create elaborate Runbooks. Common monitoring, vs individual monitors. Build modules for common functions More on Modules: modules-for-sma.aspx

26 Resources – Helpful links for getting started
System Req: Orchestration Option s: Runbook Output Messages: CheckPointing: automation-checkpoint-suspend-and-resume-runbooks.aspx Monitoring: troubleshooting-in-service-management-automation.aspx Assets in Depth: depth-assets.aspx David O'Brian SMA via PowerShell DSC: via-powershell-dsc/ PowerShell ISE Add-On: powershell-ise-add-on-tools.aspx Try Azure/OMS Automation too! us/documentation/articles/automation-create-runbook-from-samples/

27 Discuss… Ask your questions-real world answers! Plenty of time to engage, share knowledge. Evaluations: Please provide session feedback by clicking the EVAL button in the scheduler app (also download slides). One lucky winner will receive a free ticket to the next MMS! Session Title: SPONSORS


Download ppt "Service Management Automation: 3,2,1, Automate!"

Similar presentations


Ads by Google