Introduction
Tungsten Cluster is a comprehensive and complete MySQL HA/DR/Geo-Scale solution. The various available deployment models — standard 3-node cluster, Passive (CAP) and Active (CAA) Composite Clusters (aka a cluster of clusters) and additional topologies Dynamic Active/Active (DAA) and Distributed Data Groups (DDG) — can be daunting and at times complex. Yet this does not have to be the case.
Yes, managing Tungsten Cluster configurations can be challenging at times, especially when dealing with powerful, yet complex tungsten.ini
files. To simplify the process, the new tpm ini
command provides an easy way to create, validate, and manage configuration files, helping database administrators streamline their workflow.
This new command is available as part of our upcoming V8 software release.
So What Is tpm ini
Good For?
The tpm ini
command is designed to simplify the creation, validation, and administration of the tungsten.ini
configuration files used in Tungsten Clustering and Tungsten Replicator.
Whether you need to check your configuration for errors, generate example templates, or modify the file directly, the tpm ini
command provides a range of subcommands to make your life easier.
Next are 6 key use cases demonstrating the flexibility of the tpm ini
command.
I want to:
-
See the full contents of the
tungsten.ini
file:tpm ini cat
-
Confirm that the configuration does not have any invalid options:
tpm ini check
-
Create a new configuration file and need a template as a place to start:
tpm ini example
-
Find all Tungsten configuration files that would be read and included by the
tpm install
andtpm update
commands:tpm ini find
-
Display a list of all possible configuration options, along with aliases for each if they exist, and a description of each option:
tpm ini list
-
Quickly edit the configuration file using the
vi
command:tpm ini vi
Super-Power: Validate the Configuration Options
The tpm ini check
command allows you to check if the configuration options exist:
# Perform option validation:
shell> tpm ini check
Option brokenOption in stanza [defaults] is NOT valid. Did you mean backup-options?
ERROR: Broken INI options found
shell> tpm ini check
SUCCESS: No broken options found
# Also display valid INI options at the end
shell> tpm ini check --valid
Option application-password in stanza [defaults] is valid.
Option application-port in stanza [defaults] is valid.
...
Option topology in stanza [east] is valid.
Option user in stanza [defaults] is valid.
SUCCESS: No broken options found
# Show valid and broken options with minimal output
shell> tpm ini check --valid --short
VALID: application-password
VALID: application-port
...
VALID: topology
VALID: user
SUCCESS: No broken options found
Super-Power: Create Configuration Templates
Now we turn to the templating system for Tungsten. Using tpm ini example
, you can create a template for any available topology!
Let’s look at some basic examples:
## Default to 2 clusters, Composite Active/Passive
tpm ini example --topology cap
## 5 clusters, Composite Active/Passive
tpm ini example --qty 5 --cap
## 3 clusters, Composite Active/Active
tpm ini example --qty 3 --caa
# Dynamic Active/Active
tpm ini example --topology daa
Custom configurations are also possible, like this:
## Generate a DDG topology with custom settings
tpm ini example --ddg --nossl --noapi --ro --proxy
Here are all possible options for customization:
[--sites|--qty] Specify the number of clusters/sites
[--noapi] - Disable the REST API (enabled by default)
[--nossl] - Disable security (enabled by default)
[--top|--topology] - Specify the topology, one of: std, cap, caa, daa, ddg
[--std] - same as --topology std
[--cap] - same as --topology cap
[--caa] - same as --topology caa
[--daa] - same as --topology daa
[--ddg] - same as --topology ddg
[--ro] - Set the Connector to Read-Only
[-m|--mode] - Specify the Connector mode, one of: bridge (default), proxy or smartscale
[-b|--bridge] - Same as --mode bridge
[-p|--proxy] - Same as --mode proxy
[-s|--smartscale] - Same as --mode smartscale
Final Thoughts
The tpm ini
command is an invaluable tool for Tungsten Cluster and Tungsten Replicator users, simplifying configuration management, validation, and troubleshooting. Whether you’re setting up a new cluster, fine-tuning an existing configuration, or just exploring your options, tpm ini provides the flexibility and control you need.
If you haven’t tried tpm ini
yet, give it a shot and see how it can help you manage your Tungsten configurations more efficiently. Smooth Sailing!
Comments
Add new comment