<commit_before>// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

[[quickstart]]
= Apache Kudu Quickstart
:author: Kudu Team
:imagesdir: ./images
:icons: font
:toc: left
:toclevels: 2
:doctype: book
:backend: html5
:sectlinks:
:experimental:

Follow these instructions to set up and run a local Kudu Cluster using Docker,
and get started using Apache Kudu in minutes.

Note: This is intended for demonstration purposes only and shouldn't
be used for production or performance/scale testing.

[[quickstart_vm]]

== Install Docker

Follow the Docker link:https://docs.docker.com/install/[install documentation]
to install docker in your Linux, Mac, or Windows environment.

You may also want to read through the Docker getting started guide, but that isn't a requirement.

== Clone the Repository

Clone the Apache Kudu repository using Git and change to the `kudu` directory:

[source,bash]
----
$ git clone https://github.com/apache/kudu
$ cd kudu
----

== Start the Quickstart Cluster

=== Set KUDU_QUICKSTART_IP

Set the `KUDU_QUICKSTART_IP` environment variable to your ip address:

[source,bash]
----
$ export KUDU_QUICKSTART_IP=$(ifconfig | grep "inet " | grep -Fv 127.0.0.1 | cut -d" " -f2 | tail -1)
----

=== Bring up the Cluster

Then use `docker-compose` to start a cluster with 3 master servers and 5 tablet servers.
When inside the docker network/containers the master addresses will be
`kudu-master-1:7051,kudu-master-2:7151,kudu-master-3:7251` and when on the host machine
you can specify the master addresses with `localhost:7051,localhost:7151,localhost:7251`.

[source,bash]
----
docker-compose -f docker/quickstart.yml up
----

Note: You can include the `-d` flag to run the cluster in the background.

=== View the Web-UI

Once the cluster is started you can view the master web-ui by visiting link:localhost:8050[localhost:8050].

=== Check the cluster health

Use the command below to get a bash shell in the `kudu-master-1` container:<commit_msg>[docs] Fix quickstart IP one liner<commit_after>// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

[[quickstart]]
= Apache Kudu Quickstart
:author: Kudu Team
:imagesdir: ./images
:icons: font
:toc: left
:toclevels: 2
:doctype: book
:backend: html5
:sectlinks:
:experimental:

Follow these instructions to set up and run a local Kudu Cluster using Docker,
and get started using Apache Kudu in minutes.

Note: This is intended for demonstration purposes only and shouldn't
be used for production or performance/scale testing.

[[quickstart_vm]]

== Install Docker

Follow the Docker link:https://docs.docker.com/install/[install documentation]
to install docker in your Linux, Mac, or Windows environment.

You may also want to read through the Docker getting started guide, but that isn't a requirement.

== Clone the Repository

Clone the Apache Kudu repository using Git and change to the `kudu` directory:

[source,bash]
----
$ git clone https://github.com/apache/kudu
$ cd kudu
----

== Start the Quickstart Cluster

=== Set KUDU_QUICKSTART_IP

Set the `KUDU_QUICKSTART_IP` environment variable to your ip address:

[source,bash]
----
$ export KUDU_QUICKSTART_IP=$(ifconfig | grep "inet " | grep -Fv 127.0.0.1 |  awk '{print $2}' | tail -1)
----

=== Bring up the Cluster

Then use `docker-compose` to start a cluster with 3 master servers and 5 tablet servers.
When inside the docker network/containers the master addresses will be
`kudu-master-1:7051,kudu-master-2:7151,kudu-master-3:7251` and when on the host machine
you can specify the master addresses with `localhost:7051,localhost:7151,localhost:7251`.

[source,bash]
----
docker-compose -f docker/quickstart.yml up
----

Note: You can include the `-d` flag to run the cluster in the background.

=== View the Web-UI

Once the cluster is started you can view the master web-ui by visiting link:localhost:8050[localhost:8050].

=== Check the cluster health

Use the command below to get a bash shell in the `kudu-master-1` container:
{'fraction_non_alphanumeric': 0.09097565440234304, 'fraction_numerical': 0.019037159070108, 'mean_word_length': 4.078066914498141, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5141743', 'n_tokens_mistral': 1645, 'n_tokens_neox': 1540, 'n_words': 714}