Jump to: navigation, search

Configuration: the Control utility

Use the Billing Data Server (BDS) Control utility (Brsctl.py) to view, create, and modify the current Billing Data Server (BDS) configuration, and to encrypt passwords using existing keys. You can use this utility to import configuration templates, updated with the customer-specific configuration details, into BDS. The utility works with configuration parameters such as tenants, regions, and extract/transform/load watermarks, and runs inside the BDS Docker container. Beginning with release 9.0.004.01, the utility returns an exit code code (0 - success, or 1 - failure) upon completion.

BDS Control utility usage

Usage: python3 brsctl.py <command> [options]

Commands

help Print help screen(s).
template Generate template(s) files for provisioning.
config Add, remove, or list configuration options.
decrypt Decrypt extract or transform files. Available in release 9.0.001.05 and later, this command accepts arguments: brsctl.py decrypt -t <tenant_name> -fe <path to encrypted file> -fd <path to decrypted file>,

where:

  • <tenant_name> is the name of the tenant.
  • <path to encrypted file> is the full path and file name of the file to be decrypted. Retrieves the date from the name of the extract or transform file.
  • <path to decrypted file> is the full path into which to save the decrypted file.
tenant Change/list tenant properties.
reseller Change/list reseller properties.
region Enable or disable processing for a region.
location Enable or disable processing for a location.
metric Enable or disable processing of a metric.
dataset List or delete provisioned datasets.
units Add, remove, or list business units for specified tenant.
backup Save the configuration to a JSON file.
restore Restore a configuration from a JSON file.
encrypt Encrypt a string. Used to encrypt passwords, this command prompts you to enter a password, and prints the corresponding ciphertext.
reload_files Reload transform files for given date, or the current day.
setup Starts the BDS configuration wizard, which helps you to easily configure BDS.
migrate Migrates configuration information when you upgrade to future releases from release 9.0.003.01 or later. Optionally accepts the key --force-yes, which suppresses the migration confirmation prompt.

To view detailed help for a specific command, use brsctl.py help <command>, where <command> is the name of the command for which to display information.

Template options

-l show list of available templates
-t <template> generate template
-f <filename> save template to file (by default template is printed to stdout)

Configuration options

-l print out current configuration (passwords will be printed in encrypted form)
-i <filename> import filled out template into configuration. If object with the same name already exists, import will fail, unless --force is specified
--init delete existing configuration and re-initialize
--cleanup delete existing configuration, including root node (or configuration file), without re-initializing
--force force import of template, even if object with same name already exists
--force-yes force Y response to confirmation prompts (for --init and --cleanup options)

Tenant options

-l print out list of tenants and their status (enabled/disabled)
-ed [date] show (or set) last successful extract date
-td [date] show (or set) last successful transform date for all metrics
-ld [date] show (or set) last successful load date for all metrics
-on enable tenant
-off disable tenant (without deleting tenant from configuration)
-d delete tenant from configuration
-f <filename> export specific tenant's configuration as template (requires -t option)
-ta apply operation to all tenants
-t <tenant> apply operation only to one tenant
--force-yes force Y response to confirmation prompts (for -ta and -d options)
Important
Where a date parameter is required, enter it in the format YYYY-MM-DD. For example, brsctl.py tenant -ed 2015-09-24 -t sample_tenant

Reseller options

-l print out list of resellers and their status (enabled/disabled)
-td [date] show (or set) last successful transform date
-ld [date] show (or set) last successful load date
-on enable reseller
-off disable reseller (without deleting reseller from configuration)
-d delete reseller from configuration
-f <filename> export specific reseller's configuration as template (requires -r option)
-ra apply operation to all resellers
-r <reseller> apply operation only to one reseller
--force-yes force Y response to confirmation prompts (for -ra and -d options)
Important
Where a date parameter is required, enter it in the format YYYY-MM-DD. For example, brsctl.py reseller -ed 2015-09-24 -t sample_reseller

Region options

-l list available regions
-on <region> enable region
-off <region> disable region
-ta apply operation to all tenants
-t <tenant> apply operation only to one tenant
--force-yes force Y response to confirmation prompts (for -ta option)

Location options

-l list available locations
-on <location> enable location
-off <location> disable location
-ta apply operation to all tenants
-t <tenant> apply operation only to one tenant
--force-yes force Y response to confirmation prompts (for -ta option)

Metric options

-l list available metrics
-on enable metric
-off disable metric
-d delete metric
-ma apply operation to all metrics
-m <metric> apply operation only to one metric
-ta apply operation to all tenants
-t <tenant> apply operation only to one tenant
-ra apply operation to all resellers
-r <reseller> apply operation only to one reseller
--force-yes force Y response to confirmation prompts (for -ta and -ma options)
Important
Where a date parameter is required, enter it in the format YYYY-MM-DD. For example, brsctl.py metric -td 2015-09-24 -ma -t sample_tenant

Dataset options

-l list available datasets

Units options

-t <tenant> mandatory parameter, specify tenant to apply operation to
-l list business units, configured for tenant
-u <unit_name> apply operation only to one business unit
-ua apply operation to all business units (available only -off operation)
-a add business unit to list of existing units
-d remove specified business unit from list of available

Backup options

-f <filename> specify name of the file to backup to
-w <filename> backup only watermarks of the tenants

 

Version options

-v prints the actual BDS version

 

Restore options

-f <filename> specify name of the file to restore from
--force-yes force Y response to confirmation prompt
Important
The Restore option overwrites any current configuration.

Reload files option

-ta apply operation to all tenants
-t <tenant> apply operation only to one tenant
-ra apply operation to all resellers
-r <reseller> apply operation only to one reseller
-td [date] show (or set) last successful target date. Default for today.
Important
Where a date parameter is required, enter it in the format YYYY-MM-DD. For example, brsctl.py reload_files -td 2015-09-24
Warning
Reloading previously-loaded files can cause duplicates. Coordinate file reload activity with your IT department
This page was last edited on September 30, 2021, at 17:09.
blog comments powered by Disqus