GitHub external runbook library

Before you begin

Create an API token within GitHub with the proper access rights to read data from the GitHub repository you want to connect. For more information, see the GitHub documentation.

About this task

Complete the following steps to create a connection to GitHub to populate your runbook Library with content from the connected GitHub repository.
Note: Runbooks that are retrieved from GitHub are identified internally using the file name of the runbook in the GitHub repository, combined with an additional fixed identifier for GitHub. If the runbook file name is longer than 57 characters, then the resulting runbook ID becomes longer than 64 characters. This is the limit for runbook IDs as they are stored in the alerts.status table in the ObjectServer (see Installing the Netcool/Impact add-on for Runbook Automation). As a result, runbook IDs that are longer than 64 characters get truncated, and the runbook cannot be invoked from the context of the alert (neither automatically nor manually). To prevent this, make sure that the runbook file names in GitHub are at most 57 characters in length. In hybrid environments, you can alternatively increase the size of the RunbookID column in the alerts.status table as needed.

Procedure

  1. In the Navigation icon main navigation menu, select Adjust settings icon Administration and click Integration with other systems.
  2. Click Automation type.
  3. Click Configure on the GitHub tile.
  4. Enter the base API url of your GitHub installation as a hostname or as an https-URL. For example, for https://www.github.com it's api.github.com.
  5. Define the owner of the repository. This is usually the account that created the repository. For example, if the URL of your repository is https://github.com/JohnDoe/gitOpsRunbooks, the owner is JohnDoe.
  6. Define the name of the repository. For example, if the URL of your repository is https://github.com/JohnDoe/gitOpsRunbooks, the repository is gitOpsRunbooks.
  7. Enter the API token created in the prerequisite step ("Before you begin").
  8. Optional: Define a folder. If your runbooks are not in the base folder of the repository, define the name of the folder where they are located.
  9. Optional: Define a branch. If your runbooks are not present on the default branch of the repository, or if you specifically want to use a different branch, define the name of the branch.
  10. Optional: Enter the GitHub server certificate or certificate chain.
    On Linux® systems, enter the following command to receive the certificate or certificate chain:
    echo -n | openssl s_client -servername <GITHUB_HOSTNAME> -connect <GITHUB_HOSTNAME>:<GITHUB_PORT> -showcerts | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > file.cert
    
    If the command does not work in your environment, use the following variant of the command:
    ex +'g/BEGIN CERTIFICATE/,/END CERTIFICATE/p' <(echo | openssl s_client -showcerts -servername <GITHUB_HOSTNAME> -connect <GITHUB_HOSTNAME>:<GITHUB_PORT>) -scq > file.cert
    
    If errors occur, make sure your exported certificate that is stored in file.cert contains a full and valid certificate. Errors like verify error:num=20:unable to get local issuer certificate occur due to a missing CA root certificate for the DigiCert CA.
    The resulting file.cert may contain one or more certificates and each certificate begins and ends as follows:
    -----BEGIN CERTIFICATE----- 
    ...
    -----END CERTIFICATE-----
    
    On Windows systems, use your preferred browser to export the certificate or certificate chain.
  11. Click Save to store the connection information.