Configuring a Director config file

A director config file is an externalized config that lives outside of VMware Tanzu Operations Manager. Extracting this file can make it easier to manage multiple foundations. It also helps with:

  • traceability
  • avoiding configuration drift
  • configuration promotion

Prerequisites

To extract the configuration for a director, you need a Tanzu Operations Manager VM. For detailed instructions, see Installing Tanzu Operations Manager.

Extracting configuration

In om there is a command called staged-director-config, which is used to extract the Tanzu Operations Manager and the BOSH director configuration from the targeted foundation.

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

Sample usage:
om --env env.yml staged-director-config > director.yml

This gives you the whole configuration of Tanzu Operations Manager in a single YAML 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 Tanzu Operations Manager that might be returned after running this command:


    ---
    az-configuration:
    - clusters:
      - cluster: cluster-name
        resource_pool: resource-pool-name
      name: AZ01

    properties-configuration:
      iaas_configuration:
        vcenter_host: vcenter.example.com
        vcenter_username: admin
        vcenter_password: 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 be applied back to the Tanzu Operations Manager instance. The command configure-director will do the job.

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

Promoting Tanzu Operations Manager to another foundation

The configuration file is the exact state of a given foundation, and it contains some environment-specific properties. You need to edit these properties manually 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 adapting the configuration for another foundation.

VM extensions

You may specify custom VM extensions to be used in deployments. To learn more about how various IaaS's support and use these extensions, see the BOSH docs.

Using VM Extensions for your director configuration is an advanced feature of Tanzu Operations Manager. Sometimes it is necessary to define these extensions to perform certain tasks on your Tanzu Operations Manager director, but they are not required to run a foundation(s), and they change the default behavior if they are defined.

Use with caution.

In the following example, two new VM extensions are defined and will be added to the list of available extensions on the next configure-director. This can be added to the end of your existing director.yml, or defined independently and set with no other configurations present.

There are no default VM Extensions on a deployed Tanzu Operations Manager.

director.yml Example:

vmextensions-configuration:
- name: a_vm_extension
  cloud_properties:
    source_dest_check: false
- name: another_vm_extension
  cloud_properties:
    foo: bar
...

To use VM Extensions in either your director or product, define additional_vm_extensions:

resource-configuration:
  director:
    additional_networks: []
    additional_vm_extensions: [a_vm_extension,another_vm_extension]
...

VM types

You may specify custom VM types to be used in deployments. To learn more about how various IAAS's support and use these types, see the BOSH docs.

Using VM Types for your director configuration is an advanced feature of Tanzu Operations Manager. VM Types are not required to run a foundation(s), and they change the default behavior if they are defined.

Use with caution.

In the following example, two new VM types are defined and will be added to the list of available types on the next configure-director. This can be added to the end of your existing director.yml, or defined independently and set with no other configurations present.

director.yml Example:

vmtypes-configuration:
  custom_only: false
  vm_types:
  - name: x1.large
    cpu: 8
    ram: 8192
    ephemeral_disk: 10240
  - name: mycustomvmtype
    cpu: 4
    ram: 16384
    ephemeral_disk: 4096
...

VM Types precedence

The precedence rules are listed in the following table.

1 If custom_only is true, the VM types specified in your configuration will replace the entire list of available VM types in the Tanzu Operations Manager.
2 If the property is set to false or is omitted, configure_director will append the listed VM types to the list of default VM types for your IaaS.
3 If a specified VM type is named the same as a predefined VM type, it will overwrite the predefined type.
4 If multiple specified VM types have the same name, the one specified last will be created.
5 Existing custom VM types do not persist across configure-director calls, and it should be expected that the entire list of custom VM types is specified in the director configuration.
check-circle-line exclamation-circle-line close-line
Scroll to top icon