Use User-Input Template for creating DB config
About this task
create-dbconfig.Note: If you want
to automate the creation of database.conf with different credentials, you could use the
script option of the gateway-CLI described Step 3
Procedure
-
Export an Input-Template for
create-dbconfig- Start the CLI
-
(Optional) To export the template in clear text, enable the
plaintemplate option using the command:
plaintemplate --enable -
Export the user input for
create-dbconfigusing the--exportoption:create-dbconfig --export path/to/template.yml - Fill all the requsted information as described in Performing the initial configuration. The files database.conf and template.yml are create by the CLI
-
Import an Input-Template for create-dbconfig (optional)
- Start the CLI
-
(Optional) To import the template in clear text, enable the
plaintemplate option using the command:
plaintemplate --enable -
Import the user input for
create-dbconfigusing the--inputoptioncreate-dbconfig --import path/to/template.yml
The database.conf file is created using the defined user input of the template.yml. -
Use
create-dbconfigwithout user interaction.To automatically create a database.conf file with the Gateway-CLI we need to define a script to be passed to the CLI. As precondition we need a created template.yml file to be loaded within the script. To create this template you can use the steps explained in Step 1.-
Create a file cli-load-template:
plaintemplate --enable forceoverwrite --enable create-dbconfig --import path/to/template.yml -
Execute the gateway-cli
./gateway-cli @cli-load-template
-
Create a file cli-load-template:
