logo

NJP

Runbook Automation & ServiceNow 29855340

Import · Jan 09, 2019 · video

all right well we've got pretty good a number of people in here so we're gonna go and get started so I'm maybe Anderson I'm a technical analyst with crucian partners and today we're going to be looking at going over the rhumba automation and ServiceNow on specifically we're gonna kind of go over what is runbook automation we'll touch on a few few subjects on what it can do for you guys in your environments and then we'll actually look at a run book in action and see what that process looks like and actually kind of follow it along to start off we're just gonna touch on a little bit of history here with faroush and partners we were founded in 2003 as specialists and IT Service Management initially we were focused on the finance industry but as ITIL became more broadly adopted we have expanded into many different sectors such as law health care we've done retail few various education establishments different universities as well as into the manufacturing area with textiles and steel manufacturing we've been very successful with a 40% growth rate over the past two years additionally our IT consultants our ITIL certified but we are not ITIL academics we have a strong practical skills and over the last seven years we have taken what we've learned from all of our implementations everything from ITIL and on everything we can to make it better and are constantly evolving our processes to ensure we're always staying ahead of the curve we we are a complete IT service integration company we've got a full menu of services such as education various training courses we've actually helped ServiceNow develop their training courses that are offered throughout the year as well as ones we offer directly in the Chicago area out of our office we do have a team of ServiceNow developers who are very experienced at developing and implementing processes within ServiceNow these processes can be anything from standard IT from change management all the way up to human resources and facilities purchasing you know it's kind of that part where ServiceNow is evolving as a platform as a service there is you know no limits if there's any process out there that you guys want to define and have tracked in service now that type of stuff can be can be set up and delivered so to get into why we're all here today what is runbook automation well it's the best thing since sliced bread hmm more specifically it automates IT tasks within your environment they can be simple or complex affecting multiple servers or devices within your infrastructure it does let your unskilled Tech's or employees do very skilled things so you know something that might you might not want to open up to your regular employees that is more administrative driven runbook automation can be a way to open up some of those tasks to those those texts and provide a really defined process it is fully integrated with the ServiceNow platform so you'll be working you know entirely within that platform to set up everything once the mid server is in place and some of the systems that are BA can automate we've got VMware out there any system that presents a web service ServiceNow can speak to it and interact and then we can also work with command line like such as SSH or PowerShell some stuff coming soon is there is some some work being done to implement runbook activities that can work directly with Active Directory such as disabling user accounts creating new ones so some of that identity management stuff so why should we use our be a value less labor and skill required and we free up our administrators from routine tasks by defining in Redbook a process that is you know commonly done or something that might be relatively complex but you know a lot of times administrators are sitting there waiting for things to happen if they're doing installations or processes this can free it up they fire off a particular run book and that's going to go do all the work for them while they they go on to to more meaningful tasks I'm speed is another part we do get immediate execution so as soon as you hit go on that run book unless there are any approvals that need to be accounted for as part of that run book to make sure we're not just going crazy out there they do execute immediately there's not really any lag time their reliability we got by setting up run books you'll be able to define your process and best practices in your environment every time so what that's going to do is ensure that each time a run book gets ran it's going to be the same run book every time instead of administrator one administrator two or administrator three doing it differently or slightly differently each time that that that particular process needs to be applied it does also help you capture the knowledge of that process right in the run book so whatever that process actually looks like and what skills are involved to accomplish it you can set right up in the run book and that actually becomes your documentation of what that process looks like and it does also provide some hotted information out there for those with that that is a key driver it does allow you to audit who's kicking off those run books but the whole run book process looked like for that particular run so lots of information there to help kind of track down what might be going on or failing so why should we not use RBA or run book there are some things that should not be automated mostly we don't want to use RBA when the development cost is greater than the benefits I mean the benefits are obvious we're gonna save a lot of time you know you're gonna free up admins all that kind of stuff but sometimes the work effort to get there can be really expensive it may not be worth it if we're looking at a process that's used maybe once every four to five months six months if there's a lot of development time involved to get that process in place and we only use it sparingly it doesn't provide really any benefit there you know documenting it's good but something that's gonna take a lot of time to get set up in ServiceNow and define capturing all the knowledge setting up the workflow and then all the process around implementing it including testing and all that kind of stuff we want to make sure it doesn't then exceed or get too costly for the the benefit we're looking to get out of it so we're going to look at some of what runbook and ServiceNow looks like and what's involved and what gets added to your instance when you have it turned on it does extend the workflow application and ServiceNow so all of your run books will be designed through that workflow editor for those that are familiar with it and it adds a bunch of extra activities to it and these activities are grouped in what are known as process packs such as VMware SSH PowerShell they've added some Amazon ec2 connectivity there to set up and work with the Amazon Cloud PowerShell you know lots of lots of options and ServiceNow is constantly adding more such as Active Directory which is which is on its way so what doesn't a runbook look like it's like any other workflow in service now only it really actually does what it's showing you instead of you know some of the other workflows they just create tasks which which help get work done they're not really actually going out to your environment and doing anything runbook adds that functionality for this example that we're going to look at today we're gonna look at restarting a server that's here of my my house in my office and I'm working out of and we've got some options in there for for restarting it we're gonna get the IP address from different areas so we're going to go through kind of kick into creating an incident and kicking off what that looks like so some of the skills when working with rent book it's really helpful if you've got some folks that are familiar with what that run book is gonna be used for so if you're looking at implementing something around Linux or UNIX having some folks that are really familiar with this SSH scripting that can work with your ServiceNow administrators to help get the processes in there same thing with PowerShell for those that want to modify or manage Windows servers there is some VMware connectivity directly into the vCenter application there's an API that ServiceNow uses and calls directly into it for creating your VMware images and instances same thing with Windows and Linux server administration that kind of follows back to PowerShell 1 make sure you're following good practices there so someone who's got experience managing or administering Windows servers as another great great thing to really have same thing with the desktop side of stuff so there's the servers but through service now is runbook automation there is some install application type activities that run out there we can look at installing applications on on any any Windows server that exists out in your environment or windows let me rephrase that Windows operating system that exists in your environment that can run PowerShell so Hinde runbook it does utilize the mid server for those that are unfamiliar with what the mid server is it's basically the connection between your network and ServiceNow so the kind of structure you've seen on the right side you've got ServiceNow which exists out there in the cloud then you got your company's firewall and pass your firewall and inside your network you've got the mid server and that mid server is what then goes and connects to all of your network here your IT systems computers basically everything that's out there so instead of having to open up your entire network you just open up one little connection between the mid server and ServiceNow and specifically that's over the HTTP soap protocol sorry about it so what it also utilizes is what are called probe technologies which provides integrations with vmware so ssh the probes are basically in service now what does all the work so to look at what the actual RBA activities do and what they actually are kind of doing behind the scenes they write a probe record to what's known as the ECC queue in ServiceNow so when it writes that record it's gonna pause in the workflow while that probe executes and then when that probe gets done out there the mid server is gonna grab it and once the mid server grabs it it's going to look at what work it needs to do and execute it based on the information in that probe and it's gonna send those results back to the ServiceNow instance via what's called a sensor and then the runbook activity is gonna continue analyzing continue and analyze the results that came back from that sensor script so whether it was successful whether it failed or if you're running PowerShell scripts directly or SSH scripts directly it's gonna report back all the information that was printed on the screen when that script ran so you'll be able to kind of analyze that information and parse through it to do some highly custom function and run book and then once it's done analyzing it it's going to edit exit with the possible condition some of them are built-in and some are from sensor scripts so we'll we'll look at a few of the built-in ones that that get out put it back in the example we're going to look at so what we're gonna go into next is basically that live demonstration of the run book itself basically set up a real simple example for us today it's basically I've created a user here called Joe IT server rebooter and he's gonna create a new incident for us and you know so somebody may be calling into the the environments and if they're saying hey you know I'm unable to access a web site and so he's gonna sign that off so this tech that's working on it he's gonna call and he's gonna go okay well our server guys probably need to look at that so he's gonna sign it off to server management and in our example Joe IT server review derp rebooter also happens to be a part of the server management team so I'm going to go and save this record into ServiceNow you and then what I've added to help us facilitate in this is there's a UI action that we're going to leverage to restart the the configuration items specified on this particular ticket so if I scroll down in my example I've added it as a link at the bottom of the form so that way we don't clutter up all the buttons along the top of the form so there's just a simple restart server link out here so when I click on that it's actually going to go look at the configuration item that's associated with this particular ticket it's gonna run a workflow in the background so if I click this show workflow link up here it's going to show me the run book that's running in the background that I kicked off by clicking that restart server link and in our example here we can actually see the start area and we've got this big red guy out here where it failed so it actually had an error of some kind and was unable to resolve the the IP address based on a DNS name so to account for that in the event that for some reason DNS fails or can't find it we've set up another activity out here to kind of be a catch-all so it's going to get the IP address from the CMDB record we specified on that ticket and use it instead so for some reason can't dns we're going to next try and get that IP address and then move forward so then we're going to add a work note to the ticket letting them know the server reboot is starting so if I come back over to our incident and if you guys heard that in the background that was the workstation restarting for us so I'm going to reload the form for us here and then we can see some of the logs that get captured there so these I kind of left these out here and as examples I wanted them to kinda show up this way so here we can see where we've kind of informed the the person that executed this that they're restarting the server and then we would dynamically plug-in that servers name so we know what's going on there and then we'll have an IP address of the IP that got resolved or found through that script so that way we can dump out some extra information the work notes so people know what's going on and then we flag another activity that says the reboot process was successful when it actually completes it so if I work back at this look back at this workflow and refresh it we can see we've kicked along we've actually successfully restarted the server the reboot was completed so as we're adding that work note and then we hit the end and then you can see that in case there was some sort of fail here we're capturing that to where we'd actually add another work now letting another that failure happened and we can add another activity in here where we might assign it off to another group to manage that that failure and see if they can get the server back online I see we have a few questions out here see we can we can grab those here we'll get the questions here in a minute guys I'll touch on the two that are out there and we'll we'll head over those so one of the other things I kind of want to show you guys well we've we've got some time and while we're at here at the live demonstration this is more of what's going on in the background so if I come back over to an administrator that can actually look at some of the background stuff when ServiceNow is firing off those those probes that we were talking about earlier it stores them in what's called the ECC queue so I've type ezc in my filter text and alternatively I can scroll down and go to the runbook automation application and I can look at that queue that's going on in the background so we can see some of the scripting that's going on here where we've got these input records and some of these output records the input records are those probes that get fired out let's say do some work and then the output records are what are sent back from the mid server letting us know that that work has been completed so this is where it's basically logging all of that work that's being done which can at the end of the day becomes a large portion of your audit trail of who's doing what doing it where at what times and what's being fired off in your environment you I can ends the live demonstration I had setup for you guys the Rome books they can get much more complex than just restarting a server that was just a really really simple example of what can be done there but the the sky's kind of the limit if there's something that you can do via PowerShell scripting or so I was reading a question that came up we'll get to that in just a minute as well we've got two more slides when I just kind of touch on for you guys and then we'll hop into answering some of these questions and really dig into to what's going on there so we'll have some some prime examples to answer those questions you guys have out there so again the process PACs that are out there and we'll dig into this when we get onto one of the questions out here as to where these show up at but the there's a vmware process pact attic out of the box which gives you some access to clone out a template power vm's up and down you can configure a vm take a snapshot over to in a snapshot or destroy one and then powershell has some other similar activities where we can install applications join systems to the domain a couple out of box ones or you can run any kind of powershell script that you want that kind of ends what i had set up for everyone today run books one of those parts we're getting into some of the questions that we have out there really drives kind of what can be shown and what can be done there so we'll go ahead and step into the three I've out there and if anyone else has questions just feel free to type them in no question is too too simple or too straightforward anything's welcome and we'll touch on as many as we can here so the first question I have is do we know if there's interfaces with Google in the pipeline I am unaware of any that are out there the only caveat I could give to that as far as getting something in there today would be if Google Offers any of its uh API is via web services I'm not too familiar with what Google has in that area but if there's a web service type call that can be done there that would be the initial way to interface with Google today but as far as ServiceNow creating some activities that'll be available out of box that's a good idea I'll keep that one down and pass it on to them as an idea to get them spooling into those so I got another question about modifying the scripts for the mid server I guess can you provide a little bit more detail around that the mid server itself doesn't really have scripts that sit on it it does have some Java libraries and Java packets that that sit out there that are being called from from the ServiceNow instance but as far as the scripting that goes into run books that's all done right in the run books themselves or you can create custom ones as well but uh in the meantime I'm gonna go and skip on to the next question and then whoever asked the one about can I modify the script for mid server if you can throw in a follow-up question but maybe a little bit more detail there if you're referring to the mid server itself that's sitting out in your environment or what ServiceNow is going to be running on the run book that'd be great you so the next push we have out here is showing where all the scripts or commands to restart the server for an activity is written so what we can get into there is service now it does offer and completely allow you to add as many activities as you want so actually let's start off in the the work flow editor application and that I'm actually going to open my restart server workflow that we were looking at a moment ago so if we look at the workflow that we've got out up here we can see kind of all the stuff that was being checked and ran and this activity really most of the activities that are out here are all available to you to go in and modify or expand or duplicate make them do different things so if I were to add this out here to it over here on the right side when you turn the romack automation on you're going to get a whole bunch of applications that added or activities more specifically added to your workflow capabilities and the one that I used was this restart Windows Server activity so when I drag that out on to the workflow itself it's going to ask me some basic information in this case I'm actually passing over a specific hostname IP address to it to ease with the demonstration today but here you could put in a dynamically resolved you know the IP address of the the configuration item that was found and have it you know be completely dynamic on what's going on there so some real simple information on this restart windows every one as far as where these scripts are ran or more specifically where the scripts are configured that that does all this work so when you're looking at the activity it's real simple information it's not showing you any of the actual kind of code that's going on in the background well I don't I think we'll have a lot of time to really delve into the nitty-gritty of what's going on into to it where ServiceNow stores all that information is under this workflow header right here and then under activity definitions you can also get to it under run book automation as well but if we look in this list this is basically where ServiceNow defines all of the activities that show up in that right column whenever you're in the workflow editor so somebody look really familiar for those that have been using the workflow application so far like approval group approval user more specifically the question was around the restart server one so we'll take a look at that guy so here's that restart Windows Server activity it's basically running a lot of Java in the background or JavaScript basically creating classes so this is where all that script lives to get in and actually modify what it's doing if you really wanted to change it or see what it's doing and duplicate some of them or expand upon them this stuff's completely available for people to expand upon and duplicate make as many activities out there that makes sense to have so this restart window server was actually one that ServiceNow didn't have one run but went live and was one that they added and during our training course for it it was an activity that we actually added as part of one of our labs so lots of lots of extensibility here to add whatever whatever types of activities that you would want to add out there as far as good ideas for activities the only thing I would really look at would be an activity would be something that's a real global type of work being done like restarting a Windows server where you're gonna be passing a really dynamic information so that's where you can come in and and actually get in here really defined what's going on so we can see the command that it's running is basically building the powershell script to actually restart the server so if anyone on the call is familiar with power ship powershell these lines of code might look really familiar so it's just if you wanted to make a real simple change to what it's doing here you know you would just basically replace all the information that's in this this command little variable right here and whatever whatever needed to be in there would be what you would would have you you you so the next question we have out here is when installing applications on remote systems can we control the bandwidth so we don't saturate a network to be honest that's one area have not looked into the installing applications activities are pretty new but it utilizes PowerShell to do it so if you're installing the applications on multiple remote systems I would expect it to saturate you know we're probably a decent amount I don't think it leverages any of the the bits functionality like System Center Configuration Manager might leverage to transfer that type of information it's really just a powershell script that takes in some parameters and then runs that installation file in your environment and then kind of passes the parameters of what machine is going to be in there and stuff so it looks like we got a message one of the guys out there listening to that one so if we do want to manage the bandwidth on there its managed in an area around the number of threads in the mid server that it can do at any one time 25 is a default but you can turn that number down that's located in the configuration dot XML file so that would be where you could go in there and if you noticed it using a lot of bandwidth for that particular mid server that's running those those applications you could turn down the thread count and that would help alleviate some of the network bandwidth as well you you all right any other questions from anyone I think I've covered all the ones that are out there you you you all right well if there are any other questions that people do have or they come up with after the fact feel free to let us know we'll be glad to to get out there and answer those questions for you guys we will have this webinar recording posted on our fruition site as well the one last thing I want to show you guys is the wiki pages that do exist out there for it the October release does have a lot of stuff coming I don't know if Active Directory is part of it I do notice that Active Directory is out on the wiki as far as what types of commands can be ran but it is not in my instance currently with the the most recent I think October preview to release you you so we can look here at the stuff that's coming out in the October 2011 so this is the current release candidate that's out there it looks like we're going to be adding the Linux user password reset a to user passwords so some extra activities out there and then this page out here has a listing of and description of all the runbook activities that exist currently today or that will be at the very least included by the time the October release comes out so I got all the SSH commands out there we've got vmware at the bottom we're gonna powershell you know that most of these are already out there change service state those should be coming along as well in the october release that we've got coming out but again on the wiki there's just tons of tons of information out there you know just search on runbook and we'll hit that top article that's gonna have a lot of kind of general information about runbook out there some notable upcoming changes that are out there and again some of the pictures and examples and demonstrations you can find them out here on the wiki article as well definitely a great place to get information and kind of collect everything together you you you all right again thanks guys for joining and ladies if there any out there I hope you guys have a wonderful afternoon and again feel free to hit us up on the Twitter Facebook we've got all that out there available for everyone to follow up on and we'll be glad to get back to you guys with any questions that you might have and again have a great day you you

View original source

https://www.youtube.com/watch?v=yWIZ7loh8HE