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
  • Running xRunBooks across Environments
  • Credential Setup
  • xRunBook Setup
  • Example:

Was this helpful?

  1. Connnecting
  2. Proxies
  3. Environment

RunBooks Across Environments: ServiceIDs

Run your RunBook across multiple environments

PreviousEnvironmentNextunSkript Proxy

Last updated 2 years ago

Was this helpful?

Running xRunBooks across Environments

Often, you'll need to run the same RunBook in multiple environments. Using the ServiceId, the RUnBook remains the source of truth, and one RunBook run against multiple environments.

To make this work, we'll move away from distinct credentials for each Action, and switch to ServiceIds:

Before we get ahead of ourselves, let's take a step back and start from the beginning.

Credential Setup

In each environment you wish to run the xRunBook in, you'll need a credential for each service. For each of these credentials, create a ServiceId (that is the same across environments.)

For example: you have an AWS credential in two environments: dev and prod with the names AWS_EC2_dev and AWS_EC2_prod. Give each of these credentials a serviceId (for example AWS_EC2).

xRunBook Setup

In order to run a xRunBook multiple environments, you'll need to 'Enable Environment Selection" on the RunBook Details page.

Next - open the xRunBook Editor. For each Action change from Credential to serviceId, and select the serviceID.

Now, when you run the xRunBook, you'll need to add the environment as an input parameter.

Example:

  1. Navigate to xRunbooks, click the "unSkript xRunBooks" tab.

  2. Search for IAM, and the "Create IAM User" will appear. Click the menu button to the right, and import this xRunBook into your proxy.

Now, open the xRunBook ("My xRunBooks" and it'll be at the top of the list). Click the menu button, and pick "Open Details." on this page, select the "Enable environment selection" checkbox:

Now, we can edit the Workflow - configuring each Action. Click the Edit button. For each Action, you can configure a SessionId for the Credential instead of the actual credential.

Since the Credential is a variable that points to a credential in BOTH "test_staging" and "test_production", this xRunBook can be run in either environment. Repeat for each Action in the xRunBook.

Save the xRunBook, and when you click "Run" in the xRunBook page, you will be prompted to choose the environment (or environments) you'd like to run the xRunBook:

enable environment
xRunBook with checkbox clicked