runbook | A framework for gradual system automation | DevOps library

 by   braintree Ruby Version: v1.1.0 License: MIT

kandi X-RAY | runbook Summary

kandi X-RAY | runbook Summary

runbook is a Ruby library typically used in Devops, Jenkin, Docker applications. runbook has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Runbook provides a DSL for specifying a series of steps to execute an operation. Once your runbook is specified, you can use it to generate a formatted representation of the book or to execute the runbook interactively. For example, you can export your runbook to markdown or use the same runbook to execute commands on remote servers. Runbook has two modes for evaluating your runbook. The first mode, view mode, allows you to export your runbook into various formats such as markdown. The second mode, run mode, allows you to execute behavior based on the statements in your runbook. Runbook can be integrated into existing infrastructure in many different ways. It can be integrated into existing projects to add orchestration functionality, installed on systems as a stand-alone executable, or runbooks can be defined as self-executable scripts. In addition to being useful for automating common tasks, runbooks are a perfect bridge for providing operations teams with step-by-step instructions to handle common issues (especially when solutions cannot be easily automated). Lastly, Runbook provides an extendable interface for augmenting the DSL and defining your own behavior.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              runbook has a low active ecosystem.
              It has 687 star(s) with 36 fork(s). There are 10 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 10 open issues and 24 have been closed. On average issues are closed in 15 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of runbook is v1.1.0

            kandi-Quality Quality

              runbook has 0 bugs and 0 code smells.

            kandi-Security Security

              runbook has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              runbook code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              runbook is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              runbook releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 10336 lines of code, 303 functions and 115 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed runbook and discovered the below as its top functions. This is intended to give you an instant insight into runbook implemented functionality, and help decide if they suit your requirements.
            • Render the configuration output
            • Create a new runbook .
            • Setup the layout .
            • Removes all dependencies from the directory
            • Sets up the item identified by run_items .
            • Initializes the Gemfile .
            • Set the value
            • Declare the timeout statement
            • Access the value
            Get all kandi verified functions for this library.

            runbook Key Features

            No Key Features are available at this moment for runbook.

            runbook Examples and Code Snippets

            No Code Snippets are available at this moment for runbook.

            Community Discussions

            QUESTION

            Disable Auto-Scaling of an AKS Node pool via Azure Powershell
            Asked 2022-Mar-28 at 15:00

            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:00

            With 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.

            Source https://stackoverflow.com/questions/71634385

            QUESTION

            Accessing post query params in Azure webhook
            Asked 2022-Mar-08 at 00:07

            I am trying to read the URL query params from a POST coming into my Azure webhook (PowerShell).

            My webhook is receiving a POST request such as:

            ...

            ANSWER

            Answered 2022-Mar-08 at 00:07

            Very specifically, Azure Runbooks, do not support query strings. From the documentation:

            To receive data from the client, the runbook supports a single parameter called WebhookData. This parameter defines an object containing data that the client includes in a POST request.

            The WebhookData parameter has the following properties:

            Property Description WebhookName Name of the webhook. RequestHeader Hashtable containing the headers of the incoming POST request. RequestBody Body of the incoming POST request. This body keeps any data formatting, such as string, JSON, XML, or form-encoded. The runbook must be written to work with the data format that is expected.

            Azure Runbooks has 2 parts to it, triggers and runbooks:

            The Runbook (Right Box) only accepts the single WebhookData object to manage variable and data that Azure Runbooks will operate with.

            Webhooks (Left Box), handles the triggering, receiving of data and passing it on to the Runbook. Very specifically, the RequestBody is specified as the:

            Body of the incoming POST request. This body keeps any data formatting, such as string, JSON, XML, or form-encoded.This body keeps any data formatting, such as string, JSON, XML, or form-encoded.

            With this definition, very specifically, even though WebHooks can support query strings, in this case for triggering Azure Runbooks they are explicitly ignored.

            Aside, if the end desire is to subscribe to Microsoft Graph events, the "better" way is to use Event Hubs to handle notifications:

            Using Azure Event Hubs to receive change notifications differs from webhooks in a few ways, including:

            • You don't rely on publicly exposed notification URLs. The Event Hubs SDK will relay the notifications to your application.
            • You don't need to reply to the notification URL validation. You can ignore the validation message that you receive.
            • You'll need to provision an Azure Event Hub.
            • You'll need to provision an Azure Key Vault.

            Source https://stackoverflow.com/questions/71385586

            QUESTION

            Convert string to datetime in Azure automation Account (powershell)
            Asked 2022-Mar-07 at 10:50

            I am trying to get the difference in days between a string datetime and the current date. I tried following code on my local PC

            ...

            ANSWER

            Answered 2022-Mar-07 at 10:50

            As requested, here my comment as answer

            The date format in $DateInName shows it is formatted as 'dd-MM-yyyy'
            (2-digit Day, 2-digit Month, 4digit Year).

            Either do

            Source https://stackoverflow.com/questions/71379299

            QUESTION

            Azure Runbook Authorization_RequestDenied AzureAD module
            Asked 2022-Feb-23 at 07:34

            I'm trying to create a runbook in Azure to perform AzureAD commands. I'm receiving an error at the very beginning (skipping the parameters setup):

            ...

            ANSWER

            Answered 2022-Feb-23 at 07:34

            This error occurs when the user account that is being used to run the Azure PowerShell cmdlets does not have the correct administrator role .

            Get-AzureADUser command uses Azure AD graph in the backend. You may need to add the Application permissions ,Directory.Read.All of AAD graph (Azure Active Directory Graph) and make sure to grant admin consent for the same.

            Check support-for-azure-ad-graph-permission

            (or)

            Go to Azure portal > Azure AD > Roles and Administrators > Select Directory Readers role and assign this role to the runbook required.

            Reference: Authorization_RequestDenied error

            edit:

            Source https://stackoverflow.com/questions/71178001

            QUESTION

            How can we use Python to load files into Azure Blob Storage or Azure Data Lake Storage?
            Asked 2022-Feb-14 at 04:47

            I am relatively new to Azure. I am trying to figure out how to use Python to load files into an Azure storage account, such as Data Lake or Blob Storage. I read the info from the following two URLs, and I am stuck about how to proceed.

            https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-directory-file-acl-python

            https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python

            Maybe I missed something from those resource, or they are not right for what I am trying to do. I just want to get a simple example working so I can start to understand the process better. I would like to do either of the following.

            1. copy a file from my desktop to Azure Blob Storage or Data Lake Storage

            2. download a file from a URL and save it to Azure Blob Storage or Data Lake Storage

            I want to run Python from Azure, so I want the code to run in a 'Runbook'. Can someone point me in the right direction to do either item 1 or 2, as described above, or ideally both 1 and 2? Thanks.

            ...

            ANSWER

            Answered 2022-Feb-14 at 04:47

            You need to add the azure_storage_blob python package in your automation account

            Then, you can use the python code below to upload file to azure blob storage from a URL:

            Source https://stackoverflow.com/questions/71075764

            QUESTION

            How to run Python scripts on Azure?
            Asked 2022-Feb-07 at 17:35

            I am trying to run some Python code in Azure, for the first time ever. I Googled 'how to run Python scripts in Azure' and came across the following link.

            https://docs.microsoft.com/en-us/azure/automation/learn/automation-tutorial-runbook-textual-python-3

            Essentially, I need to do this.

            Open the textual editor by selecting Edit on the MyFirstRunbook-Python3 pane.

            Add the following code to authenticate to Azure:

            ...

            ANSWER

            Answered 2022-Feb-07 at 17:35

            Most likely you haven't created an Azure Run As Account. Follow the steps here to do so.

            Source https://stackoverflow.com/questions/71019839

            QUESTION

            Azure Automation Job runs fine manually but fails when triggered by webhook
            Asked 2022-Feb-07 at 12:39

            I've got an Automation Account in Azure that runs a Powershell runbook. It runs perfectly fine when I trigger it via the portal, manually specifying the inputs

            I've created a webhook with the same input settings. I call it from CURL like

            curl -d '' https://800b2bec-b1ae-4fa1-ba30-8c7d32096828.webhook.ae.azure-automation.net/webhooks?[redactedtoken]

            The webhook shows as triggered successfully in the portal, however the job fails with no visible error.

            There is no output, even though the first line in my powershell function is Write-Output "Hello"

            There are no exception messages, no logs at all.

            Any idea how I might get more information as to what might be going wrong?

            I've updated the Az modules and enabled verbose logging in the runbook.

            Full source below, if it helps.

            ...

            ANSWER

            Answered 2022-Feb-07 at 12:39

            We have tested this in our local environment it is working fine, Below statements are based on the analysis.

            In our local environment, We have created a Powershell runbook running with different PowerShell Versions 7.1 & Version 5.1.

            • Using the above share Script & webhook URI, when we are trying to invoke the runbook (PowerShell version 7.1) using the `Invoke-webRequest method it is continuously failing.

            Alternatively, We have tried to invoke the runbook (PowerShell version 5.1) using the Invoke-webRequest method it is working fine.

            We would suggest you to use Powershell Version 5.1 instead of 7.1 in your Runbook.

            Here is the sample Output for reference:

            Source https://stackoverflow.com/questions/71002575

            QUESTION

            Trouble running PowerShell command with subprocess library in Python script runbook (Azure automation account)
            Asked 2022-Feb-07 at 08:40

            I'm new to Azure automation, and have a python script that runs fine on the local machine. The script runs a PowerShell command to get sign in logs, and does some string parsing on them before writing to a storage account table. I was able to install all dependencies for the script via the "Python Packages" blade in the automation account. Is there a way to add powershell.exe somewhere so that the subprocess library can be used to run the PowerShell command? Alternatively, is there a library you can import to be able to run the PowerShell command or grab sign in logs from Azure AD without directly using the powershell.exe file?

            Also, Microsoft.Powershell.Core is added in the Modules within the automation account. Am I just using the wrong filename and should use something other than powershell.exe? Is there a different module you have to install, or am I referencing it wrong?

            Here is the relevant portion of the script:

            ...

            ANSWER

            Answered 2022-Feb-07 at 08:40

            I have tested in my environment

            I get the same error as yours if I use subprocess in my python script to run PowerShell command

            This is because the subprocess module is not able to find the powershell.exe path

            For the workaround, you can use either of the options:

            1. You can use PowerShell script instead of python script
            2. You can use MS Graph API in your python code instead of PowerShell commands

            Source https://stackoverflow.com/questions/71003575

            QUESTION

            Alternate way to get Azure AD sign in logs in Python without using subprocess library and powershell.exe
            Asked 2022-Feb-07 at 04:00

            As far as I can tell by looking at other posts, using the subprocess library in Python is the most popular way to execute PowerShell commands from within Python. For example:

            ...

            ANSWER

            Answered 2022-Feb-07 at 04:00

            I have tested in my environment

            You can use MS Graph API query in your python script to get the Azure AD sign in logs of the users

            You can use below python code:

            Source https://stackoverflow.com/questions/71005240

            QUESTION

            Assign the result of a query to a variable in powershell in Azure-Runbooks
            Asked 2022-Feb-04 at 07:00

            I have a runbook using automation in Azure. It is getting a single integer result from a table and it can return the correct value. The code I am using is below and it works.

            ...

            ANSWER

            Answered 2022-Feb-04 at 07:00

            You can use the Start-AzAutomationRunbook cmdlet to trigger a child runbook from the another run book inside the automation account.

            Source https://stackoverflow.com/questions/70941890

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install runbook

            Add this line to your application's Gemfile:.
            Install runbook at a system level using gem:. Set any Runbook configuration in /etc/runbook.conf. Generate runbook files using runbook generate runbook. Execute runbook generate help runbook for more details. Installing Runbook at a system level can be useful for executing runbooks on remote hosts or within docker containers. One disadvantage of installing Runbook at a system level is that there is no built-in solution for dependency management.
            Install runbook using gem:.
            Add this line to your project's Gemfile:.

            Support

            Bug reports and pull requests are welcome on GitHub at https://github.com/braintree/runbook. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/braintree/runbook.git

          • CLI

            gh repo clone braintree/runbook

          • sshUrl

            git@github.com:braintree/runbook.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular DevOps Libraries

            ansible

            by ansible

            devops-exercises

            by bregman-arie

            core

            by dotnet

            semantic-release

            by semantic-release

            Carthage

            by Carthage

            Try Top Libraries by braintree

            manners

            by braintreeGo

            credit-card-type

            by braintreeTypeScript

            card-validator

            by braintreeTypeScript

            braintree_ios

            by braintreeSwift

            braintree_php

            by braintreePHP