Configuring ClockworkDB ===================================== On linux, when using RPM or DEB packages, the configuration files are installed in the `/opt/ctt/etc/clockworkdb/` directory. They are configured with basic settings for a WarpDrive+ repository named "warp1" that should work for most users. Follow the simple steps below to configure your environment, and run a quick test to list the repositories available. Quick Start #. Source the `cdb-env.sh` file to set up environment variables for ClockworkDB configuration. You should add this to your shell profile or rc file (.zshrc, .bashrc, .bash_profile, etc.):: source /opt/ctt/etc/clockworkdb/cdb-env.sh #. Test that the configuration is set up correctly by running a ClockworkDB tool, such as the command line interface (CLI) tool `cdb-repositories` which lists the repositories defined in the configuration files. Output:: #> cdb-repositories /\_/\ ( o.o ) > ^ < ____ _ _ _ ____ ____ / ___| | ___ ___| | ____ _____ _ __| | _| _ \| __ ) | | | |/ _ \ / __| |/ /\ \ /\ / / _ \| '__| |/ / | | | _ \ | |___| | (_) | (__| < \ V V / (_) | | | <| |_| | |_) | \____|_|\___/ \___|_|\_\ \_/\_/ \___/|_| |_|\_\____/|____/ v1.0.48 [11:32:52] [cdb-repositories] cdb-repositories Version: 0.3.3 [11:32:52] [cdb-repositories] Repository Description Module Provider [11:32:52] [cdb-repositories] -------------------- -------------------------------------------------- --------------- [11:32:52] [cdb-repositories] warp1 WarpDrive+ Repository(2k/16k) mod_warpdrive [11:32:52] [cdb-repositories] -------------------- -------------------------------------------------- --------------- Managing Configuration Files ================================================= .. image:: _static/repo-configuration.png You can manage the configuration files for ClockworkDB using any text editor. The configuration files are XML files that define various settings and options for the ClockworkDB environment, repositories, and module providers that provide presistence logic for various backends. To generate a new backend module provider configuration file, you can use the `cdb-provider-config` command line tool, which will create a new configuration file:: Usage: cdb-provider-config #> cdb-provider-config mod_warpdrive There are a number of configuration files which are used by the various tools, utilities, and programs which interact with ClockworkDB. These configuration files are XML files and one DTD file that defines ENTITYs, essentially variables used in the XML configuration files. #. `cdb-env.sh` file. This is a shell script that sets environment variables to point to the ClockworkDB configuration directory, TOM_HOME, and adjusts the PATH and LD_LIBRARY_PATH environment variables to include the directories for tools and libraries. You should source this file before running any of the tools, utilities, or programs which interact with ClockworkDB. #. `tom-environment.dtd` file. This file defines ENTITYs, which are essentially variables that can be used in the XML configuration files. This allows for easier management of configuration values and reduces redundancy across the XML files. Entities defined in this file can be referenced in the XML configuration files using the syntax `&entity_name;`. A sample `tom-environment.dtd` file:: #. `tom-environment.xml` file. This file defines elements for logging, license, and clockworkdb environment configuration. When creating a new configuration file for a new repository, you can include this file via the directive. See the `` in the `tom-environment.xml` file for an example. A sample `tom-environment.xml` file:: #. `cdb1.xml` file. This file is included in the `tom-environment.xml` file and defines the configuration for a specific repository, in this case, a WarpDrive+ powered repository named "warp1". This file includes options for cache size, partitioning, transactions, environment settings, locking, datastore configuration, database home directory, directories for data and logs, and replication settings. You can find more information about the various configuration options in the `Module Provider Options` section of the documentation. A sample `cdb1.xml` file:: /opt/ctt/usr/data/warp1