- /opt/teradata/psim/bin/psim-config: Applies a psim_config.json to the PSIM
- /opt/teradata/psim/bin/psim-genmetadata: Creates a file for the user to use as a psim_config.json.
- The list of managed nodes.
- The list of SQLE instances.
- PSIM administrator password
- The Site ID
- ServiceConnect configuration
- PSIM HA clustering, if there are multiple PSIMs
Overview of Workflow
- Provision your VMs, including SQLE nodes, PSIM nodes and other managed nodes.
- Create a psim_config.json specific for your system. An example file is explained here, as is the psim-genmetadata CLI tool.
- Include IP address of SLQE nodes, other managed nodes and PSIMs
- Include the SiteID
- Include the ServiceConnect configuration
- Copy the psim_config.json to each PSIM node and apply the config with the psim-config CLI, described as follows.
- Verify the PSIM(s) health with the psim-config CLI
- For HA purposes, provision a minimum of 2 PSIM nodes from the PSIM AMI
Configure a PSIM From a File
Use the following code to configure a PSIM from a file.
psim-config --apply --filename <psim_config.json> [--debug] psim-config --check-health [--debug] psim-config --validate --filename <psim_config.json> [--debug]
- The apply / -a option uses the json metadata file to configure the PSIM. Returns 0 if successful. Copy your psim_config.json to each PSIM node and run psim-config --apply on each PSIM.
- The check-health / -c option runs a healthcheck on the PSIMs to check the current configuration. If there are multiple PSIMs, they all participate in the healthcheck. The healthcheck can take several minutes to complete. This is often used after applying a configuration to verify whether the new configuration works. A healthcheck is also recommended before applying a modified psim_config.json to a system that is already configured. Domain setting information is also displayed along with healthcheck result.
- The validate / -v option verifies that the given json metadata file has the correct format and lists anything that is not expected to be in the json metadata file for PSIM.
- The filename / -f option parameter specifies the PSIM metadata filename to use to configure the PSIM.
- The debug / -d option logs more detail than usual in the log file.
The validate command should run prior to the apply command so any correction can be made prior to applying the metadata file if necessary.
The apply command affects only the PSIM where you run it. If you have multiple PSIMs, copy your psim_config.json to each and apply the file on each PSIM.
When apply is successful, the input json metadata file is copied to /var/opt/teradata/psim/config/ecosystem.json as an artifact. The user should not modify the artifact file.
Generate Metadata Files
The psim-genmetadata CLI helps the user build a PSIM metadata file.
psim-genmetadata --live --output <newmetadata.json> [--debug] psim-genmetadata --convert --source <cmic-metadata.json> --name <databasename> --output <psim-metadata.json> [--debug] psim-genmetadata --interactive --output <newmetadata.json> [--debug]
- The live / -l option generates a metadata from the current live configuration
- The convert / -c option converts from a cmic metadata file (used by cmic-cloud-config) to a PSIM metadata file. This is useful for migrating CMICs in the cloud to PSIMs in the cloud
- The interactive / -i option prompts the user for data to build a new PSIM metadata file.
- The output / -o parameter is the PSIM metadata json filename to create.
- The source / -s option specifies an old CMIC metadata file (used on CMICs with cmic-cloud-config).
- The name / n option specified the database name to use during conversion with cmi-cloud-config. When not provided, the Site ID PSIM 22.04+ is used.
- The debug / -d option adds more detail to the log file.
A sample psim_config.json file is as follows.
{ "psim_metadata_version": "1.0", "psim_domain_settings": { "site_id": "MYSITEDEV", "serviceconnect": "PROD" } , "psim_list": [ { "type": "psim", "ip_addr": "172.31.32.10" }, { "type": "psim", "ip_addr": "172.31.32.12" } ], "sqle_instance_list": [ { "database_name": "MYSITEDEV", "node_list": [ { "ip_addr": "172.31.36.47" }, { "ip_addr": "172.31.36.48" } ] } ], "non_sqle_node_list": [ { "ip_addr": "172.31.32.64" }, { "ip_addr": "172.31.36.152" }, { "ip_addr": "172.31.36.153" }, { "ip_addr": "172.31.32.54" } ] }
The PSIM administrator password cannot be set in the metadata file. The user can set the environment variable PSIM_ADMIN_PASSWORD when calling psim-config --apply.
Copy your psim_config.json to each PSIM node and run psim-config --apply on each PSIM.