Skip to content

Creating the Director Config File

Extracting a director configuration file, an externalized config that lives outside of Ops Manager, can make it easier to manage multiple foundations as well as help with:

  • traceability
  • avoiding configuration drift
  • configuration promotion

Prerequisites

To extract the configuration for an director, you will first need to do the following:

  1. Create the infrastructure for your installation. To make the infrastructure creation easier, consider using terraform to create the resources needed:

    1. terraforming-aws
    2. terraforming-gcp
    3. terraforming-azure
    4. terraforming-vsphere
    5. terraforming-openstack
  2. Install Ops Manager using the create-vm task

  3. (Optional) Configure Ops Manager manually within the Ops Manager UI (Instructions for doing so can be found using the Official-Pivotal-Platform-Documentation)

Extracting Configuration

om has a command called staged-director-config, which is used to extract the Ops Manager and the BOSH director configuration from the targeted foundation.

Info

staged-director-config will not be able to grab all sensitive fields in your Ops Manager installation (for example: vcenter_username and vcenter_password if using vsphere). To find these missing fields, please refer to the Ops Manager API Documentation

Sample usage:
om --env env.yml staged-director-config > director.yml
will give you the whole configuration of Ops Manager in a single yml file. It will look more or less the same as the example above. You can check it in to your VCS.

The following is an example configuration file for Ops Manager that might return after running this command:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
az-configuration:
- clusters:
  - cluster: cluster-name
    resource_pool: resource-pool-name
  name: AZ01

properties-configuration:
  iaas_configuration:
    vcenter_host: vcenter.example.com
    vcenter_password: admin
    vcenter_username: password
    ......
  director_configuration:
    blobstore_type: local
    bosh_recreate_on_next_deploy: false
    custom_ssh_banner: null
    ......
  security_configuration:
    generate_vm_passwords: true
    trusted_certificates:
  syslog_configuration:
    enabled: false

network-assignment:
  network:
    name: INFRASTRUCTURE
  other_availability_zones: []
  singleton_availability_zone:
    name: AZ01

networks-configuration:
  icmp_checks_enabled: false
  networks:
  - name: NETWORK-NAME
  ......

resource-configuration:
  compilation:
    instance_type:
      id: automatic
    instances: automatic
  ......

Configuring Director Using Config File

Now you can modify the settings in the configuration file directly instead of operating in the web ui. After you finish editing the file, the configuration file will need to apply back to the Ops Manager instance. The command configure-director will do the job.

Sample usage:
om --env env.yml configure-director --config director.yml

Promoting Ops Manager to Another Foundation

The configuration file is the exact state of a given foundation, it contains some environment specific properties. You need to manually edit those properties to reflect the state of the new foundation. Or, when extracting the configuration file from the foundation, you can use the flag --include-placeholders, it will help to parameterize some variables to ease the process of adapt for another foundation.