You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2018/02/07 23:22:30 UTC
[incubator-pulsar] branch master updated: Simplify documentation
for getting started (#1198)
This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 750e1b5 Simplify documentation for getting started (#1198)
750e1b5 is described below
commit 750e1b57eb38fde1d051b906f9f85c8f742e342d
Author: Luc Perkins <lu...@gmail.com>
AuthorDate: Wed Feb 7 15:22:28 2018 -0800
Simplify documentation for getting started (#1198)
* begin adding section on connecting to running cluster
* remove unnecessary bash comment
---
site/_data/cli/pulsar-client.yaml | 2 +-
site/_includes/explanations/install-package.md | 38 +++++++-------------------
site/docs/latest/deployment/cluster.md | 24 ++++++++++++++++
3 files changed, 35 insertions(+), 29 deletions(-)
diff --git a/site/_data/cli/pulsar-client.yaml b/site/_data/cli/pulsar-client.yaml
index a2725c8..1789cbc 100644
--- a/site/_data/cli/pulsar-client.yaml
+++ b/site/_data/cli/pulsar-client.yaml
@@ -30,7 +30,7 @@ commands:
description: Comma-separated string of messages to send; either `-m` or `-f` must be specified
default: '[]'
- flags: -n, --num-produce
- description: The number of times to send the message(s); the count of `messages`/`files` * `num-produce` should below than 1000
+ description: The number of times to send the message(s); the count of `messages`/`files` * `num-produce` should be below 1000
default: 1
- flags: -r, --rate
description: Rate (in messages per second) at which to produce; a value 0 means to produce messages as fast as possible
diff --git a/site/_includes/explanations/install-package.md b/site/_includes/explanations/install-package.md
index 8c16c4d..f2f7d82 100644
--- a/site/_includes/explanations/install-package.md
+++ b/site/_includes/explanations/install-package.md
@@ -19,9 +19,7 @@
-->
-{% capture root_url %}http://www.apache.org/dist/incubator/pulsar/pulsar-{{ site.current_version }}/apache-pulsar-{{ site.current_version }}{% endcapture %}
-{% capture binary_release_url %}{{ root_url }}-bin.tar.gz{% endcapture %}
-{% capture source_release_url %}{{ root_url }}-src.tar.gz{% endcapture %}
+{% capture binary_release_url %}http://www.apache.org/dyn/closer.cgi/incubator/pulsar/pulsar-{{ site.current_version }}/apache-pulsar-{{ site.current_version }}-bin.tar.gz{% endcapture %}
## System requirements
@@ -31,9 +29,8 @@ Pulsar is currently available for **MacOS** and **Linux**. In order to use Pulsa
To get started running Pulsar, download a binary tarball release in one of the following ways:
-* by clicking one of these links, which will automatically trigger a download:
+* by clicking the link below, which will automatically trigger a download:
- * <a href="{{ source_release_url }}" download>Pulsar {{ site.current_version }} source release</a>
* <a href="{{ binary_release_url }}" download>Pulsar {{ site.current_version }} binary release</a>
* from the Pulsar [downloads page](/download)
@@ -41,45 +38,30 @@ To get started running Pulsar, download a binary tarball release in one of the f
* using [wget](https://www.gnu.org/software/wget):
```shell
- # Source release
- $ wget {{ source_release_url }}
-
- # Binary release
$ wget {{ binary_release_url }}
```
Once the tarball is downloaded, untar it and `cd` into the resulting directory:
```bash
-# Source release
-$ tar xvfz apache-pulsar-{{ site.current_version }}-src.tar.gz
-$ cd apache-pulsar-{{ site.current_version }}
-
-# Binary release
$ tar xvfz apache-pulsar-{{ site.current_version }}-bin.tar.gz
$ cd apache-pulsar-{{ site.current_version }}
```
## What your package contains
-Both the source and binary packages contain the following directories:
+The Pulsar binary package initially contains the following directories:
Directory | Contains
:---------|:--------
`bin` | Pulsar's [command-line tools](../../reference/CliTools), such as [`pulsar`](../../reference/CliTools#pulsar) and [`pulsar-admin`](../../reference/CliTools#pulsar-admin)
`conf` | Configuration files for Pulsar, including for [broker configuration](../../reference/Configuration#broker), [ZooKeeper configuration](../../reference/Configuration#zookeeper), and more
-`data` | The data storage directory used by {% popover ZooKeeper %} and {% popover BookKeeper %}.
-`lib` | The [JAR](https://en.wikipedia.org/wiki/JAR_(file_format)) files used by Pulsar.
-`logs` | Logs created by the installation.
-
-The source package contains all of the assets, specific to version {{ site.current_version}}, from the [Pulsar repository]({{ site.pulsar_repo }}).
-
-## Compiling from source
+`lib` | The [JAR](https://en.wikipedia.org/wiki/JAR_(file_format)) files used by Pulsar
+`licenses` | License files, in `.txt` form, for various components of the Pulsar [codebase](../../project/Codebase)
-If you've downloaded a source release and would like to compile it, you'll need to have [JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and [Maven](https://maven.apache.org/) installed. To run the scripts in the `bin` directory, you'll need to have the [Java SE Runtime Environment](http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html) installed (JDK 8 already includes this).
+These directories will be created once you begin running Pulsar:
-To compile, skipping the tests:
-
-```shell
-$ mvn install -DskipTests
-```
+Directory | Contains
+:---------|:--------
+`data` | The data storage directory used by {% popover ZooKeeper %} and {% popover BookKeeper %}
+`logs` | Logs created by the installation
diff --git a/site/docs/latest/deployment/cluster.md b/site/docs/latest/deployment/cluster.md
index b6ab391..0a23b0e 100644
--- a/site/docs/latest/deployment/cluster.md
+++ b/site/docs/latest/deployment/cluster.md
@@ -229,3 +229,27 @@ $ bin/pulsar-daemon start broker
```
Once you've succesfully started up all the brokers you intend to use, your Pulsar cluster should be ready to go!
+
+## Connecting to the running cluster
+
+Once your Pulsar cluster is up and running, you should be able to connect with it using Pulsar clients. One such client is the [`pulsar-client`](../../../reference/CliTools#pulsar-client) tool, which is included with the Pulsar binary package. The `pulsar-client` tool can publish messages to and consume messages from Pulsar {% popover topics %} and thus provides a simple way to make sure that your cluster is runnning properly.
+
+To use the `pulsar-client` tool, first modify the client configuration file in [`conf/client.conf`](../../../reference/Configuration#client) in your binary package. You'll need to change the values for `webServiceUrl` and `brokerServiceUrl`, substituting `localhost` (which is the default), with the DNS name that you've assigned to your broker/bookie hosts. Here's an example:
+
+```properties
+webServiceUrl=http://us-west.example.com:8080/
+brokerServiceurl=pulsar://us-west.example.com:6650/
+```
+
+Once you've done that, you can publish a message to Pulsar topic:
+
+```bash
+$ bin/pulsar-client produce \
+ persistent://sample/pulsar-cluster-1/ns1/test \
+ -n 1 \
+ -m "Hello, Pulsar"
+```
+
+> You may need to use a different cluster name in the topic if you specified a cluster name different from `pulsar-cluster-1`.
+
+This will publish a single message to the Pulsar topic.
--
To stop receiving notification emails like this one, please contact
mmerli@apache.org.