.. _c3_properties_files: ########################################## |c3-short| Configuration Examples for |cp| ########################################## .. meta:: :title: Customize Control Center With a Properties File :description: This document describes the available properties files for configuring options and features in Confluent Control Center environments. Pass in properties files when starting Control Center. |c3-short| requires a configuration properties file to operate. You can modify the properties file to customize |c3-short| configuration. The properties file is passed to |c3-short| when you start it. Several |c3-short| example properties files are provided in the ``etc/confluent-control-center`` directory located in your ``CONFLUENT_HOME`` directory. These files contain critical configuration options, some of which are set to defaults or commented out. Not all of the available configuration options are present in the properties files. For instance, the majority of the :ref:`Access Control ` options are not present by default and must be added manually. Depending on the requirements of your environments, there are additional configuration options documented in the :ref:`controlcenter_configuration` that you can add and configure within your properties files. Defaults are typically different between the available properties file templates. Parameters are provided in the form of key/value pairs. Lines beginning with ``#`` are ignored. To uncomment an option, remove the hash (``#``) that precedes it. When you add character strings to properties files, enter the string without any double or single-quotes. You do not need to wrap character strings in quotes. ************************************** Example |c3-short| configuration files ************************************** The following table lists the sample properties files that are provided with |c3| in the ``$CONFLUENT_HOME/etc/confluent-control-center`` directory. .. list-table:: :widths: 33 33 33 :header-rows: 1 * - File name - Description - Notes * - ``control-center.properties`` - Properties file sample with some basic settings. - None * - ``control-center-dev.properties`` - Properties file sample for use in a non-production environment. Includes a single broker under a :ref:`developer license `. - Default properties file used with the ``start`` command on non-Debian/Ubuntu environments. * - ``control-center-production.properties`` - Properties file sample with settings that are appropriate for a production environment. - You must set additional properties for a production setting. For example, you should set the data directory to a value other than ``/tmp``, set hostnames to values other than ``localhost`` and configure security features. Default properties file used with the ``start`` command on Debian/Ubuntu environments. * - ``control-center-management.properties`` - Properties file to enable a development environment where |c3-short| is running in :ref:`Reduced infrastructure mode `. - This file is similar to the `control-center-dev.properties` file, but only contains properties relevant to Reduced infrastructure mode. Reduced infrastructure mode is typically used with :ref:`health-plus`. * - ``control-center-minimal.properties`` - Properties file sample optimized for a local environment. - This properties file could be used with Control Center running locally for demonstration purposes. Must always be explicitly passed with a ``start`` command. .. _c3_pass_props_files: *************************************** Passing in a |c3-short| properties file *************************************** By default, |c3-short| is aware of the properties files that reside in the ``$CONFLUENT_HOME/etc/confluent-control-center`` directory and reads them automatically when restarting using CLI commands. It is not necessary to explicitly pass in the properties file name when starting |c3-short| unless: - The properties file has a custom name. You might differentiate properties file names for testing purposes. - The properties file does not reside in the default directory. |c3-short| needs the full path to the properties file in this case. - The ``.minimal`` properties file must always be explicitly passed with a ``start`` command. - The properties file must always be passed in when using the ``control-center-start`` script. .. _c3_restart: Restarting |c3-short| ===================== Follow these instructions for stopping and starting |c3-short|. Examples of passing in a properties file when necessary or not are provided. .. include:: ../includes/c3-props-files-note.rst Example 1: Standard production environment ------------------------------------------ Example restarting |c3-short| and passing in the default properties file for the configuration to take effect: .. sourcecode:: bash ./bin/control-center-stop ./bin/control-center-start ../etc/confluent-control-center/control-center.properties Example 2: Custom properties filename and location -------------------------------------------------- Example starting |c3-short| with the bin start script and passing in a custom properties filename and location: .. sourcecode:: bash ./control-center-stop ./control-center-start /Users/myUserName/confluent/configs/c3.properties-rbac The example assumes you are in the ``/bin`` directory. Example 3: Local development environment ---------------------------------------- Example starting |c3-short| in a local (dev) environment with the local CLI. This example assumes you have configured your ``$CONFLUENT_HOME``. There is no need to pass in the properties filename; |c3-short| passes in ``control-center-dev.properties`` automatically (on non-Ubuntu/Debian). .. important:: Do not use :confluent-cli:`confluent local|command-reference/local/index.html` for production use. .. codewithvars:: bash |confluent_stop| |confluent_start| .. _c3_props_files_excerpt_diffs: Example properties file excerpts -------------------------------- This section shows a few fundamental differences between a development and production |c3-short| properties file. Example excerpt from the production properties (``control-center-production.properties``) file: .. code-block:: RST :linenos: :emphasize-lines: 5, 13 ############################# Server Basics ############################# # A comma-separated list of Apache Kafka cluster host names (required) # NOTE: should not be localhost #bootstrap.servers=kafka1:9092 ... ############################# Control Center Settings ################### ... # Directory for Control Center to store data # NOTE: this should be changed to point to a reliable directory confluent.controlcenter.data.dir=/var/lib/confluent/control-center ... Example excerpt from the development properties (``control-center-dev.properties``) file: .. code-block:: RST :linenos: :emphasize-lines: 4, 12 ############################# Server Basics ############################# # A comma-separated list of Apache Kafka cluster host names (required) bootstrap.servers=localhost:9092 ... ############################# Control Center Settings ################### ... # Directory for Control Center to store data # NOTE: this should be changed to point to a reliable directory confluent.controlcenter.data.dir=/tmp/confluent/control-center ... The ``.dev`` file is pre-configured with ``localhost`` where applicable. The data directory points to a ``/tmp`` directory.