This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository

The following commit(s) were added to refs/heads/master by this push:
     new 9be2a65  [documentation] Cherry-pick documentation on bare mental 
deployment to 2.1.0 (#2358)
9be2a65 is described below

commit 9be2a656fdf58c7edc6e1b64461309961e564673
Author: Sijie Guo <>
AuthorDate: Sat Aug 11 09:59:29 2018 -0700

    [documentation] Cherry-pick documentation on bare mental deployment to 
2.1.0 (#2358)
    ### Motivation
    PR #2335 improved documentation on bare mental deployment. But it missed to 
add to 2.1.0 documentation.
     ### Changes
    Cherry-pick the documentation changes to version 2.1.0
 .../version-2.1.0-incubating/  | 127 ++++++++++++++++++++-
 1 file changed, 124 insertions(+), 3 deletions(-)

diff --git 
index 6cd7ff6..23b2121 100644
--- a/site2/website/versioned_docs/version-2.1.0-incubating/
+++ b/site2/website/versioned_docs/version-2.1.0-incubating/
@@ -18,18 +18,23 @@ original_id: deploy-bare-metal
 Deploying a Pulsar cluster involves doing the following (in order):
-* Deploying a [ZooKeeper](#deploying-a-zookeeper-cluster) cluster
+* Deploying a [ZooKeeper](#deploying-a-zookeeper-cluster) cluster (optional)
 * Initializing [cluster metadata](#initializing-cluster-metadata)
 * Deploying a [BookKeeper](#deploying-a-bookkeeper-cluster) cluster
 * Deploying one or more Pulsar [brokers](#deploying-pulsar-brokers)
+## Preparation
 ### Requirements
+> If you already have an existing zookeeper cluster and would like to reuse 
it, you don't need to prepare the machines
+> for running ZooKeeper.
 To run Pulsar on bare metal, you will need:
 * At least 6 Linux machines or VMs
   * 3 running [ZooKeeper](
-  * 3 running a Pulsar broker and a 
[BookKeeper]( bookie
+  * 3 running a Pulsar broker, and a 
[BookKeeper]( bookie
 * A single [DNS]( name 
covering all of the Pulsar broker hosts
 Each machine in your cluster will need to have [Java 
8]( or 
higher installed.
@@ -44,8 +49,12 @@ In this diagram, connecting clients need to be able to 
communicate with the Puls
 When deploying a Pulsar cluster, we have some basic recommendations that you 
should keep in mind when capacity planning.
+#### ZooKeeper
 For machines running ZooKeeper, we recommend using lighter-weight machines or 
VMs. Pulsar uses ZooKeeper only for periodic coordination- and 
configuration-related tasks, *not* for basic operations. If you're running 
Pulsar on [Amazon Web Services]( (AWS), for example, a 
 instance would likely suffice.
+#### Bookies & Brokers
 For machines running a bookie and a Pulsar broker, we recommend using more 
powerful machines. For an AWS deployment, for example, 
 instances may be appropriate. On those machines we also recommend:
 * Fast CPUs and 10Gbps 
[NIC]( (for Pulsar 
@@ -84,8 +93,52 @@ Directory | Contains
 `lib` | The [JAR]( files used 
by Pulsar.
 `logs` | Logs created by the installation.
+## Installing Builtin Connectors (optional)
+> Since release `2.1.0-incubating`, Pulsar releases a separate binary 
distribution, containing all the `builtin` connectors.
+> If you would like to enable those `builtin` connectors, you can follow the 
instructions as below; otherwise you can
+> skip this section for now.
+To get started using builtin connectors, you'll need to download the 
connectors tarball release on every broker node in
+one of the following ways:
+* by clicking the link below and downloading the release from an Apache mirror:
+  * <a href="pulsar:connector_release_url" download>Pulsar IO Connectors 
{{pulsar:version}} release</a>
+* from the Pulsar [downloads page](pulsar:download_page_url)
+* from the Pulsar [releases 
+* using [wget](
+  ```shell
+  $ wget pulsar:connector_release_url
+  ```
+Once the tarball is downloaded, in the pulsar directory, untar the 
io-connectors package and copy the connectors as `connectors`
+in the pulsar directory:
+$ tar xvfz apache-pulsar-io-connectors-{{pulsar:version}}-bin.tar.gz
+// you will find a directory named 
`apache-pulsar-io-connectors-{{pulsar:version}}` in the pulsar directory
+// then copy the connectors
+$ mv apache-pulsar-io-connectors-{{pulsar:version}}/connectors connectors
+$ ls connectors
 ## Deploying a ZooKeeper cluster
+> If you already have an exsiting zookeeper cluster and would like to use it, 
you can skip this section.
 [ZooKeeper]( manages a variety of essential 
coordination- and configuration-related tasks for Pulsar. To deploy a Pulsar 
cluster you'll need to deploy ZooKeeper first (before all other components). We 
recommend deploying a 3-node ZooKeeper cluster. Pulsar does not make heavy use 
of ZooKeeper, so more lightweight machines or VMs should suffice for running 
 To begin, add all ZooKeeper servers to the configuration specified in 
[`conf/zookeeper.conf`]( (in the Pulsar 
directory you created [above](#installing-the-pulsar-binary-package)). Here's 
an example:
@@ -156,6 +209,15 @@,,
 Once you've appropriately modified the `zkServers` parameter, you can provide 
any other configuration modifications you need. You can find a full listing of 
the available BookKeeper configuration parameters 
[here](, although we would recommend 
consulting the [BookKeeper 
documentation]( for 
a more in-depth guide.
+> ##### NOTES
+> Since Pulsar 2.1.0 release, Pulsar introduces [stateful 
function]( for Pulsar Functions. If you would like to enable 
that feature,
+> you need to enable table service on BookKeeper by setting following setting 
in `conf/bookkeeper.conf` file.
+> ```conf
+> ```
 Once you've applied the desired configuration in `conf/bookkeeper.conf`, you 
can start up a bookie on each of your BookKeeper hosts. You can start up each 
bookie either in the background, using 
[nohup](, or in the foreground.
 To start the bookie in the background, use the 
[`pulsar-daemon`]( CLI tool:
@@ -170,7 +232,7 @@ To start the bookie in the foreground:
 $ bin/bookkeeper bookie
-You can verify that the bookie is working properly using the `bookiesanity` 
command for the [BookKeeper 
+You can verify that a bookie is working properly by running the `bookiesanity` 
command for the [BookKeeper shell]( on it:
 $ bin/bookkeeper shell bookiesanity
@@ -178,10 +240,22 @@ $ bin/bookkeeper shell bookiesanity
 This will create an ephemeral BookKeeper ledger on the local bookie, write a 
few entries, read them back, and finally delete the ledger.
+After you have started all the bookies, you can use `simpletest` command for 
[BookKeeper shell]( on any bookie node, to
+verify all the bookies in the cluster are up running.
+$ bin/bookkeeper shell simpletest --ensemble <num-bookies> --writeQuorum 
<num-bookies> --ackQuorum <num-bookies> --numEntries <num-entries>
+This command will create a `num-bookies` sized ledger on the cluster, write a 
few entries, and finally delete the ledger.
 ## Deploying Pulsar brokers
 Pulsar brokers are the last thing you need to deploy in your Pulsar cluster. 
Brokers handle Pulsar messages and provide Pulsar's administrative interface. 
We recommend running **3 brokers**, one for each machine that's already running 
a BookKeeper bookie.
+### Configuring Brokers
 The most important element of broker configuration is ensuring that that each 
broker is aware of the ZooKeeper cluster that you've deployed. Make sure that 
the [`zookeeperServers`]( 
 parameters. In this case, since we only have 1 cluster and no configuration 
store setup, the `configurationStoreServers` will point to the same 
@@ -195,6 +269,24 @@ You also need to specify the cluster name (matching the 
name that you provided w
+### Enabling Pulsar Functions (optional)
+If you want to enable [Pulsar Functions](, you can 
follow the instructions as below:
+1. Edit `conf/broker.conf` to enable function worker, by setting 
`functionsWorkerEnabled` to `true`.
+    ```conf
+    functionsWorkerEnabled=true
+    ```
+2. Edit `conf/functions_worker.yml` and set `pulsarFunctionsCluster` to the 
cluster name that you provided when [initializing the cluster's 
+    ```conf
+    pulsarFunctionsCluster=pulsar-cluster-1
+    ```
+### Starting Brokers
 You can then provide any other configuration changes that you'd like in the 
[`conf/broker.conf`]( file. Once you've 
decided on a configuration, you can start up the brokers for your Pulsar 
cluster. Like ZooKeeper and BookKeeper, brokers can be started either in the 
foreground or in the background, using nohup.
 You can start a broker in the foreground using the [`pulsar 
broker`]( command:
@@ -234,3 +326,32 @@ $ bin/pulsar-client produce \
 > 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.
+## Running Functions
+> If you have [enabled](#enabling-pulsar-functions-optional) Pulsar Functions, 
you can also tryout pulsar functions now.
+Create a ExclamationFunction `exclamation`.
+bin/pulsar-admin functions create \
+  --jar examples/api-examples.jar \
+  --className org.apache.pulsar.functions.api.examples.ExclamationFunction \
+  --inputs persistent://public/default/exclamation-input \
+  --output persistent://public/default/exclamation-output \
+  --tenant public \
+  --namespace default \
+  --name exclamation
+Check if the function is running as expected by 
[triggering]( the function.
+bin/pulsar-admin functions trigger --name exclamation --triggerValue "hello 
+You will see output as below:
+hello world!

Reply via email to