.. _confluent_local: =============== confluent local =============== Description ----------- Use the ``confluent local`` commands to try out |cp| by running a single-node instance locally on your machine. Keep in mind, these commands require Java to run, as described in :ref:`confluent-cli-jdk-req`. .. include:: ../../../includes/cli.rst :start-after: cli_limitations_start :end-before: cli_limitations_end :: confluent local: Manage a local Confluent Platform development environment. Usage: confluent local [] [] These are the available commands: acl Specify acl for a service. config Configure a connector. consume Consume data from topics current Get the path of the data and logs of the services managed by the current confluent run. Override default setting with "CONFLUENT_CURRENT" environment variable. demo Run demos provided in GitHub repo https://github.com/confluentinc/examples destroy Delete the data and logs of the current confluent run. list List available services. load Load a connector. log Read or tail the log of a service. produce Produce data to topics start Start all services or a specific service along with its dependencies status Get the status of all services or the status of a specific service along with its dependencies. stop Stop all services or a specific service along with the services depending on it. top Track resource usage of a service. unload Unload a connector. version Print the Confluent Platform flavor and version or the individual version of a service. 'confluent local help' lists available commands. See 'confluent local help ' to read about a specific command. Here are the available ``confluent local`` commands =========================================== ============================================================================ Command Description =========================================== ============================================================================ :ref:`confluent_local_acl` Specify ACL for a service. :ref:`confluent_local_config` Configure a connector. :ref:`confluent_local_consume` Consume data from topics. :ref:`confluent_local_current` Print the filesystem path of the data and logs of the services managed by the current ``confluent local`` command. :ref:`confluent_local_demo` Run demos provided in GitHub repo https://github.com/confluentinc/examples. :ref:`confluent_local_destroy` Delete the data and logs of the current |cp| run. :ref:`confluent_local_list` List all available services or plugins. :ref:`confluent_local_load` Load a connector. :ref:`confluent_local_log` Read or tail the log of a service. :ref:`confluent_local_produce` Produce data to topics. :ref:`confluent_local_start` Start all services or a specific service along with its dependencies. :ref:`confluent_local_status` Get the status of all services or the status of a specific service and its dependencies. :ref:`confluent_local_stop` Stop all services or a specific service its dependent services. :ref:`confluent_local_top` View service resource usage. :ref:`confluent_local_unload` Unload a connector. :ref:`confluent_local_version` Print the |confluent-cli| version. =========================================== ============================================================================ .. include:: ../../../includes/path-set-cli.rst Environment Variables --------------------- The ``confluent local`` commands support the ``CONFLUENT_CURRENT`` environment variable, which can be set dynamically. For more information, see :ref:`cli-install`. To configure properties for specific services through an environment variable using ``confluent local`` commands, use the given prefix for the corresponding service provided in the following table. +-----------------+-----------------------+ | Service | Prefix | +=================+=======================+ | |zk| | ``$ZOOKEEPER_`` | +-----------------+-----------------------+ | |ak-tm| | ``$KAFKA_`` | +-----------------+-----------------------+ | |sr| | ``$SCHEMA_REGISTRY_`` | +-----------------+-----------------------+ | REST Proxy | ``$KAFKAREST_`` | +-----------------+-----------------------+ | |kconnect-long| | ``$CONNECT_`` | +-----------------+-----------------------+ For example, to set the system property ``-Djava.security.auth.login.config=/tmp/kafka_client_jaas.conf`` when starting |kconnect-long| locally, run the command: .. sourcecode:: bash export CONNECT_OPTS="-Djava.security.auth.login.config=/tmp/kafka_client_jaas.conf" confluent local start connect --path To set the same system property when invoking |ak| core, run the following command: .. sourcecode:: bash export KAFKA_OPTS="-Djava.security.auth.login.config=/tmp/kafka_client_jaas.conf" confluent local start kafka --path Note that the |ak|, |kconnect-long|, and |zk| startup scripts use variables prefixed with ``$KAFKA_`` (for example, ``$KAFKA_OPTS`` and ``$KAFKA_LOG4J_OPTS``). However, the |confluent-cli| ``confluent local`` commands for these services use a service-specific prefix to distinguish the service to which the variables apply (as shown in the table above). Logging ------- You can specify a custom location to store the CLI data and logs. By default the |confluent-cli| stores its data and logs in your platform's temporary directory. .. tip:: You can check the current data and log location with the ``confluent local current`` command. #. Create a directory: .. sourcecode:: bash mkdir /var #. Set the path to your directory: .. sourcecode:: bash export CONFLUENT_CURRENT=/var .. toctree:: :hidden: :maxdepth: 1 confluent_local_acl confluent_local_config confluent_local_consume confluent_local_current confluent_local_demo confluent_local_destroy confluent_local_list confluent_local_load confluent_local_log confluent_local_produce confluent_local_start confluent_local_status confluent_local_stop confluent_local_top confluent_local_unload confluent_local_version