Using PagerDuty Service Broker for PCF

This topic describes how to use PagerDuty Service Broker for Pivotal Cloud Foundry (PCF).

Create and Bind a Service Instance with the cf CLI

  1. Log in to your deployment and target the org and space where you installed PagerDuty Service Broker for PCF.

    $ cf login
    $ cf target -o YOUR-ORG -s YOUR-SPACE
    

  2. List the marketplace services and locate the PagerDuty service shown as p-pagerduty.

    $ cf marketplace
    

  3. Create an instance of the PagerDuty service, replacing SERVICE-NAME with your preferred service instance name.

    $ cf create-service p-pagerduty standard SERVICE-NAME
    

  4. Bind the PagerDuty service instance to an app, replacing APP-NAME with your app name and SERVICE-NAME with your service instance name.

    $ cf bind-service APP-NAME SERVICE-NAME
    

  5. Restage the app for the service binding to take effect, replacing APP-NAME with your app name.

    $ cf restage APP-NAME
    

  6. The VCAP_SERVICES environment variable of your app now contains links to documentation to help you to connect the app to PagerDuty. The documentation is also available directly on the PagerDuty website.

    $ cf env APP-NAME
    

Ops Manager Settings

The following features are available when logging into Ops Manager and assumes you have already downloaded and installed the tile into your environment.

PagerDuty API Key and Integration User

In order for the Pivotal tile to access the integration, you will need to provide an API integration key as well as user credentials.

  1. Navigate to the tile.

  2. Click the settings tab.

  3. Go into the PagerDuty integration step and enter your API key. To obtain an integration API key, follow directions in the link here.

  4. Go to the Integration user step and enter your user credentials. You will need to enter a global admin’s user credentials.

Other Global Integration Features

There are additional options to customize how the integration provisions. Click Defaults and customizations. Below are a set of options and brief description of what it does.

Prefix for a team name - When adding a prefix for this field, the integration will add this prefix to the org and space name to the team name that gets provisioned into PagerDuty.

Automatically provision Space users - When this box is checked, when you create add the PagerDuty service to your app, it will automatically provision users within that space.

Docs Link - This allows you to customize the document that is linked within the tile. By default, this navigates back to PagerDuty’s user document.

Provision single PagerDuty team for Organization - When this box is checked, it will automatically provision a team in PagerDuty when an org is created.

Apps Manager Settings

The following features are available when logging into Apps Manager.

Team Provisioning

When adding the PagerDuty service to your Pivotal app, it will automatically provision a PagerDuty team using the space name and your org name of your Pivotal environment. Additionally, when adding your application to your Pivotal app, it will create a PagerDuty escalation policy and service for that new team.

User Provision

User provisioning can be accomplished in two ways:

  • Using existing users already members of your Pivotal space
  • Manually entering users

If the user does not have an existing account in PagerDuty and they are added during the Pivotal user provisioning process, the user will consume a PagerDuty license.

Using Existing Users Already Members of Your Pivotal Space

You can provision users using existing members of your Pivotal space. The roles are currently mapped as follows:

Pivotal Role PagerDuty Role
Space Manager Team Manager
Space Developer Responder

To enable this user provisioning method:

  1. Navigate to your app.
  2. Create a new service.
  3. Select PagerDuty.
  4. Select the default plan.
  5. Click Enter JSON.
  6. Enter the following: {“provision_space_users”:true}.
  7. Click CREATE.

    User Provision

Manually Entering Users

You can also manually enter users within a JSON file to provision multiple users. The required fields are: email, name, and role.

  1. Create a new service.
  2. Select PagerDuty.
  3. Select the default plan.
  4. Click Enter JSON.
  5. Enter the following: { “users”: [{ “email”: “john@test.com” , “name”: “John Doe”, “role”: “team_responder” }] }

    Where email is the user’s email, the name is the user’s name, and the role is a PagerDuty role.

    Manually entering users

Create a pull request or raise an issue on the source for this page in GitHub