runbooks | Sample Automation runbooks | Automation library
kandi X-RAY | runbooks Summary
kandi X-RAY | runbooks Summary
Sample Automation runbooks
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of runbooks
runbooks Key Features
runbooks Examples and Code Snippets
Community Discussions
Trending Discussions on runbooks
QUESTION
I have an AKS with 3 Node pools - 2 USER type and 1 SYSTEM type. I want to create an automation via Azure runbooks that will scale the 2 USER type Node pools to zero during off-hours and then re-enable auto-scaling to the Node pools with their previous Min and Max count.
As for re-enabling the auto-scaling I found the command for that:
...ANSWER
Answered 2022-Mar-28 at 15:00With the features that are currently available, to disable an AKS node pool's auto-scaling via Powershell, I would recommend to leverage Agent Pools - Create Or Update REST API and Invoke-RestMethod PowerShell cmdlets and create an Azure Automation runbook something as shown below.
QUESTION
My free AWS tier is going to expire in 8 days. I removed every EC2 resource and elastic IP associated with it. Because that is what I recall initializing and experimenting with. I deleted all the roles I created because as I understand it, roles permit AWS to perform actions for AWS services. And yet, when I go to the billing page it shows I have these three services that are in current usage. [1]: https://i.stack.imgur.com/RvKZc.png
I used the script as recommended by AWS documentation to check for all instances and it shows "no resources found".
Link for script: https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-awssupport-listec2resources.html
I tried searching for each service using the dashboard and didn't get anywhere. I found an S3 bucket, I don't remember creating it but I deleted it anyway, and still, I get the same output.
Any help is much appreciated.
...ANSWER
Answered 2022-Jan-12 at 22:28ok, I was able to get in touch with AWS support via Live chat, and they informed me that those services in my billing were usages generated before the services were terminated. AWS support was much faster than I expected.
QUESTION
I have created a basic Bicep template to deploy Azure Automation Acount. It contains a Runbook with the Powershell script and the linked Schedule. So far so good. The problem is to assign the Azure Role (Owner, Contributor, Reader) to the Managed Identity of this AA. I have all the needed values but have no idea how to put them together. To assign Azure Role via Bicep Template you should get the principalId of your Managed Identity of this AA which is pretty easy:
...ANSWER
Answered 2021-Nov-26 at 09:16If you are deploying role assignement for resource group scope then you can use the something like below:
I tested it for creating only automation account and assigning the owner role at resource group for the system assigned identity of the automation account.
QUESTION
I'm trying to deploy multiple python runbooks using Azure Automation Account, the python packages used are the same between the runbooks but every runbook corresponds to a different project or initiative. And I'm looking for some architecture design advise here.
So, my question is: Should I create different automation accounts (cause there's not max limit of automation accounts) for every project, in order to maintain the logics separated?
Or should I use the same Automation Account and create different runbooks inside, and try to group similar runbooks logics into the automation account? (the advantage of the latter is that the python packages are loaded only once in one automation account)
Important note: the access permissions will be the same on every runbook, so, permissions wise, there is not problem in creating different or use the same automation account.
...ANSWER
Answered 2021-Oct-21 at 12:22When we talk about the automation process, azure bill us for runbook jobs and watchers. For runbook jobs you will be charged for the total number of minutes you run your jobs across all automation account in a month with first 500 minutes free. Check this document for more information on pricing.
So, pricing won't be any problem in your case. Till now I haven't found any scenario that specifies when we should use single or multiple automation accounts and it's mostly based on the project requirement.
If your project requirement is to have a model where separation of the logics of the jobs are of most priority then you can create different automation account for multiple runbooks (For example, you might use one account for development, another for production, and so on) or else I would prefer to use the same automation account.
Check Azure Automation document and Automation account document for more information.
QUESTION
I'm using the azurerm_automation_runbook module to create an Azure Automation Runbook. Below is the code I'm using.
...ANSWER
Answered 2021-Oct-08 at 08:03I tested this on my environment and I noticed that simply changing the uri in publish_content_link
doesn't really do any changes in the runbook script.
In order to apply the changes in the script you have to change the name
of the runbook too instead of only changing the uri
.
So, after you change the name and uri both in the terraform code and do a apply. It will recreate the runbook with the new name and content in the portal.
Outputs:
OR
If you want to change just the content and not the name , then you can save the script from that link locally and pass the content to the already created runbook and it will successfully update the content.
I tested this as well with the below code:
QUESTION
I'm having trouble running the AzurePowerShell@5
task in my Azure pipeline.
I have boiled it down to this simple script:
...ANSWER
Answered 2021-Sep-29 at 11:25You are missing ScriptType: 'InlineScript'
QUESTION
I'm wondering if there's a way I can define common functions in a separate runbook in Azure Automation? For instance, I've got a logging function that timestamps the messages and exits on errors that I use in multiple runbooks. I'd like to define it once, and then call it from the other runbooks. And if I change it in the future, I only have to change it in one place.
I know I can define parent / child runbooks and call them inline, which led me to wonder if I could split out, for instance, a function definition and then call that runbook from another runbook to "import" the function into the current runbook. So for instance, I have a runbook called "Test-FunctionDefinition" with the following code:
...ANSWER
Answered 2021-Sep-21 at 07:41It looks like it should be possible - Create modular runbooks in Automation
You have twop options:
- Inline - Child runbooks run in the same job as the parent.
- Cmdlet - A separate job is created for the child runbook.
For powershell runbook it should be easy as this
QUESTION
I have this app that I need to execute on a specific Azure VM (GPU heavy) daily. I don't want to pay for the machine running 24/7 and I am looking for a way to automate this. What would be the best approach for this?
I am reading up on Azure Runbooks but I'm not 100% sure if this can be achieved. I was also thinking if scheduling an Azure Devops Pipeline to run and scale up the machine and execute the console app and then automatic scaling down of a machine if the CPU load is low.
This seems like a typical and basic scenario to which I cannot find an easy solution.
...ANSWER
Answered 2021-Jul-23 at 18:33You can start/stop VMs on a schedule in Azure. You could also modify your app to shutdown the server as soon as it exits so the VM is running for least possible time (instead of waiting for the scheduled shutdown).
QUESTION
New to powershell.. I have 2 Json , the first one gotten from a file, the second one that I am converting after doing a query. I would like to update a value in the tag section of the second files if it happens that values in name section are sames in both json :
json file 1 is created and read/loaded with the below :
...ANSWER
Answered 2021-Jun-09 at 20:15So, for the first question, how to find the items of the 2nd JSON where the Name value is in the Name values of the 1st JSON:
- First you can convert the first one to an object (like you're already doing):
QUESTION
Can multiple runbooks run simultaneously in an azure automation account
? If yes, how many?
I have checked the microsoft documentation but I couldn't find anything relevant. From my experience, i have seen a runbook can be completed while another is in running status.
But I see that the runbooks
are queued. Is there a limit for simultaneous runs? If yes, can it be increased?
ANSWER
Answered 2021-May-12 at 06:38Can multiple runbooks run simultaneously in an azure automation account? If yes, how many?
Yes, more specifically, it should be runbook jobs instead of runbooks, starting a runbook in Azure Automation creates a job, which is a single execution instance of the runbook.
And runbooks in Azure Automation can run on either an Azure sandbox or a Hybrid Runbook Worker, they have different limits, if you start your runbook in the portal, it uses Azure sandbox.
For Azure sandbox:
For Hybrid Runbook Worker:
But I see that the runbooks are queued.
The status Queued
does not mean the runbooks are waiting for the running jobs to complete, Azure Automation assigns a worker to run each job during runbook execution, they are just waiting for the worker.
Reference - https://docs.microsoft.com/en-us/azure/automation/automation-runbook-execution#job-statuses
Is there a limit for simultaneous runs?
Yes, as mentioned above, there is a limit 200
for simultaneous runs per automation account for Azure sandbox.
If yes, can it be increased?
No, it cannot be increased.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install runbooks
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page