Managing Runtime Configs

Page last updated:

Warning: Pivotal Operations Manager v2.3 is no longer supported because it has reached the End of General Support (EOGS) phase as defined by the Support Lifecycle Policy. To stay up to date with the latest software and security updates, upgrade to a supported version.

This topic explains how to define and manage named runtime configs with your service tile for Pivotal Cloud Foundry (PCF).

Tile authors can manage runtime configs in the following ways:

For more information about runtime configs, see Director Runtime Config in Cloud Foundry BOSH documentation.

Overview

A runtime config is a section of the tile metadata that defines global deployment configurations. Tile authors can create tiles that only contain a runtime config or add a runtime config to an existing product tile. When a tile author includes a runtime config as a top-level property in the tile metadata, BOSH applies the runtime config to every VM in the deployment.

For more information about top-level properties, see Top-Level Properties.

When operators apply changes to deployments, Ops Manager combines the runtime config information from every tile in the deployment and assigns each named runtime config a unique identifier. Ops Manager creates the identifier using the tile name, a generated GUID, and the runtime config name defined in the metadata.

The identifier follows the following format:

TILE_NAME-GUID-RUNTIME_CONFIG_NAME

Runtime Config Unique ID

Add a Runtime Config

Tile authors can add runtime_configs as a top-level property in tile metadata. In the runtime config section, the tile author defines configuration properties that Ops Manager applies to all deployments. A tile can support any number of runtime configs.

A named runtime config, such as MY-RUNTIME-CONFIG in the example below, can contain any number of add-ons. Each add-on can contain any number of jobs.

To add a runtime config to a tile, add the following section to the tile metadata:

runtime_configs:
  - name: MY-RUNTIME-CONFIG
    runtime_config: |
      releases:
      - name: RELEASE
        version: RELEASE-VERSION
      addons:
      - name: MY-ADDON-NAME
        jobs:
        - name:YOUR-RUNTIME-CONFIG-JOB
          release: RELEASE
        properties:
          MY-ADDON-NAME:
        ...

Where:

  • YOUR-RUNTIME-CONFIG is the name of the runtime config.
  • RELEASE is the release used for the runtime config.
  • RELEASE-VERSION is the version of the release.
  • YOUR-ADDON-NAME is the name of the add-on that contains the runtime config job.
  • YOUR-RUNTIME-CONFIG-JOB is the name of the job the runtime config describes.
  • YOUR-PROPERTY are the properties used in the job.

For more information about runtime config keys, see Director Runtime Config in Cloud Foundry BOSH documentation.

For more information about top-level properties in the tile manifest, see Top-Level Properties.

Important: The names you choose must be unique across a deployment. Pivotal recommends appending your product name or another unique identifier to each of the named items in the runtime_configs section.

Delete a Runtime Config

Tile authors can remove an existing runtime config from a tile by removing the reference from the metadata. When the operator upgrades the tile, Ops Manager detects the missing reference and deletes the runtime config.

To delete a runtime config from a tile, remove the runtime_configs section from the tile metadata.

For example, to delete a runtime config to a tile you remove the following section:

runtime_configs:
  - name: YOUR-RUNTIME-CONFIG
    runtime_config: |
      releases:
      - name: RELEASE
        version: RELEASE-VERSION
      addons:
      - name: YOUR-ADDON-NAME
        jobs:
        - name:YOUR-RUNTIME-CONFIG-JOB
          release: RELEASE
        properties:
          YOUR-PROPERTY:
        ...

Create a Runtime Config Tile

In Ops Manager, a runtime config tile appears as a tile with minimal configuration options. Runtime config tiles contain no stemcell, network, availability zone (AZ), or resource config information. You might create a runtime config tile if you want global deployment configurations to be applied to all VMs in deployment and do not any other functionality.

For a runtime config tile, tile authors are not required to define the following top-level properties:

  • post_deploy_errands
  • pre_delete_errands
  • job_types

Runtime Config Tile on the Ops Manager Installation Dashboard

Example Runtime Config-Only Tile

The following example shows a runtime config-only tile with minimal configuration:

---
name: runtime-config-only-example-product
product_version: "3.4"
minimum_version_for_upgrade: "2.0"
metadata_version: "2.0"
label: 'Runtime Config Only Example Product'
description: An example product to demonstrate runtime config features
rank: 1
service_broker: false # Default value
stemcell_criteria:
  os: xenial 97
  version: STEMCELL-VERSION

releases:
  - name: os-conf
    file: os-conf
    version: '15'

post_deploy_errands: []

pre_delete_errands: []

form_types:
  - name: example_form
    label: 'Example form'
    description: 'An example form'
    property_inputs:
      - reference: .properties.example_string
        label: 'Example string'

property_blueprints:
  - name: example_string
    type: string
    configurable: true
    default: Pizza

job_types: []

runtime_configs:
  - name: example-runtime-config
    runtime_config: |
      releases:
      - name: os-conf
        version: 15
      addons:
      - name: login
        jobs:
        - name: login-banner
          release: os-conf
        properties:
          login_banner:
            text: |
              (( .properties.example_string.value )).

In the runtime config example above, the login-banner job prints a banner when a user logs into any VM in the deployment. The operator can use the default value defined in the form_types section of the metadata or configure the banner by editing the Example string value in Ops Manager.

Runtime Config Tile Information