unSkript Documentation
Free SandboxBlogGitHubSlack Community
  • What is unSkript?
  • Guides
    • Contribute to Open Source
    • Getting started
      • Sign Up/Install
      • Authentication
        • Okta configuration
          • Okta Groups Sync
      • Create a Proxy
      • Add Credentials to Connect your Resources
      • Key Terms
  • RunBooks
    • Prebuilt xRunBooks
      • xRunBooks for CloudOps
      • xRunBooks for Cost Optimization
      • xRunBooks for DevOps
      • xRunBooks for IAM
      • xRunBooks for SecOps
      • xRunBooks for SRE
      • xRunBooks for Troubleshooting
    • Creating RunBooks
      • Importing unSkript xRunBooks
      • Create a xRunBook
      • Add an Action
      • Connecting Actions
      • Create a RunBook Input Parameter
      • Create a Credential
      • Writing Notes
      • Running XRunBooks
        • Running RunBooks with Approvals
      • Schedules
      • xRunBook Executions
      • Alarms
        • Create an Alarm Webhook
          • Webhooks for onprem installations
        • Create a Grafana Alert
        • Attaching runbooks to alarms
      • Folders
      • RunBook Outputs
  • Actions
    • What is an Action?
    • Create Custom Actions
    • Create Actions with AI
    • Actions
      • Action Configuration
        • Configure Action Inputs
        • Add Action Inputs
        • Action Output
        • Action Iterator
          • Using Iterators
        • Action Poll
        • Action Start Condition
      • Anatomy of an Action
    • Prebuilt Actions
  • Healthchecks
    • What is a HealthCheck?
    • Create a HealthCheck
      • Create a HealthCheck Folder
      • Adding Checks
    • HealthCheck Parameters
    • Running HealthChecks
    • HealthCheck Remediation
  • Workflows
    • What is a Workflow?
  • Connnecting
    • Connectors
      • Airflow
        • Airflow Actions
      • AWS
        • AWS Actions
          • AWS Cloudwatch Actions
          • AWS EC2 Actions
          • AWS ECS Actions
          • AWS EKS Actions
          • AWS ELB Actions
          • AWS IAM Actions
          • AWS Postgres Actions
          • AWS RDS Actions
          • AWS RedShift Actions
          • AWS S3 Actions
          • AWS VPC Actions
      • Azure
        • Azure Actions
      • ChatGPT
        • ChatGPT Actions
      • Datadog
        • Configuring webhook in Datadog
        • Datadog Actions
          • Datadog Alert Actions
          • Datadog Metrics Actions
          • Datadog Monitor Actions
      • Elasticsearch
        • Elasticsearch Actions
      • GCP
        • GCP Actions
          • GCP Bucket Actions
          • GCP GKE Actions
          • GCP IAM Actions
          • GCP VM Actions
      • Github
        • Github Actions
      • Grafana
        • Grafana Actions
      • Hadoop
        • Hadoop Actions
      • Jenkins
        • Jenkins Actions
      • Jira
        • Jira Actions
      • Kafka
        • Kafka Actions
      • Kubernetes
        • K8s Actions
      • MongoDB
        • MongoDB Actions
      • MS SQL
        • MSSQL Actions
      • MySQL
        • MySQL Actions
      • Netbox
        • Netbox Actions
      • Nomad
        • Nomad Actions
      • OpenSearch
        • opensearch Actions
      • Pingdom
        • Pingdom Actions
      • Postgres
        • Postgres Actions
      • Prometheus
        • Prometheus Actions
      • Redis
        • Redis Actions
      • REST
        • REST Actions
      • SalesForce
        • SalesForce Actions
      • Slack
        • Slack Actions
      • Snowflake
        • Snowflake Actions
      • Splunk
        • Splunk Actions
      • SSH
        • SSH Actions
      • Stripe
        • Stripe Actions
      • Terraform
        • Terraform Actions
      • Zabbix
    • Proxies
      • Environment
        • RunBooks Across Environments: ServiceIDs
      • unSkript Proxy
      • AWS Proxy
      • GCP Proxy
    • Secret store
      • Vault
  • Tooling
    • Role Based Access Control
      • RBAC Roles
    • API reference
      • Authentication
      • Endpoints
        • Executions
        • RunBooks
        • Schedules
    • Command Line Tool
    • Notifications
  • Fundamentals
    • Jupyter Notebook 101
  • Use Cases
    • DevOps
    • SRE
  • Open source
    • Runbooks.sh
    • Contribute to Open Source
  • Lists
    • AWS Service Quota list
Powered by GitBook
On this page
  • xRunBooks
  • Actions

Was this helpful?

  1. Guides

Contribute to Open Source

How to Submit xRunBooks and Actions to Github

PreviousWhat is unSkript?NextGetting started

Last updated 1 year ago

Was this helpful?

xRunBooks

If you have created a xRunBook in the SAAS/Sandbox, select the xRunBook's 3 dot menu and choose "Download."

The Three dot menu:

In the repository, there is a sanitize.py script that will remove all of your parameters, credentials and outputs. Run this script against your RunBook:

python3 sanitize.py -f <ipynb file> 

RunBook JSON file

You'll need to create a <RunBook name>.json file. This JSON has several attributes:

  • Name: the name of your xRunBook

  • Description: a detailed description of your runbook.

  • uuid: A unique Id. Generate this using the description value, and running:

echo "DESCRIPTION OF THE RUNBOOK" | shasum -a 256
  • icon: The connector type

  • categories: the categories of the xRunBook.

  • connector_types: The connector type

  • version: The version

Save this JSON file. With these 2 files, create a branch of the repo, and submit a PR.

Actions

To submit a custom Action, first create a working version in unSkript. To create an Action that can be submitted to Open Source:

  1. Rename the folder, and the .py and .json files with teh same name - that describes your action (for example: "aws_get_ec2_instance_age")

  2. Next we'll edit the files. Copy the Python code of your Action into the .py file.

    1. Add a Class called InputSchema that describes the inputs for your action:

    class InputSchema(BaseModel):
        region: str = Field(
            title='Region',
            description='AWS Region of the ECS service')
  3. Now Edit the JSON file (this is created for you when you save from Docker):

    1. Name: the Name of your Action,

    2. Description: the Description

    3. Type: what connector will it use (ex: "LEGO_TYPE_AWS")

    4. Entry Function: The name of the function called to run the Action.

    5. Needs Credential: Boolean

    6. Output_Type: Dict, Array, String

    7. Supports polling: Boolean

    8. Supports Iteration: Boolean

  4. Write a readme file (a template is created on save from Docker). Attach images (save in the same directory) if helpful.

  5. Once these files are completed, create a fork of the repo, and submit a PR to the Master branch. The unSkript team will promptly review your Action and provide comments, or accept your submission.

Copy an existing "lego" in the.

Awesome-CloudOps-Automation
the xRUnbook list
menu screenshot