You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/08/06 07:50:11 UTC

[GitHub] [pulsar] sijia-w opened a new pull request #7769: Add deploy-docker doc

sijia-w opened a new pull request #7769:
URL: https://github.com/apache/pulsar/pull/7769


   Fix #5401
   
   Motivation:
   Add deployment on Docker doc.
   
   Modification:
   The doc about how to deploy a cluster on Docker is added and the sidebar is updated accordingly.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] sijia-w commented on pull request #7769: [Issue 5401][docs] Add deploy-docker doc

Posted by GitBox <gi...@apache.org>.
sijia-w commented on pull request #7769:
URL: https://github.com/apache/pulsar/pull/7769#issuecomment-670450472


   @Jennifer88huang Thank you for your comments and help.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Jennifer88huang commented on pull request #7769: [Issue 5401][docs] Add deploy-docker doc

Posted by GitBox <gi...@apache.org>.
Jennifer88huang commented on pull request #7769:
URL: https://github.com/apache/pulsar/pull/7769#issuecomment-670816063


   @zymap Do you have any comments on this PR?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Jennifer88huang commented on pull request #7769: Add deploy-docker doc

Posted by GitBox <gi...@apache.org>.
Jennifer88huang commented on pull request #7769:
URL: https://github.com/apache/pulsar/pull/7769#issuecomment-670308600


   @sijia-w you can rename the PR title and its description specified in the PR template.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Jennifer88huang commented on a change in pull request #7769: Add deploy-docker doc

Posted by GitBox <gi...@apache.org>.
Jennifer88huang commented on a change in pull request #7769:
URL: https://github.com/apache/pulsar/pull/7769#discussion_r466807119



##########
File path: site2/docs/deploy-docker.md
##########
@@ -0,0 +1,51 @@
+---
+id: deploy-docker
+title: Deploy a cluster on Docker
+sidebar_label: Docker
+---
+
+To deploy a Pulsar cluster on Docker, complete the following steps:
+1. Deploy a ZooKeeper cluster (optional)
+2. Initialize cluster metadata
+3. Deploy a BookKeeper cluster
+4. Deploy one or more Pulsar brokers
+
+## Prepare
+
+To run Pulsar on Docker, you need to create a container for each Pulsar component: ZooKeeper, BookKeeper and broker. You can pull the images of ZooKeeper and BookKeeper separately on [Docker Hub](https://hub.docker.com/), and pull a [Pulsar image](https://hub.docker.com/r/apachepulsar/pulsar-all/tags) for the broker. You can also pull only one [Pulsar image](https://hub.docker.com/r/apachepulsar/pulsar-all/tags) and create three containers with this image. This tutorial takes the second option as an example.
+
+### Pull a Pulsar image
+You can pull a Pulsar image from [Docker Hub](https://hub.docker.com/r/apachepulsar/pulsar-all/tags) with the following command.
+
+```
+docker run -it apachepulsar/pulsar-all:latest
+```
+
+### Create three containers
+Create containers for ZooKeeper, BookKeeper and broker. In this example, they are named as `zookeeper`, `bookkeeper` and `broker` respectively. You can name them as you want with the `--name` flag. By default, the container names are created randomly.
+
+```
+docker run -it --name bookkeeper apachepulsar/pulsar-all:latest /bin/bash
+docker run -it --name zookeeper apachepulsar/pulsar-all:latest /bin/bash
+docker run -it --name broker apachepulsar/pulsar-all:latest /bin/bash
+```
+
+### Create a network
+To deploy a Pulsar cluster on Docker, you need to create a `network` and connect the containers of ZooKeeper, BookKeeper and broker to this network. The following command creates the network `pulsar`:
+
+```
+docker network create pulsar
+```
+
+### Connect containers to network
+Connect the containers of ZooKeeper, BookKeeper and broker to the `pulsar` network with the following commands. 
+
+```
+docker network connect pulsar zookeeper
+docker network connect pulsar bookkeeper
+docker network connect pulsar broker
+```
+
+To check whether the containers are successfully connected to the network, enter the `docker network inspect pulsar` command.
+
+For detailed information about deployment for each Pulsar component, see [deploy a cluster on bare metal](https://pulsar.apache.org/docs/en/deploy-bare-metal/).

Review comment:
       ```suggestion
   For detailed information about how to deploy ZooKeeper cluster, BookKeeper cluster, brokers, see [deploy a cluster on bare metal](deploy-bare-metal.md).
   ```

##########
File path: site2/docs/deploy-docker.md
##########
@@ -0,0 +1,51 @@
+---
+id: deploy-docker
+title: Deploy a cluster on Docker
+sidebar_label: Docker
+---
+
+To deploy a Pulsar cluster on Docker, complete the following steps:
+1. Deploy a ZooKeeper cluster (optional)
+2. Initialize cluster metadata
+3. Deploy a BookKeeper cluster
+4. Deploy one or more Pulsar brokers
+
+## Prepare
+
+To run Pulsar on Docker, you need to create a container for each Pulsar component: ZooKeeper, BookKeeper and broker. You can pull the images of ZooKeeper and BookKeeper separately on [Docker Hub](https://hub.docker.com/), and pull a [Pulsar image](https://hub.docker.com/r/apachepulsar/pulsar-all/tags) for the broker. You can also pull only one [Pulsar image](https://hub.docker.com/r/apachepulsar/pulsar-all/tags) and create three containers with this image. This tutorial takes the second option as an example.
+
+### Pull a Pulsar image
+You can pull a Pulsar image from [Docker Hub](https://hub.docker.com/r/apachepulsar/pulsar-all/tags) with the following command.
+
+```
+docker run -it apachepulsar/pulsar-all:latest
+```
+
+### Create three containers
+Create containers for ZooKeeper, BookKeeper and broker. In this example, they are named as `zookeeper`, `bookkeeper` and `broker` respectively. You can name them as you want with the `--name` flag. By default, the container names are created randomly.
+
+```
+docker run -it --name bookkeeper apachepulsar/pulsar-all:latest /bin/bash
+docker run -it --name zookeeper apachepulsar/pulsar-all:latest /bin/bash
+docker run -it --name broker apachepulsar/pulsar-all:latest /bin/bash
+```
+
+### Create a network
+To deploy a Pulsar cluster on Docker, you need to create a `network` and connect the containers of ZooKeeper, BookKeeper and broker to this network. The following command creates the network `pulsar`:
+
+```
+docker network create pulsar
+```
+
+### Connect containers to network
+Connect the containers of ZooKeeper, BookKeeper and broker to the `pulsar` network with the following commands. 
+
+```
+docker network connect pulsar zookeeper
+docker network connect pulsar bookkeeper
+docker network connect pulsar broker
+```
+
+To check whether the containers are successfully connected to the network, enter the `docker network inspect pulsar` command.
+
+For detailed information about deployment for each Pulsar component, see [deploy a cluster on bare metal](https://pulsar.apache.org/docs/en/deploy-bare-metal/).

Review comment:
       1. When you tell users Pulsar component, they might think which component.
   2. Use relative path in reference link.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Jennifer88huang merged pull request #7769: [Issue 5401][docs] Add deploy-docker doc

Posted by GitBox <gi...@apache.org>.
Jennifer88huang merged pull request #7769:
URL: https://github.com/apache/pulsar/pull/7769


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] sijia-w commented on pull request #7769: Add deploy-docker doc

Posted by GitBox <gi...@apache.org>.
sijia-w commented on pull request #7769:
URL: https://github.com/apache/pulsar/pull/7769#issuecomment-669803191


   @zymap @Jennifer88huang Please help review the added doc.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org