.. _cos-quickstart:
Quick Start using Community Components (Local)
==============================================
Download `Confluent Platform `_ and use this quick start to get up and running using
|cp| with |cc| components in a development environment. It demonstrates the basic and most powerful capabilities, including creating topics, adding
and modifying data, and stream processing by using KSQL. In this quick start you will create |ak| topics and streaming
queries on these topics by using KSQL.
This quick start leverages the |cp| CLI, the |ak-tm| CLI, and the KSQL CLI. For a rich UI-based experience, try out the
|cp| :ref:`quick start ` with commercial components.
.. include:: includes/cp-auto-demo.rst
.. important::
.. include:: ../includes/java-snippet.rst
.. include:: includes/non-docker-prereqs.rst
:start-line: 2
:end-line: 6
.. _download-start-cp-cos:
Step 1: Download and Start |cp|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Go to the `downloads page `_ and choose **Download Confluent Community**.
#. Provide your name and email and select **Download**, and then choose the desired format ``.tar.gz`` or ``.zip``.
#. Decompress the file. You should have these directories:
.. include:: ../includes/tarball-contents.rst
#. Install the :ref:`Confluent Hub client `. This is used in the next step to
install the free and open source ``kafka-source-datagen`` connector.
* Install |c-hub| on :ref:`MacOS `.
* Install |c-hub| on :ref:`Linux `.
#. .. include:: includes/quickstart-step3.rst
:start-after: step-3-run-another-instance-end
:end-before: step-3-install-cli-end
For more information, see :ref:`cli-install`.
#. .. include:: includes/quickstart-step3.rst
:start-after: step-3-mid
:end-before: step-3-run-instance-start
.. code:: bash
confluent-hub install \
--no-prompt confluentinc/kafka-connect-datagen:latest
Your output should resemble:
.. code:: bash
Running in a "--no-prompt" mode
...
Completed
#. Set the path to your |cp| installation in your shell profile. For example:
::
cat ~/.bash_profile
export CONFLUENT_HOME=
export PATH="${CONFLUENT_HOME}/bin:$PATH"
#. Start |cp| using the |confluent-cli| :ref:`confluent_local_start` command. This command will start all of the |cp| components, including |ak|,
|zk|, |sr|, HTTP REST Proxy for |ak|, |kconnect-long|, and KSQL. You can add Confluent's ``bin`` directory
to your PATH by running: ``export PATH=/bin:$PATH``
.. include:: ../includes/cli.rst
:start-after: cli_limitations_start
:end-before: cli_limitations_end
.. codewithvars:: bash
|confluent_start|
Your output should resemble:
.. include:: ../includes/cli.rst
:start-after: COS_CP_CLI_startup_output
:end-before: COS_CP_CLI_startup_output_end
.. step 2
.. include:: includes/cos-quickstart-step2.rst
:start-after: step-2-intro-start
:end-before: step-2-intro-start-end
#. .. include:: includes/cos-quickstart-step2.rst
:start-after: step-2-intro-start-end
:end-before: step-2-users-end
.. codewithvars:: bash
./bin/kafka-topics --create --bootstrap-server localhost:9092 \
--replication-factor 1 --partitions 1 --topic users
.. include:: includes/cos-quickstart-step2.rst
:start-after: step-2-users-end
:end-before: step-2-users-output-end
#. .. include:: includes/cos-quickstart-step2.rst
:start-after: step-2-users-output-end
:end-before: step-2-pageviews-end
.. codewithvars:: bash
./bin/kafka-topics --create --bootstrap-server localhost:9092 \
--replication-factor 1 --partitions 1 --topic pageviews
.. include:: includes/cos-quickstart-step2.rst
:start-after: step-2-pageviews-end
:end-before: step-2-pageviews-output-end
.. step 3
.. include:: includes/quickstart-step3.rst
:start-after: step-3-start
:end-before: step-3-mid
#. .. include:: includes/quickstart-step3.rst
:start-after: step-3-run-instance-start
:end-before: step-3-run-instance-end
.. codewithvars:: bash
wget https://github.com/confluentinc/kafka-connect-datagen/raw/master/config/connector_pageviews_cos.config
curl -X POST -H "Content-Type: application/json" --data @connector_pageviews_cos.config http://localhost:8083/connectors
#. .. include:: includes/quickstart-step3.rst
:start-after: step-3-run-instance-end
:end-before: step-3-run-another-instance-end
.. codewithvars:: bash
wget https://github.com/confluentinc/kafka-connect-datagen/raw/master/config/connector_users_cos.config
curl -X POST -H "Content-Type: application/json" --data @connector_users_cos.config http://localhost:8083/connectors
.. tip:: The Kafka Connect Datagen connector was installed manually in :ref:`download-start-cp-cos`. If you
encounter issues locating the Datagen Connector, refer to the :ref:`whereis_datagen_cos` in the
Troubleshooting section.
.. step 4
.. _cos-streams-tables-non-docker:
.. include:: includes/cos-quickstart-step4.rst
:start-after: start-cos-quickstartstart
:end-before: cos-qs-step1-start
#. .. include:: includes/cos-quickstart-step4.rst
:start-after: cos-qs-step1-start
:end-before: cos-qs-step1-mid
.. code:: bash
LOG_DIR=./ksql_logs ./bin/ksql
.. include:: includes/cos-quickstart-step4.rst
:start-after: cos-qs-step1-mid
:end-before: cos-qs-step1-end
#. .. include:: includes/cos-quickstart-step4.rst
:start-after: cos-qs-step1-end
:end-before: cos-qs-step2-end
#. .. include:: includes/cos-quickstart-step4.rst
:start-after: cos-qs-step2-end
:end-before: cos-qs-step3-end
.. include:: includes/cos-quickstart-step4.rst
:start-after: cos-qs-step3-end
.. step 5
.. include:: includes/cos-quickstart-step5.rst
Step 6: Stop |cp|
^^^^^^^^^^^^^^^^^^^^^
When you are done working with the local install, you can stop |cp|.
#. Stop |cp| using the :ref:`Confluent CLI ` :ref:`confluent_local_stop` command.
.. sourcecode:: bash
./bin/confluent local stop
#. Destroy the data in the |cp| instance with the :ref:`confluent_local_destroy` command.
.. codewithvars:: bash
./bin/|confluent_destroy|
You can start the local install of |cp| again with the :ref:`confluent_local_start` command.
.. troubleshooting
.. include:: includes/cos-quickstart-troubleshoot.rst
.. next steps
.. include:: includes/cos-quickstart-next-steps.rst