Gallium Data is configured using three main mechanisms:
command line options
A word about files and directory paths
If you run Gallium Data as a Docker container, keep in mind that the files and directory paths you specify must be from the perspective of the Docker container. You will often map directories or files from the host file system into the Docker container. Make sure that the options you specify to Gallium Data correspond to the location of the files or directories as seen from within the Docker container.
Command line options
The following command-line options are accepted by the server.
Optional but recommended. Specifies a directory in which the repository will be backed up before every publish. This allows you to easily undo any changes, since backups can easily be restored from the Backups page in the admin application.
If this option is specified, Gallium Data will create up to four levels of subdirectories: year, month, day, and time every time the repository is published. Each backup is a complete copy of the repository as it was at that moment in time. Most repositories are relatively small, but over time this can grow and should be pruned from time to time, which can be done from the admin app, or directly in the file system.
Optional. For advanced users only. Specifies where the meta-repository can be found. The meta-repository describes how adapters and filters behave.
Optional. Specifies which port to use to expose the REST API used by the admin app. To use the admin app, you must enable either this option or the rest-port-ssl option (or both). In production, the REST API is usually turned off.
Optional. Specifies which port to use to expose the REST API (over SSL) used by the admin app.
Required if rest-port-ssl is specified. This should point to a JKS file containing the private key and associated certificates require to run a TLS service.
Required if rest-keystore is specified and points to a JKS file that is password-protected.
Optional. For advanced users only, who need to customize the admin app.
Optional. If you want to restrict access to the admin app, you can assign a password using this option, and you will be prompted to log in when starting the admin app. The user name is always "admin".
Optional. If you want to restrict access to the admin app, you can specify a regular expression using this option. Any attempts at using the REST API or the admin app will validate the caller's IP address against this regular expression. This is a Java regular expression.
For instance, if you want to allow only machines on your network, you might use something like: 209\.88\.151\..+
Required only if you run multiple instances of Gallium Data in a cluster, like with the RedisCluster connector.
Optional. Use the specified directory as the root for Node's require mechanism. In the Docker image, the default value is /galliumdata/node_modules
Optional. Use this option to change the settings of the Java library subsystem, which allows you, for instance, to use a private Maven repository instead of the default Maven Central. See the Java library page for more details.
If, like most people, you run Gallium Data as a Docker container, these options can be specified using Docker's -e option, e.g.:
Note how /repo is mapped from the host file system. This is common when working on connections and filters because it allows you to access the repository easily, especially for source control.
All the command-line options can also be specified in a file, which is then passed to Gallium Data as a single command-line option:
Optional. Should point to a text file containing options as described above.
Again, remember that all the paths specified here are from the perspective of the Docker container.
Example options file
The repository is where Gallium Data stores all its definitions: projects, connections, filters, etc... The easiest way to edit it is using the admin app, but (if you are careful) you can also edit the repository directly. This can be handy when doing automated deployments, for instance. Every time you publish in the admin app, the repository is updated (and a backup is created, if the backup option is enabled).
The structure of the repository is relatively straightforward. The top directory contains:
projects: contains one directory per project
projects/<project-name>/project.json : describes the project. The only thing you might edit here is the "active" attribute.
projects/<project-name>/comments.md : description of the project in Markdown format.
projects/<project-name>/crypto: contains private key and certificate-related files for the project.
projects/<project-name>/crypto/crypto.json : can specify the algorithm used for the private key (if present), and the password for the JKS file (if present).
projects/<project-name>/crypto/key.pem : the private key used for SSL/TLS to database clients, and related certificates.
projects/<project-name>/crypto/trust.pem : the certificate(s) that should be trusted from the database server(s).
projects/<project-name>/crypto/keystore.jks : optional - a Java JKS file containing keys and certificates. Creating a JKS file requires a bit of work, but it does provide you with a lot of flexibility.
projects/<project-name>/connections : contains one JSON file per connection in this project.
projects/<project-name>/connections/<connection-name>.json : describes a connection, its type, and parameter values.
projects/<project-name>/connections/<connection-name>.md : a description of the connection, in Markdown format..
projects/<project-name>/connection_filters : contains one directory for each connection filter in the project
projects/<project-name>/connection_filters/<filter-name>/connection_filter.json : describes the filter and its parameter values.
projects/<project-name>/connection_filters/<filter-name>/comments.md : a description of the filter, in Markdown format.
The structure is the same for the other three types of filters: