When using an INI configuration, installation and updates will still be done using the tpm command. Instead of providing configuration information on the command line, the tpm command will look for an INI file in three files:
$HOME/tungsten.ini
.
tpm will
automatically search all tungsten*.ini
files within
the /etc/tungsten
directory.
An alternative directory
can be searched using --ini
option to
tpm. This option can also be used to specify a
specific ini file if you choose to name the file something different, for example
--ini /my/directory/myconfig.ini
The INI file(s) must be readable by the tungsten system user.
If multiple files are found that match the default search criteria they will all be read. This can present unexpected results.
The tpm output will notify if more than one file is being read. This situation should be avoided.
Here is an example of a /etc/tungsten/tungsten.ini
file that would
setup a simple dataservice.
shell> vi /etc/tungsten/tungsten.ini
[defaults] user=tungsten install-directory=/opt/continuent profile-script=~/.bash_profile mysql-allow-intensive-checks=true rest-api-admin-user=apiuser rest-api-admin-pass=secret replicator-rest-api-address=0.0.0.0 install=true
[alpha] master=localhost members=localhost replication-port=3306 replication-user=tungsten replication-password=secret
The section name inside of the square brackets is used as the service name. The
[defaults]
section should always be included
and is especially useful if defining multiple services in a single file where you
want certain options to apply globally.
Service names should be Alphanumeric characters only, and may include a hyphen (-) or an underscore (_). No other special characters should be used. Whilst there is no enforced max length of string you can define, for simplicity and easy administration, service names shoud be kept short and meaningful, ideally 15 characters or less.
Include any host-specific options in the appropriate section. This configuration will only apply to the local server, so there is no need to put host-specific settings in a different section.