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

vongosling pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-docker.git

commit fb1ec248436fd1149641a2e8d24fa2d8b7f93dbb
Author: vongosling <vongosl...@apache.org>
AuthorDate: Mon Jun 3 17:20:15 2019 +0800

    Fix cherrypick bugs
---
 README.md                                          | 225 ++++++++++++++++++++-
 image-build/Dockerfile                             |   4 +-
 product/README.md                                  |  84 ++++----
 rocketmq-docker/.gitignore                         |   1 -
 rocketmq-docker/README.md                          | 223 --------------------
 rocketmq-docker/image-build/Dockerfile             |  94 ---------
 rocketmq-docker/image-build/build-image.sh         |  14 --
 .../image-build/scripts/runbroker-customize.sh     |  84 --------
 .../image-build/scripts/runserver-customize.sh     |  70 -------
 rocketmq-docker/product/README.md                  |  90 ---------
 .../product/conf/2m-2s-async/broker-a-s.properties |  30 ---
 .../product/conf/2m-2s-async/broker-a.properties   |  29 ---
 .../product/conf/2m-2s-async/broker-b-s.properties |  29 ---
 .../product/conf/2m-2s-async/broker-b.properties   |  29 ---
 .../product/conf/2m-2s-sync/broker-a-s.properties  |  29 ---
 .../product/conf/2m-2s-sync/broker-a.properties    |  29 ---
 .../product/conf/2m-2s-sync/broker-b-s.properties  |  29 ---
 .../product/conf/2m-2s-sync/broker-b.properties    |  29 ---
 .../product/conf/2m-noslave/broker-a.properties    |  28 ---
 .../product/conf/2m-noslave/broker-b.properties    |  29 ---
 .../conf/2m-noslave/broker-trace.properties        |  30 ---
 rocketmq-docker/product/conf/broker.conf           |  25 ---
 rocketmq-docker/product/start-broker.sh            |  49 -----
 rocketmq-docker/product/start-ns.sh                |  37 ----
 rocketmq-docker/stage.sh                           |  58 ------
 .../templates/data/broker/conf/broker.conf         |   8 -
 .../templates/data/broker/conf/broker1.conf        |   9 -
 .../data/broker0/conf/dledger/broker.conf          |  27 ---
 .../data/broker1/conf/dledger/broker.conf          |  27 ---
 .../data/broker2/conf/dledger/broker.conf          |  27 ---
 .../docker-compose/data/broker/conf/broker.conf    |   7 -
 .../docker-compose/data1/broker/conf/broker.conf   |   7 -
 .../templates/docker-compose/docker-compose.yml    |  46 -----
 .../templates/kubernetes/deployment.yaml           |  48 -----
 .../templates/kubernetes/deployment2.yaml          |  70 -------
 rocketmq-docker/templates/play-consumer.sh         |   4 -
 rocketmq-docker/templates/play-docker-compose.sh   |  16 --
 rocketmq-docker/templates/play-docker-deledger.sh  |  40 ----
 rocketmq-docker/templates/play-docker.sh           |  28 ---
 rocketmq-docker/templates/play-kubernetes.sh       |   8 -
 rocketmq-docker/templates/play-producer.sh         |   4 -
 .../templates/scripts/runbroker-customize.sh       |  84 --------
 .../templates/scripts/runserver-customize.sh       |  70 -------
 43 files changed, 268 insertions(+), 1640 deletions(-)

diff --git a/README.md b/README.md
index 7460f9a..b9fb8e5 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,223 @@
-## RocketMQ Docker
-[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
+# RocketMQ-Docker
+
+This is the Git repo of the Docker Image for Apache RocketMQ. You could run it 
through the following ways: 
+
+1. Generate a RocketMQ Docker image
+2. Run the docker image with the below modes:
+   1. Single Node.
+   2. Cluster with docker-compose.
+   3. Cluster on Kubernetes.
+
+
+## Prerequisites
+
+The Docker images in this repository should support Docker version 1.12+, and 
Kubernetes version 1.9+.
+
+
+## Quick start
+
+### A. Generate a RocketMQ docker image
+
+Note: This is an experimented code to allow users to build docker image 
locally according to a given RocketMQ version. Actually the formal images have 
been generated by RocketMQ official maintainer and stored in docker hub. 
Suggest common users to use these remote images directly.
+
+```
+cd image-build
+sh build-image.sh RMQ-VERSION
+```
+
+Tip: The supported RMQ-VERSIONs can be obtained from 
[here](https://dist.apache.org/repos/dist/release/rocketmq/)
+
+### B. Stage a specific version
+
+Users can generate a runtime (stage) directory based on a specific version and 
docker style operate the RocketMQ cluster/server/nameserver beneath the 
directory.
+
+``` 
+sh stage.sh RMQ-VERSION
+```
+
+After executing the above shell script, (e.g.  sh stage.sh 4.5.0), it will 
generate a stage directory (./stages/4.5.0).  User can do the following works 
under the directory, assuming the RMQ-version is defined with 4.5.0.
+
+#### 1. Single Node
+
+Run: 
+
+```
+cd stages/4.5.0 
+
+./play-docker.sh
+
+```
+
+#### 2. Cluster with docker-compose
+
+Run:
+
+```
+cd stages/4.5.0 
+
+./play-docker-compose.sh
+
+```
+
+
+#### 3. Cluster on Kubernetes
+
+Run:
+
+```
+cd stages/4.5.0 
+
+./play-kubernetes.sh
+
+```
+
+#### 4. Cluster of Deledger storage 
+
+Run: (Note: This feature needs RMQ version is 4.4.0 or above)
+
+```
+cd stages/4.5.0 
+
+./play-docker-deledger.sh
+
+```
+
+## 
+
+### To use specified heap size for JVM
+
+1. Use the environment variable MAX_POSSIBLE_HEAP to specify the max heap 
which JVM could use. Meanwhile, the max direct memory is the same size as 
MAX_POSSIBLE_HEAP.
+
+2. To verify the usage:
+
+Run:
+
+```
+
+docker run -d -p 9876:9876 -v `pwd`/data/namesrv/logs:/root/logs -v 
`pwd`/data/namesrv/store:/root/store --name rmqnamesrv -e 
"MAX_POSSIBLE_HEAP=100000000" rocketmqinc/rocketmq:4.4.0 sh mqnamesrv
+
+docker run -d -p 10911:10911 -p 10909:10909 -v 
`pwd`/data/broker/logs:/root/logs -v `pwd`/data/broker/store:/root/store --name 
rmqbroker --link rmqnamesrv:namesrv -e "NAMESRV_ADDR=namesrv:9876" -e 
"MAX_POSSIBLE_HEAP=200000000" rocketmqinc/rocketmq:4.4.0 sh mqbroker
+
+```
+
+### How to verify RocketMQ works well
+
+#### Verify with Docker and docker-compose
+
+1. Use `docker ps|grep rmqbroker` to find your RocketMQ broker container id.
+
+2. Use `docker exec -it {container_id} ./mqadmin clusterList -n 
{nameserver_ip}:9876` to verify if RocketMQ broker works, for example:
+```
+root$ docker exec -it 63950574b491 ./mqadmin clusterList -n 192.168.43.56:9876
+OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was 
removed in 8.0
+OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support 
was removed in 8.0
+#Cluster Name     #Broker Name            #BID  #Addr                  
#Version                #InTPS(LOAD)       #OutTPS(LOAD) #PCWait(ms) #Hour 
#SPACE
+DefaultCluster    63950574b491            0     172.17.0.3:10911       V4_3_0  
                 0.00(0,0ms)         0.00(0,0ms)          0 429398.92 -1.0000
+
+```
+
+#### Verify with Kubernetes
+
+1. Use `kubectl get pods|grep rocketmq` to find your RocketMQ broker Pod id, 
for example:
+```
+[root@k8s-master rocketmq]# kubectl get pods |grep rocketmq
+rocketmq-7697d9d574-b5z7g             2/2       Running       0          2d
+```
+
+2. Use `kubectl -n {namespace} exec -it {pod_id} -c broker bash` to login the 
broker pod, for example:
+```
+[root@k8s-master rocketmq]# kubectl -n default exec -it  
rocketmq-7697d9d574-b5z7g -c broker bash
+[root@rocketmq-7697d9d574-b5z7g bin]# 
+```
+
+3. Use `mqadmin clusterList -n {nameserver_ip}:9876` to verify if RocketMQ 
broker works, for example:
+```
+[root@rocketmq-7697d9d574-b5z7g bin]# ./mqadmin clusterList -n localhost:9876
+OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was 
removed in 8.0
+OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support 
was removed in 8.0
+#Cluster Name     #Broker Name            #BID  #Addr                  
#Version                #InTPS(LOAD)       #OutTPS(LOAD) #PCWait(ms) #Hour 
#SPACE
+DefaultCluster    rocketmq-7697d9d574-b5z7g  0     192.168.196.14:10911   
V4_3_0                   0.00(0,0ms)         0.00(0,0ms)          0 429399.44 
-1.0000
+
+```
+
+So you will find it works, enjoy !
+
+### C. Product level configuration
+
+The project also provides a usage reference for product level cluster docker 
configuration and startup. Please see the [README.md](product/README.md) 
details in /product directory.
+
+
+## FAQ
+
+#### 1. If I want the broker container to load my customized configuration 
file (which means `broker.conf`) when it starts, how can I achieve this? 
+
+First, create the customized `broker.conf`, like below:
+```
+brokerClusterName = DefaultCluster
+brokerName = broker-a
+brokerId = 0
+deleteWhen = 04
+fileReservedTime = 48
+brokerRole = ASYNC_MASTER
+flushDiskType = ASYNC_FLUSH
+#set `brokerIP1` if you want to set physical IP as broker IP.
+brokerIP1=10.10.101.80 #change you own physical IP Address
+```
+
+And put the customized `broker.conf` file at a specific path, like 
"`pwd`/data/broker/conf/broker.conf". 
+
+Then we can modify the `play-docker.sh` and volume this file to the broker 
container when it starts. For example: 
+
+```
+docker run -d -p 10911:10911 -p 10909:10909 -v 
`pwd`/data/broker/logs:/root/logs -v `pwd`/data/broker/store:/root/store -v 
`pwd`/data/broker/conf/broker.conf:/opt/rocketmq-4.4.0/conf/broker.conf --name 
rmqbroker --link rmqnamesrv:namesrv -e "NAMESRV_ADDR=namesrv:9876" 
rocketmqinc/rocketmq:4.4
+.0 sh mqbroker -c /opt/rocketmq-4.4.0/conf/broker.conf
+
+```
+
+Finally we can find the customized `broker.conf` has been used in the broker 
container. For example:
+
+```
+huandeMacBook-Pro:4.4.0 huan$ docker ps |grep mqbroker
+a32c67aed6dd        rocketmqinc/rocketmq:4.4.0   "sh mqbroker"       20 
minutes ago      Up 20 minutes       0.0.0.0:10909->10909/tcp, 9876/tcp, 
0.0.0.0:10911->10911/tcp   rmqbroker
+huandeMacBook-Pro:4.4.0 huan$ docker exec -it a32c67aed6dd cat 
/opt/rocketmq-4.4.0/conf/broker.conf
+brokerClusterName = DefaultCluster
+brokerName = broker-a
+brokerId = 0
+deleteWhen = 04
+fileReservedTime = 48
+brokerRole = ASYNC_MASTER
+flushDiskType = ASYNC_FLUSH
+#set `brokerIP1` if you want to set physical IP as broker IP.
+brokerIP1=10.10.101.80 #change you own physical IP Address
+
+```
+
+In the case of docker-compose, change the docker-compose.yml like following:
+```
+version: '2'
+services:
+  namesrv:
+    image: rocketmqinc/rocketmq:4.4.0
+    container_name: rmqnamesrv
+    ports:
+      - 9876:9876
+    volumes:
+      - ./data/namesrv/logs:/home/rocketmq/logs
+      - ./data/namesrv/store:/home/rocketmq/store
+    command: sh mqnamesrv
+  broker:
+    image: rocketmqinc/rocketmq:4.4.0
+    container_name: rmqbroker
+    ports:
+      - 10909:10909
+      - 10911:10911
+    volumes:
+      - ./data/broker/logs:/home/rocketmq/logs
+      - ./data/broker/store:/home/rocketmq/store
+      - ./data/broker/conf/broker.conf:/opt/rocketmq-4.4.0/conf/broker.conf
+    #command: sh mqbroker -n namesrv:9876
+    command: sh mqbroker -n namesrv:9876 -c ../conf/broker.conf
+    depends_on:
+      - namesrv
+
+```
\ No newline at end of file
diff --git a/image-build/Dockerfile b/image-build/Dockerfile
index e2101e1..d890715 100644
--- a/image-build/Dockerfile
+++ b/image-build/Dockerfile
@@ -42,7 +42,7 @@ ARG version
 ENV ROCKETMQ_VERSION ${version}
 
 # Rocketmq home
-ENV ROCKETMQ_HOME  /opt/rocketmq-${ROCKETMQ_VERSION}
+ENV ROCKETMQ_HOME  /home/rocketmq/rocketmq-${ROCKETMQ_VERSION}
 
 # Java home
 ENV JAVA_HOME  /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64
@@ -65,7 +65,7 @@ RUN set -eux; \
 # add scripts
 COPY scripts/ ${ROCKETMQ_HOME}/bin/
 
-RUN chown -R ${uid}:${gid} ${ROCKETMQ_HOME}/bin/
+RUN chown -R ${uid}:${gid} ${ROCKETMQ_HOME}
 
 # expose namesrv port
 EXPOSE 9876
diff --git a/product/README.md b/product/README.md
index 446f890..11282ac 100644
--- a/product/README.md
+++ b/product/README.md
@@ -1,88 +1,90 @@
-# 生产级可用的RocketMQ Docker部署
+# Config Reference of RocketMQ Docker in production
 
-## 背景
+## Background
 
-这是一个简单的使用说明,旨在说明如何在生产环境中使用可持久的存储和配置信息,在不同的网络节点下部署NameServer集群和主从模式的Broker集群。注意:这里只包含配置及启动容器,没有提及容器的监控和管理,容器机器的DNS配置,消息的分布和可靠性存储等细节。这一部分需要结合Kubernetes的功能实现RocketMQ-Operator相关的高级部署功能。
+This is a simple instructions for how to use a persistent storage and 
configuration information in a production environment to deploy a NameServer 
cluster and a master-slave broker cluster under distributed network nodes. 
 
-## 部署和运行容器的步骤
+Note: Here only contains the configuration and startup Docker containers, 
without mentioning the container's monitoring and management, the container 
machine's DNS configuration, message distribution and reliability storage 
details. This part needs to depend on the advanced deployment capabilities 
related to RocketMQ-Operator in conjunction with the capabilities of Kubernetes.
 
-1. 确定要部署的宿主机(物理或虚拟机)的IP和DNS信息,宿主机的存储文件路径,确保相关的端口(9876, 10911, 10912, 10909)未被占用
-2. 准备broker启动的配置文件,根据Cluster的要求,选择参考的配置文件,并对必要属性参数进行修改
-3. 调用docker容器启动脚本,设置参数,启动容器 
(从[这里](<https://hub.docker.com/apache/rocketmq>)查找RocketMQ镜像版本)
-4. 验证容器启动状态
+## Steps to deploy and run docker containers
 
-## 目录结构
+1. Determine the IP and DNS information of the host (physical or virtual 
machine) to be deployed with NameServer or Broker, the storage file location in 
the hosted node, and ensure that the relevant ports (9876, 10911, 10912, 10909) 
are not occupied.
+2. Prepare the configuration file used by the broker, select the reference 
configuration file according to the requirements of the Cluster, and modify the 
necessary attribute parameters in the file.
+3. Call the docker container startup script, set the docker parameters, and 
start the container (look for the RocketMQ image version from [here]())
+4. Verify the container startup status
+
+## Directory Structure
 
 product /
 
-​    | -  conf / 几种典型的集群的配置 
+​    | -  conf /   (Several typical cluster configuration references )
+
+​    | - start-ns.sh (Shell script for starting a name-server container, which 
is called once for each name-server container on different node)
 
-​    | - start-ns.sh 启动name-server容器的脚本,每个name-server容器调用一次该脚本
+​    | - start-broker.sh (Shell script for starting a broker container, which 
is called once for creating different broker cluster member on different node)
 
-​    | - start-broker.sh 启动broker容器的脚本,在不同的容器宿主机上执行该脚本,创建不同的broker集群成员
+   | - README.md 
 
-   | - REAMD.md 说明文件
+   | - README_cn.md
 
-## 一个具体的使用案例
+## Use Case 
 
-配置一个2m-2s-async的集群
+How to config a 2m-2s-async cluster in Docker style.
 
-### 启动nameserver集群 
+### Startup nameserver cluster 
 
-注意:可以跳过此步骤,如果使用已经存在的nameserver集群
+Note: You can skip this step if you use an existing nameserver cluster
 
-1. 确认要部署nameserver的宿主机,确定需要映射容器持久化的目录(DATA_HOME)和RocketMQ镜像版本(ROCKETMQ_VERSION)
+1. Confirm the host machine where the nameserver is to be deployed and copy 
the product directory into the host. Determine the directory (DATA_HOME) where 
the container persistences content (logs/storage) on the host,  as well as the 
RocketMQ image version (ROCKETMQ_VERSION)
 
-2. 运行脚本 start-ns.sh, 例如:
+2. Run the script start-ns.sh, for example:
 
    ```
    sh start-ns.sh /home/nameserver/data 4.5.0
    ```
 
-3. 如果有多个nameserver要启动,重复上述步骤。
+3. Repeat above steps if there are multiple nameservers in the cluster.
 
-### 启动broker集群
+### Startup broker cluster
 
-1. 确定要连接的NameServer集群的地址
+1. Confirm the NameServer Cluster address. (fomart e.g. 
"ns1:9876;ns2:9876;...")
 
-2. 确认要部署broker-a master的宿主机,确定需要映射容器持久化的目录(DATA_HOME),例如,确定宿主机的DATA_HOME目录为 
/home/broker/data/; 则需要把参考的conf/2m-2s-async/broker-a.properties 文件复制到 
/home/broker/data/conf/2m-2s-async/broker-a.properties
+2. Confirm the host machine where the broker-a master is to be 
deployed,determine the directory (DATA_HOME) where the container persistences 
content (logs/storage) on the host, e.g. DATA_HOME is set as 
/home/broker/data/;  then you need to copy the reference config file 
conf/2m-2s-async/broker-a.properties as 
/home/broker/data/conf/2m-2s-async/broker-a.properties in the  host.
 
-   修改broker-a.properties文件的brokerIP1配置为宿主机的dns-hostname(注 #3)
+   Change file broker-a.properties and make the property 'brokerIP1' value as 
the dns-hostname(Precautions #3) of the host.
 
-3. 确定ROCKETMQ_VERSION, 运行脚本 start-broker.sh, 例如:
+3. Confirm the ROCKETMQ_VERSION (e.g. 4.5.0), start broker with shell script 
start-broker.sh through  the following command:
 
    ```
    sh start-broker.sh /home/broker/data 4.5.0 "ns1:9876;ns2:9876" 
conf/2m-2s-async/broker-a.properties
    ```
 
-4. 确定broker容器正确启动 (注意: 宿主机目录DATA_HOME要对容器rocketmq用户开放读取权限)
+4. Check if the broker container is start up correctly (Note:The dir DATA_HOME 
in host needs to open read/write permissions  for the rocketmq user in the 
container, Precautions #1)
 
-5. 确认要部署broker-a slave的宿主机,确定需要映射容器持久化的目录(DATA_HOME),例如,确定宿主机的DATA_HOME目录为 
/home/broker/data/; 则需要把参考的conf/2m-2s-async/broker-a-s.properties 文件复制到 
/home/broker/data/conf/2m-2s-async/broker-a-s.properties
+5. Confirm the host machine where the broker-a slave is to be 
deployed,determine the directory (DATA_HOME) where the container persistences 
content (logs/storage) on the host, e.g. DATA_HOME is set as 
/home/broker/data/;  then you need to copy the reference config file 
conf/2m-2s-async/broker-a-s.properties as 
/home/broker/data/conf/2m-2s-async/broker-a-s.properties in the  host.
 
-   修改broker-a.properties文件的brokerIP1配置为宿主机的dns-hostname, 
brokerIP2为master所在的宿主机dns-hostname
+   Change file broker-a-s.properties and the proeprty 'brokerIP1' valueas the 
dns-hostname of the host.
 
-6. 确定ROCKETMQ_VERSION, 运行脚本 start-broker.sh, 例如:
+6. Confirm the ROCKETMQ_VERSION,start slave broker with shell script 
start-broker.sh:
 
    ```
    sh start-broker.sh /home/broker/data 4.5.0 "ns1:9876;ns2:9876" 
conf/2m-2s-async/broker-a-s.properties
    ```
 
-7. 确定broker容器正确启动 (注意: 宿主机目录DATA_HOME要对容器rocketmq用户开放读取权限)
-
-8. 重复上述步骤,创建broker-b的主从broker容器
-
-## 注意事项
+7. Check if the broker container is start up correctly.
 
-1. 保证宿主机存储目录的权限
+8. Repeat above steps to create master and slave broker docker conatiners.
 
-   
由于broker容器需要在宿主机的DATA_HOME目录下要写如需要持久化的数据,如,操作日志和消息存储文件,所以要求开放DATA_HOME目录下的权限,确保broker启动和运行时能够写入相关的文件。
+## Precautions
 
-   一个案例: 
当启动broker后,一段时间时间后broker自动退出,没有任何日志写入,这个可能就是由于容器没有写入DATA_HOME/logs目录权限导致。
+1. Ensure the DATA_HOME directory r/w permissions
 
-2. 在脚本中(start-broker.sh, start-ns.sh)中声明外部映射端口
+   The broker container needs to write data that needs to be persisted in the 
DATA_HOME directory of the host, these data include operation logs and message 
storage files. It is required to open the permissions in the DATA_HOME 
directory to ensure that the relevant files can be written when the broker is 
started and running. 
+      A case: After starting the broker, the broker automatically quits after 
a period of time, without any log writes, this may be due to the container does 
not write DATA_HOME / logs directory permissions.
 
-   在相关的脚本中已经定义了相关的默认映射端口,如果用户有特别需求(如端口已经被其它应用占用),则需要修改shell脚本,定义新的端口映射。
+2. Declare the external map port in the script (start-broker.sh, start-ns.sh)
+   The default mapping ports have been defined in the relevant script. If the 
user has special requirements (such as a port is already occupied by other 
applications), you need to modify the shell script to define a new port mapping.
 
-3. 建议使用DNS配置broker和name-server地址
+3. Recommended to use DNS to configure the broker and name-server address.
 
-   
运行在docker容器中的broker使用brokerIP1来指定所在的宿主机的地址,并将这个地址注册到NameServer中,以便RocketMQ客户端通过NameServer取得可以外部可用的broker地址,但是一个好的实践是使用dns-hostname,来定义相关的ip地址,这样在大规模broker进行变化或者ip地址迁移时,不会对已经部署的容器有影响。
\ No newline at end of file
+   The broker running in the docker container uses the property brokerIP1 to 
specify the address of the host it is on, and register/publish this address in 
the NameServer so that the RocketMQ client can obtain externally available 
broker addresses through the NameServer. When specifying the brokerIP1 property 
value, a good practice is to use dns- Hostname (instead of the direct IP 
address), so that when a large-scale broker changes or ip address migration, it 
will not affect the deployed [...]
\ No newline at end of file
diff --git a/rocketmq-docker/.gitignore b/rocketmq-docker/.gitignore
deleted file mode 100644
index b6889bb..0000000
--- a/rocketmq-docker/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-stages/
diff --git a/rocketmq-docker/README.md b/rocketmq-docker/README.md
deleted file mode 100644
index b9fb8e5..0000000
--- a/rocketmq-docker/README.md
+++ /dev/null
@@ -1,223 +0,0 @@
-# RocketMQ-Docker
-
-This is the Git repo of the Docker Image for Apache RocketMQ. You could run it 
through the following ways: 
-
-1. Generate a RocketMQ Docker image
-2. Run the docker image with the below modes:
-   1. Single Node.
-   2. Cluster with docker-compose.
-   3. Cluster on Kubernetes.
-
-
-## Prerequisites
-
-The Docker images in this repository should support Docker version 1.12+, and 
Kubernetes version 1.9+.
-
-
-## Quick start
-
-### A. Generate a RocketMQ docker image
-
-Note: This is an experimented code to allow users to build docker image 
locally according to a given RocketMQ version. Actually the formal images have 
been generated by RocketMQ official maintainer and stored in docker hub. 
Suggest common users to use these remote images directly.
-
-```
-cd image-build
-sh build-image.sh RMQ-VERSION
-```
-
-Tip: The supported RMQ-VERSIONs can be obtained from 
[here](https://dist.apache.org/repos/dist/release/rocketmq/)
-
-### B. Stage a specific version
-
-Users can generate a runtime (stage) directory based on a specific version and 
docker style operate the RocketMQ cluster/server/nameserver beneath the 
directory.
-
-``` 
-sh stage.sh RMQ-VERSION
-```
-
-After executing the above shell script, (e.g.  sh stage.sh 4.5.0), it will 
generate a stage directory (./stages/4.5.0).  User can do the following works 
under the directory, assuming the RMQ-version is defined with 4.5.0.
-
-#### 1. Single Node
-
-Run: 
-
-```
-cd stages/4.5.0 
-
-./play-docker.sh
-
-```
-
-#### 2. Cluster with docker-compose
-
-Run:
-
-```
-cd stages/4.5.0 
-
-./play-docker-compose.sh
-
-```
-
-
-#### 3. Cluster on Kubernetes
-
-Run:
-
-```
-cd stages/4.5.0 
-
-./play-kubernetes.sh
-
-```
-
-#### 4. Cluster of Deledger storage 
-
-Run: (Note: This feature needs RMQ version is 4.4.0 or above)
-
-```
-cd stages/4.5.0 
-
-./play-docker-deledger.sh
-
-```
-
-## 
-
-### To use specified heap size for JVM
-
-1. Use the environment variable MAX_POSSIBLE_HEAP to specify the max heap 
which JVM could use. Meanwhile, the max direct memory is the same size as 
MAX_POSSIBLE_HEAP.
-
-2. To verify the usage:
-
-Run:
-
-```
-
-docker run -d -p 9876:9876 -v `pwd`/data/namesrv/logs:/root/logs -v 
`pwd`/data/namesrv/store:/root/store --name rmqnamesrv -e 
"MAX_POSSIBLE_HEAP=100000000" rocketmqinc/rocketmq:4.4.0 sh mqnamesrv
-
-docker run -d -p 10911:10911 -p 10909:10909 -v 
`pwd`/data/broker/logs:/root/logs -v `pwd`/data/broker/store:/root/store --name 
rmqbroker --link rmqnamesrv:namesrv -e "NAMESRV_ADDR=namesrv:9876" -e 
"MAX_POSSIBLE_HEAP=200000000" rocketmqinc/rocketmq:4.4.0 sh mqbroker
-
-```
-
-### How to verify RocketMQ works well
-
-#### Verify with Docker and docker-compose
-
-1. Use `docker ps|grep rmqbroker` to find your RocketMQ broker container id.
-
-2. Use `docker exec -it {container_id} ./mqadmin clusterList -n 
{nameserver_ip}:9876` to verify if RocketMQ broker works, for example:
-```
-root$ docker exec -it 63950574b491 ./mqadmin clusterList -n 192.168.43.56:9876
-OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was 
removed in 8.0
-OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support 
was removed in 8.0
-#Cluster Name     #Broker Name            #BID  #Addr                  
#Version                #InTPS(LOAD)       #OutTPS(LOAD) #PCWait(ms) #Hour 
#SPACE
-DefaultCluster    63950574b491            0     172.17.0.3:10911       V4_3_0  
                 0.00(0,0ms)         0.00(0,0ms)          0 429398.92 -1.0000
-
-```
-
-#### Verify with Kubernetes
-
-1. Use `kubectl get pods|grep rocketmq` to find your RocketMQ broker Pod id, 
for example:
-```
-[root@k8s-master rocketmq]# kubectl get pods |grep rocketmq
-rocketmq-7697d9d574-b5z7g             2/2       Running       0          2d
-```
-
-2. Use `kubectl -n {namespace} exec -it {pod_id} -c broker bash` to login the 
broker pod, for example:
-```
-[root@k8s-master rocketmq]# kubectl -n default exec -it  
rocketmq-7697d9d574-b5z7g -c broker bash
-[root@rocketmq-7697d9d574-b5z7g bin]# 
-```
-
-3. Use `mqadmin clusterList -n {nameserver_ip}:9876` to verify if RocketMQ 
broker works, for example:
-```
-[root@rocketmq-7697d9d574-b5z7g bin]# ./mqadmin clusterList -n localhost:9876
-OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was 
removed in 8.0
-OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support 
was removed in 8.0
-#Cluster Name     #Broker Name            #BID  #Addr                  
#Version                #InTPS(LOAD)       #OutTPS(LOAD) #PCWait(ms) #Hour 
#SPACE
-DefaultCluster    rocketmq-7697d9d574-b5z7g  0     192.168.196.14:10911   
V4_3_0                   0.00(0,0ms)         0.00(0,0ms)          0 429399.44 
-1.0000
-
-```
-
-So you will find it works, enjoy !
-
-### C. Product level configuration
-
-The project also provides a usage reference for product level cluster docker 
configuration and startup. Please see the [README.md](product/README.md) 
details in /product directory.
-
-
-## FAQ
-
-#### 1. If I want the broker container to load my customized configuration 
file (which means `broker.conf`) when it starts, how can I achieve this? 
-
-First, create the customized `broker.conf`, like below:
-```
-brokerClusterName = DefaultCluster
-brokerName = broker-a
-brokerId = 0
-deleteWhen = 04
-fileReservedTime = 48
-brokerRole = ASYNC_MASTER
-flushDiskType = ASYNC_FLUSH
-#set `brokerIP1` if you want to set physical IP as broker IP.
-brokerIP1=10.10.101.80 #change you own physical IP Address
-```
-
-And put the customized `broker.conf` file at a specific path, like 
"`pwd`/data/broker/conf/broker.conf". 
-
-Then we can modify the `play-docker.sh` and volume this file to the broker 
container when it starts. For example: 
-
-```
-docker run -d -p 10911:10911 -p 10909:10909 -v 
`pwd`/data/broker/logs:/root/logs -v `pwd`/data/broker/store:/root/store -v 
`pwd`/data/broker/conf/broker.conf:/opt/rocketmq-4.4.0/conf/broker.conf --name 
rmqbroker --link rmqnamesrv:namesrv -e "NAMESRV_ADDR=namesrv:9876" 
rocketmqinc/rocketmq:4.4
-.0 sh mqbroker -c /opt/rocketmq-4.4.0/conf/broker.conf
-
-```
-
-Finally we can find the customized `broker.conf` has been used in the broker 
container. For example:
-
-```
-huandeMacBook-Pro:4.4.0 huan$ docker ps |grep mqbroker
-a32c67aed6dd        rocketmqinc/rocketmq:4.4.0   "sh mqbroker"       20 
minutes ago      Up 20 minutes       0.0.0.0:10909->10909/tcp, 9876/tcp, 
0.0.0.0:10911->10911/tcp   rmqbroker
-huandeMacBook-Pro:4.4.0 huan$ docker exec -it a32c67aed6dd cat 
/opt/rocketmq-4.4.0/conf/broker.conf
-brokerClusterName = DefaultCluster
-brokerName = broker-a
-brokerId = 0
-deleteWhen = 04
-fileReservedTime = 48
-brokerRole = ASYNC_MASTER
-flushDiskType = ASYNC_FLUSH
-#set `brokerIP1` if you want to set physical IP as broker IP.
-brokerIP1=10.10.101.80 #change you own physical IP Address
-
-```
-
-In the case of docker-compose, change the docker-compose.yml like following:
-```
-version: '2'
-services:
-  namesrv:
-    image: rocketmqinc/rocketmq:4.4.0
-    container_name: rmqnamesrv
-    ports:
-      - 9876:9876
-    volumes:
-      - ./data/namesrv/logs:/home/rocketmq/logs
-      - ./data/namesrv/store:/home/rocketmq/store
-    command: sh mqnamesrv
-  broker:
-    image: rocketmqinc/rocketmq:4.4.0
-    container_name: rmqbroker
-    ports:
-      - 10909:10909
-      - 10911:10911
-    volumes:
-      - ./data/broker/logs:/home/rocketmq/logs
-      - ./data/broker/store:/home/rocketmq/store
-      - ./data/broker/conf/broker.conf:/opt/rocketmq-4.4.0/conf/broker.conf
-    #command: sh mqbroker -n namesrv:9876
-    command: sh mqbroker -n namesrv:9876 -c ../conf/broker.conf
-    depends_on:
-      - namesrv
-
-```
\ No newline at end of file
diff --git a/rocketmq-docker/image-build/Dockerfile 
b/rocketmq-docker/image-build/Dockerfile
deleted file mode 100644
index d890715..0000000
--- a/rocketmq-docker/image-build/Dockerfile
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-# 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.
-#
-
-FROM centos:7
-
-RUN yum install -y java-1.8.0-openjdk-devel.x86_64 unzip gettext nmap-ncat 
openssl, which gnupg, telnet \
- && yum clean all -y
-
-# FROM openjdk:8-jdk
-# RUN apt-get update && apt-get install -y --no-install-recommends \
-#              bash libapr1 unzip telnet wget gnupg ca-certificates \
-#      && rm -rf /var/lib/apt/lists/*
-
-ARG user=rocketmq
-ARG group=rocketmq
-ARG uid=3000
-ARG gid=3000
-
-# RocketMQ is run with user `rocketmq`, uid = 3000
-# If you bind mount a volume from the host or a data container,
-# ensure you use the same uid
-RUN groupadd -g ${gid} ${group} \
-    && useradd -u ${uid} -g ${gid} -m -s /bin/bash ${user}
-
-ARG version
-
-# Rocketmq version
-ENV ROCKETMQ_VERSION ${version}
-
-# Rocketmq home
-ENV ROCKETMQ_HOME  /home/rocketmq/rocketmq-${ROCKETMQ_VERSION}
-
-# Java home
-ENV JAVA_HOME  /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64
-
-WORKDIR  ${ROCKETMQ_HOME}
-
-RUN set -eux; \
-    curl -s 
https://dist.apache.org/repos/dist/release/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip
 -o rocketmq.zip; \
-    curl -s 
https://dist.apache.org/repos/dist/release/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip.asc
 -o rocketmq.zip.asc; \
-    #https://www.apache.org/dist/rocketmq/KEYS
-       curl -s https://www.apache.org/dist/rocketmq/KEYS -o KEYS; \
-       \
-       gpg --import KEYS; \
-    gpg --batch --verify rocketmq.zip.asc rocketmq.zip ; \
-    unzip rocketmq.zip ; \
-       mv rocketmq-all*/* . ; \
-       rmdir rocketmq-all*  ; \
-       rm rocketmq.zip rocketmq.zip.asc KEYS
-
-# add scripts
-COPY scripts/ ${ROCKETMQ_HOME}/bin/
-
-RUN chown -R ${uid}:${gid} ${ROCKETMQ_HOME}
-
-# expose namesrv port
-EXPOSE 9876
-
-# add customized scripts for namesrv
-RUN mv ${ROCKETMQ_HOME}/bin/runserver-customize.sh 
${ROCKETMQ_HOME}/bin/runserver.sh \
- && chmod a+x ${ROCKETMQ_HOME}/bin/runserver.sh \
- && chmod a+x ${ROCKETMQ_HOME}/bin/mqnamesrv
-
-# expose broker ports
-EXPOSE 10909 10911
-
-# add customized scripts for broker
-RUN mv ${ROCKETMQ_HOME}/bin/runbroker-customize.sh 
${ROCKETMQ_HOME}/bin/runbroker.sh \
- && chmod a+x ${ROCKETMQ_HOME}/bin/runbroker.sh \
- && chmod a+x ${ROCKETMQ_HOME}/bin/mqbroker
-
-# export Java options
-RUN export JAVA_OPT=" -Duser.home=/opt"
-
-# Add ${JAVA_HOME}/lib/ext as java.ext.dirs
-RUN sed -i 
's/${JAVA_HOME}\/jre\/lib\/ext/${JAVA_HOME}\/jre\/lib\/ext:${JAVA_HOME}\/lib\/ext/'
 ${ROCKETMQ_HOME}/bin/tools.sh
-
-USER ${user}
-
-WORKDIR ${ROCKETMQ_HOME}/bin
diff --git a/rocketmq-docker/image-build/build-image.sh 
b/rocketmq-docker/image-build/build-image.sh
deleted file mode 100755
index 95cde95..0000000
--- a/rocketmq-docker/image-build/build-image.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-if [ $# -lt 1 ]; then
-    echo "Usage: sh $0 version#"
-    exit -1
-fi
-
-ROCKETMQ_VERSION=${1}
-if [ -z "${ROCKETMQ_VERSION}" ]
-then
-  ROCKETMQ_VERSION="4.5.0"
-fi
-
-# Build rocketmq
-docker build --no-cache -t rocketmqinc/rocketmq:${ROCKETMQ_VERSION} 
--build-arg version=${ROCKETMQ_VERSION} .
diff --git a/rocketmq-docker/image-build/scripts/runbroker-customize.sh 
b/rocketmq-docker/image-build/scripts/runbroker-customize.sh
deleted file mode 100755
index 8afa1ed..0000000
--- a/rocketmq-docker/image-build/scripts/runbroker-customize.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-#===========================================================================================
-# Java Environment Setting
-#===========================================================================================
-error_exit ()
-{
-    echo "ERROR: $1 !!"
-    exit 1
-}
-
-[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
-[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
-[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME 
variable in your environment, We need java(x64)!"
-
-export JAVA_HOME
-export JAVA="$JAVA_HOME/bin/java"
-export BASE_DIR=$(dirname $0)/..
-export CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH}
-
-#===========================================================================================
-# JVM Configuration
-#===========================================================================================
-# Get the max heap used by a jvm, which used all the ram available to the 
container.
-if [ -z "$MAX_POSSIBLE_HEAP" ]
-then
-       MAX_POSSIBLE_RAM_STR=$(java -XX:+UnlockExperimentalVMOptions 
-XX:MaxRAMFraction=1 -XshowSettings:vm -version 2>&1 | awk '/Max\. Heap Size 
\(Estimated\): [0-9KMG]+/{ print $5}')
-       MAX_POSSIBLE_RAM=$MAX_POSSIBLE_RAM_STR
-       CAL_UNIT=${MAX_POSSIBLE_RAM_STR: -1}
-       if [ "$CAL_UNIT" == "G" -o "$CAL_UNIT" == "g" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024 \* 1024 \* 
1024` | awk '{printf "%d",$1*$2}')
-       elif [ "$CAL_UNIT" == "M" -o "$CAL_UNIT" == "m" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024 \* 1024` | 
awk '{printf "%d",$1*$2}')
-       elif [ "$CAL_UNIT" == "K" -o "$CAL_UNIT" == "k" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024` | awk 
'{printf "%d",$1*$2}')
-       fi
-       MAX_POSSIBLE_HEAP=$[MAX_POSSIBLE_RAM/4]
-fi
-
-# Dynamically calculate parameters, for reference.
-Xms=$MAX_POSSIBLE_HEAP
-Xmx=$MAX_POSSIBLE_HEAP
-Xmn=$[MAX_POSSIBLE_HEAP/2]
-MaxDirectMemorySize=$MAX_POSSIBLE_HEAP
-# Set for `JAVA_OPT`.
-JAVA_OPT="${JAVA_OPT} -server -Xms${Xms} -Xmx${Xmx} -Xmn${Xmn}"
-JAVA_OPT="${JAVA_OPT} -XX:+UseG1GC -XX:G1HeapRegionSize=16m 
-XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 
-XX:SoftRefLRUPolicyMSPerMB=0 -XX:SurvivorRatio=8"
-JAVA_OPT="${JAVA_OPT} -verbose:gc -Xloggc:/dev/shm/mq_gc_%p.log 
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime 
-XX:+PrintAdaptiveSizePolicy"
-JAVA_OPT="${JAVA_OPT} -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 
-XX:GCLogFileSize=30m"
-JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow"
-JAVA_OPT="${JAVA_OPT} -XX:+AlwaysPreTouch"
-JAVA_OPT="${JAVA_OPT} -XX:MaxDirectMemorySize=${MaxDirectMemorySize}"
-JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages -XX:-UseBiasedLocking"
-JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${BASE_DIR}/lib"
-#JAVA_OPT="${JAVA_OPT} -Xdebug 
-Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
-JAVA_OPT="${JAVA_OPT} ${JAVA_OPT_EXT}"
-JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"
-
-numactl --interleave=all pwd > /dev/null 2>&1
-if [ $? -eq 0 ]
-then
-       if [ -z "$RMQ_NUMA_NODE" ] ; then
-               numactl --interleave=all $JAVA ${JAVA_OPT} $@
-       else
-               numactl --cpunodebind=$RMQ_NUMA_NODE --membind=$RMQ_NUMA_NODE 
$JAVA ${JAVA_OPT} $@
-       fi
-else
-       $JAVA ${JAVA_OPT} $@
-fi
diff --git a/rocketmq-docker/image-build/scripts/runserver-customize.sh 
b/rocketmq-docker/image-build/scripts/runserver-customize.sh
deleted file mode 100755
index dd25b1a..0000000
--- a/rocketmq-docker/image-build/scripts/runserver-customize.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-#===========================================================================================
-# Java Environment Setting
-#===========================================================================================
-error_exit ()
-{
-    echo "ERROR: $1 !!"
-    exit 1
-}
-
-[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
-[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
-[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME 
variable in your environment, We need java(x64)!"
-
-export JAVA_HOME
-export JAVA="$JAVA_HOME/bin/java"
-export BASE_DIR=$(dirname $0)/..
-export CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH}
-
-#===========================================================================================
-# JVM Configuration
-#===========================================================================================
-# Get the max heap used by a jvm, which used all the ram available to the 
container.
-if [ -z "$MAX_POSSIBLE_HEAP" ]
-then
-       MAX_POSSIBLE_RAM_STR=$(java -XX:+UnlockExperimentalVMOptions 
-XX:MaxRAMFraction=1 -XshowSettings:vm -version 2>&1 | awk '/Max\. Heap Size 
\(Estimated\): [0-9KMG]+/{ print $5}')
-       MAX_POSSIBLE_RAM=$MAX_POSSIBLE_RAM_STR
-       CAL_UNIT=${MAX_POSSIBLE_RAM_STR: -1}
-       if [ "$CAL_UNIT" == "G" -o "$CAL_UNIT" == "g" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024 \* 1024 \* 
1024` | awk '{printf "%d",$1*$2}')
-       elif [ "$CAL_UNIT" == "M" -o "$CAL_UNIT" == "m" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024 \* 1024` | 
awk '{printf "%d",$1*$2}')
-       elif [ "$CAL_UNIT" == "K" -o "$CAL_UNIT" == "k" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024` | awk 
'{printf "%d",$1*$2}')
-       fi
-       MAX_POSSIBLE_HEAP=$[MAX_POSSIBLE_RAM/4]
-fi
-
-# Dynamically calculate parameters, for reference.
-Xms=$MAX_POSSIBLE_HEAP
-Xmx=$MAX_POSSIBLE_HEAP
-Xmn=$[MAX_POSSIBLE_HEAP/2]
-# Set for `JAVA_OPT`.
-JAVA_OPT="${JAVA_OPT} -server -Xms${Xms} -Xmx${Xmx} -Xmn${Xmn}"
-JAVA_OPT="${JAVA_OPT} -XX:+UseConcMarkSweepGC 
-XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 
-XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 
-XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8  -XX:-UseParNewGC"
-JAVA_OPT="${JAVA_OPT} -verbose:gc -Xloggc:/dev/shm/rmq_srv_gc.log 
-XX:+PrintGCDetails"
-JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow"
-JAVA_OPT="${JAVA_OPT}  -XX:-UseLargePages"
-JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${BASE_DIR}/lib"
-#JAVA_OPT="${JAVA_OPT} -Xdebug 
-Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
-JAVA_OPT="${JAVA_OPT} ${JAVA_OPT_EXT}"
-JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"
-
-$JAVA ${JAVA_OPT} $@
diff --git a/rocketmq-docker/product/README.md 
b/rocketmq-docker/product/README.md
deleted file mode 100644
index 11282ac..0000000
--- a/rocketmq-docker/product/README.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# Config Reference of RocketMQ Docker in production
-
-## Background
-
-This is a simple instructions for how to use a persistent storage and 
configuration information in a production environment to deploy a NameServer 
cluster and a master-slave broker cluster under distributed network nodes. 
-
-Note: Here only contains the configuration and startup Docker containers, 
without mentioning the container's monitoring and management, the container 
machine's DNS configuration, message distribution and reliability storage 
details. This part needs to depend on the advanced deployment capabilities 
related to RocketMQ-Operator in conjunction with the capabilities of Kubernetes.
-
-## Steps to deploy and run docker containers
-
-1. Determine the IP and DNS information of the host (physical or virtual 
machine) to be deployed with NameServer or Broker, the storage file location in 
the hosted node, and ensure that the relevant ports (9876, 10911, 10912, 10909) 
are not occupied.
-2. Prepare the configuration file used by the broker, select the reference 
configuration file according to the requirements of the Cluster, and modify the 
necessary attribute parameters in the file.
-3. Call the docker container startup script, set the docker parameters, and 
start the container (look for the RocketMQ image version from [here]())
-4. Verify the container startup status
-
-## Directory Structure
-
-product /
-
-​    | -  conf /   (Several typical cluster configuration references )
-
-​    | - start-ns.sh (Shell script for starting a name-server container, which 
is called once for each name-server container on different node)
-
-​    | - start-broker.sh (Shell script for starting a broker container, which 
is called once for creating different broker cluster member on different node)
-
-   | - README.md 
-
-   | - README_cn.md
-
-## Use Case 
-
-How to config a 2m-2s-async cluster in Docker style.
-
-### Startup nameserver cluster 
-
-Note: You can skip this step if you use an existing nameserver cluster
-
-1. Confirm the host machine where the nameserver is to be deployed and copy 
the product directory into the host. Determine the directory (DATA_HOME) where 
the container persistences content (logs/storage) on the host,  as well as the 
RocketMQ image version (ROCKETMQ_VERSION)
-
-2. Run the script start-ns.sh, for example:
-
-   ```
-   sh start-ns.sh /home/nameserver/data 4.5.0
-   ```
-
-3. Repeat above steps if there are multiple nameservers in the cluster.
-
-### Startup broker cluster
-
-1. Confirm the NameServer Cluster address. (fomart e.g. 
"ns1:9876;ns2:9876;...")
-
-2. Confirm the host machine where the broker-a master is to be 
deployed,determine the directory (DATA_HOME) where the container persistences 
content (logs/storage) on the host, e.g. DATA_HOME is set as 
/home/broker/data/;  then you need to copy the reference config file 
conf/2m-2s-async/broker-a.properties as 
/home/broker/data/conf/2m-2s-async/broker-a.properties in the  host.
-
-   Change file broker-a.properties and make the property 'brokerIP1' value as 
the dns-hostname(Precautions #3) of the host.
-
-3. Confirm the ROCKETMQ_VERSION (e.g. 4.5.0), start broker with shell script 
start-broker.sh through  the following command:
-
-   ```
-   sh start-broker.sh /home/broker/data 4.5.0 "ns1:9876;ns2:9876" 
conf/2m-2s-async/broker-a.properties
-   ```
-
-4. Check if the broker container is start up correctly (Note:The dir DATA_HOME 
in host needs to open read/write permissions  for the rocketmq user in the 
container, Precautions #1)
-
-5. Confirm the host machine where the broker-a slave is to be 
deployed,determine the directory (DATA_HOME) where the container persistences 
content (logs/storage) on the host, e.g. DATA_HOME is set as 
/home/broker/data/;  then you need to copy the reference config file 
conf/2m-2s-async/broker-a-s.properties as 
/home/broker/data/conf/2m-2s-async/broker-a-s.properties in the  host.
-
-   Change file broker-a-s.properties and the proeprty 'brokerIP1' valueas the 
dns-hostname of the host.
-
-6. Confirm the ROCKETMQ_VERSION,start slave broker with shell script 
start-broker.sh:
-
-   ```
-   sh start-broker.sh /home/broker/data 4.5.0 "ns1:9876;ns2:9876" 
conf/2m-2s-async/broker-a-s.properties
-   ```
-
-7. Check if the broker container is start up correctly.
-
-8. Repeat above steps to create master and slave broker docker conatiners.
-
-## Precautions
-
-1. Ensure the DATA_HOME directory r/w permissions
-
-   The broker container needs to write data that needs to be persisted in the 
DATA_HOME directory of the host, these data include operation logs and message 
storage files. It is required to open the permissions in the DATA_HOME 
directory to ensure that the relevant files can be written when the broker is 
started and running. 
-      A case: After starting the broker, the broker automatically quits after 
a period of time, without any log writes, this may be due to the container does 
not write DATA_HOME / logs directory permissions.
-
-2. Declare the external map port in the script (start-broker.sh, start-ns.sh)
-   The default mapping ports have been defined in the relevant script. If the 
user has special requirements (such as a port is already occupied by other 
applications), you need to modify the shell script to define a new port mapping.
-
-3. Recommended to use DNS to configure the broker and name-server address.
-
-   The broker running in the docker container uses the property brokerIP1 to 
specify the address of the host it is on, and register/publish this address in 
the NameServer so that the RocketMQ client can obtain externally available 
broker addresses through the NameServer. When specifying the brokerIP1 property 
value, a good practice is to use dns- Hostname (instead of the direct IP 
address), so that when a large-scale broker changes or ip address migration, it 
will not affect the deployed [...]
\ No newline at end of file
diff --git a/rocketmq-docker/product/conf/2m-2s-async/broker-a-s.properties 
b/rocketmq-docker/product/conf/2m-2s-async/broker-a-s.properties
deleted file mode 100644
index e5eef23..0000000
--- a/rocketmq-docker/product/conf/2m-2s-async/broker-a-s.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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.
-brokerClusterName=DefaultCluster
-brokerName=broker-a
-brokerId=1
-deleteWhen=04
-fileReservedTime=48
-brokerRole=SLAVE
-flushDiskType=ASYNC_FLUSH
-
-
-#Slave host dns-name/ip
-brokerIP1=REPLACE_IT 
-#with Master's BroperIP1
-brokerIP2=REPLACE_IT 
-
-#with Master's haListenPort, default 10912
-#haListenPort=10912 
diff --git a/rocketmq-docker/product/conf/2m-2s-async/broker-a.properties 
b/rocketmq-docker/product/conf/2m-2s-async/broker-a.properties
deleted file mode 100644
index 39dc5bf..0000000
--- a/rocketmq-docker/product/conf/2m-2s-async/broker-a.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-brokerClusterName=DefaultCluster
-brokerName=broker-a
-brokerId=0
-deleteWhen=04
-fileReservedTime=48
-brokerRole=ASYNC_MASTER
-flushDiskType=ASYNC_FLUSH
-
-# Host node's dns-name or ip
-brokerIP1=REPLACE_IT
-
-# Optional config different value rather than default ports.
-# Caution: changing default ports need to update port mapping setting (-p) in 
start-broker.sh
-#listenPort=10911
-#haListenPort=10912
\ No newline at end of file
diff --git a/rocketmq-docker/product/conf/2m-2s-async/broker-b-s.properties 
b/rocketmq-docker/product/conf/2m-2s-async/broker-b-s.properties
deleted file mode 100644
index 50fb0fb..0000000
--- a/rocketmq-docker/product/conf/2m-2s-async/broker-b-s.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-brokerClusterName=DefaultCluster
-brokerName=broker-b
-brokerId=1
-deleteWhen=04
-fileReservedTime=48
-brokerRole=SLAVE
-flushDiskType=ASYNC_FLUSH
-
-#Slave host dns-name/ip
-brokerIP1=REPLACE_IT 
-#with Master's BroperIP1
-brokerIP2=REPLACE_IT 
-
-# with Master's haListenPort, default 10912
-#haListenPort=10912 
\ No newline at end of file
diff --git a/rocketmq-docker/product/conf/2m-2s-async/broker-b.properties 
b/rocketmq-docker/product/conf/2m-2s-async/broker-b.properties
deleted file mode 100644
index c84cb76..0000000
--- a/rocketmq-docker/product/conf/2m-2s-async/broker-b.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-brokerClusterName=DefaultCluster
-brokerName=broker-b
-brokerId=0
-deleteWhen=04
-fileReservedTime=48
-brokerRole=ASYNC_MASTER
-flushDiskType=ASYNC_FLUSH
-
-# Host node's dns-name or ip
-brokerIP1=REPLACE_IT
-
-# Optional config different value rather than default ports.
-# Caution: changing default ports need to update port mapping setting (-p) in 
start-broker.sh
-#listenPort=10911
-#haListenPort=10912
\ No newline at end of file
diff --git a/rocketmq-docker/product/conf/2m-2s-sync/broker-a-s.properties 
b/rocketmq-docker/product/conf/2m-2s-sync/broker-a-s.properties
deleted file mode 100644
index 275f236..0000000
--- a/rocketmq-docker/product/conf/2m-2s-sync/broker-a-s.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-brokerClusterName=DefaultCluster
-brokerName=broker-a
-brokerId=1
-deleteWhen=04
-fileReservedTime=48
-brokerRole=SLAVE
-flushDiskType=ASYNC_FLUSH
-
-#Slave host dns-name/ip
-brokerIP1=REPLACE_IT 
-#with Master's BroperIP1
-brokerIP2=REPLACE_IT 
-
-#with Master's haListenPort, default 10912
-#haListenPort=10912 
\ No newline at end of file
diff --git a/rocketmq-docker/product/conf/2m-2s-sync/broker-a.properties 
b/rocketmq-docker/product/conf/2m-2s-sync/broker-a.properties
deleted file mode 100644
index acdc008..0000000
--- a/rocketmq-docker/product/conf/2m-2s-sync/broker-a.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-brokerClusterName=DefaultCluster
-brokerName=broker-a
-brokerId=0
-deleteWhen=04
-fileReservedTime=48
-brokerRole=SYNC_MASTER
-flushDiskType=ASYNC_FLUSH
-
-# Host node's dns-name or ip
-brokerIP1=REPLACE_IT
-
-# Optional config different value rather than default ports.
-# Caution: changing default ports need to update port mapping setting (-p) in 
start-broker.sh
-#listenPort=10911
-#haListenPort=10912
\ No newline at end of file
diff --git a/rocketmq-docker/product/conf/2m-2s-sync/broker-b-s.properties 
b/rocketmq-docker/product/conf/2m-2s-sync/broker-b-s.properties
deleted file mode 100644
index 50fb0fb..0000000
--- a/rocketmq-docker/product/conf/2m-2s-sync/broker-b-s.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-brokerClusterName=DefaultCluster
-brokerName=broker-b
-brokerId=1
-deleteWhen=04
-fileReservedTime=48
-brokerRole=SLAVE
-flushDiskType=ASYNC_FLUSH
-
-#Slave host dns-name/ip
-brokerIP1=REPLACE_IT 
-#with Master's BroperIP1
-brokerIP2=REPLACE_IT 
-
-# with Master's haListenPort, default 10912
-#haListenPort=10912 
\ No newline at end of file
diff --git a/rocketmq-docker/product/conf/2m-2s-sync/broker-b.properties 
b/rocketmq-docker/product/conf/2m-2s-sync/broker-b.properties
deleted file mode 100644
index 29c4a28..0000000
--- a/rocketmq-docker/product/conf/2m-2s-sync/broker-b.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-brokerClusterName=DefaultCluster
-brokerName=broker-b
-brokerId=0
-deleteWhen=04
-fileReservedTime=48
-brokerRole=SYNC_MASTER
-flushDiskType=ASYNC_FLUSH
-
-# Host node's dns-name or ip
-brokerIP1=REPLACE_IT
-
-# Optional config different value rather than default ports.
-# Caution: changing default ports need to update port mapping setting (-p) in 
start-broker.sh
-#listenPort=10911
-#haListenPort=10912
\ No newline at end of file
diff --git a/rocketmq-docker/product/conf/2m-noslave/broker-a.properties 
b/rocketmq-docker/product/conf/2m-noslave/broker-a.properties
deleted file mode 100644
index e1189b5..0000000
--- a/rocketmq-docker/product/conf/2m-noslave/broker-a.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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.
-brokerClusterName=DefaultCluster
-brokerName=broker-a
-brokerId=0
-deleteWhen=04
-fileReservedTime=48
-brokerRole=ASYNC_MASTER
-flushDiskType=ASYNC_FLUSH
-
-# Host node's dns-name or ip
-brokerIP1=REPLACE_IT
-
-# Optional config different value rather than default ports.
-# Caution: changing default ports need to update port mapping setting (-p) in 
start-broker.sh
-#listenPort=10911
\ No newline at end of file
diff --git a/rocketmq-docker/product/conf/2m-noslave/broker-b.properties 
b/rocketmq-docker/product/conf/2m-noslave/broker-b.properties
deleted file mode 100644
index c84cb76..0000000
--- a/rocketmq-docker/product/conf/2m-noslave/broker-b.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-brokerClusterName=DefaultCluster
-brokerName=broker-b
-brokerId=0
-deleteWhen=04
-fileReservedTime=48
-brokerRole=ASYNC_MASTER
-flushDiskType=ASYNC_FLUSH
-
-# Host node's dns-name or ip
-brokerIP1=REPLACE_IT
-
-# Optional config different value rather than default ports.
-# Caution: changing default ports need to update port mapping setting (-p) in 
start-broker.sh
-#listenPort=10911
-#haListenPort=10912
\ No newline at end of file
diff --git a/rocketmq-docker/product/conf/2m-noslave/broker-trace.properties 
b/rocketmq-docker/product/conf/2m-noslave/broker-trace.properties
deleted file mode 100644
index 966bb5f..0000000
--- a/rocketmq-docker/product/conf/2m-noslave/broker-trace.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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.
-#
-brokerClusterName=DefaultCluster
-brokerName=broker-trace
-brokerId=0
-deleteWhen=04
-fileReservedTime=48
-brokerRole=ASYNC_MASTER
-flushDiskType=ASYNC_FLUSH
-
-# Host node's dns-name or ip
-brokerIP1=REPLACE_IT
-
-# Optional config different value rather than default ports.
-# Caution: changing default ports need to update port mapping setting (-p) in 
start-broker.sh
-#listenPort=10911
\ No newline at end of file
diff --git a/rocketmq-docker/product/conf/broker.conf 
b/rocketmq-docker/product/conf/broker.conf
deleted file mode 100644
index 3a7676b..0000000
--- a/rocketmq-docker/product/conf/broker.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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.
-
-brokerClusterName = DefaultCluster
-brokerName = broker-b
-brokerId = 0
-deleteWhen = 04
-fileReservedTime = 48
-brokerRole = ASYNC_MASTER
-flushDiskType = ASYNC_FLUSH
-
-# Set self-defined brokerIP address (e.g. the host node's) 
-#brokerIP1=30.25.90.82
diff --git a/rocketmq-docker/product/start-broker.sh 
b/rocketmq-docker/product/start-broker.sh
deleted file mode 100644
index c7b4e93..0000000
--- a/rocketmq-docker/product/start-broker.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-## Main
-if [ $# -lt 4 ]; then
-    echo "Usage: sh $0 DATA_HOME ROCKETMQ_VERSION NAMESRV_ADDR CONF_FILE"
-    exit -1
-fi
-
-DATA_HOME=$1
-ROCKETMQ_VERSION=$2
-NAMESRV_ADDR=$3
-CONF_FILE=$4
-
-## Show Env Setting
-echo "ENV Setting: "
-echo "  DATA_HOME=${DATA_HOME} ROCKETMQ_VERSION=${ROCKETMQ_VERSION}"
-echo "  NAMESRV_ADDR=${NAMESRV_ADDR}"
-echo "  CONF_FILE=${CONF_FILE}" 
-
-## Check config file existing
-if [ ! -f "${DATA_HOME}/conf/${CONF_FILE}" ]; then
-    echo "You must ensure the broker config file 
[${DATA_HOME}/conf/${CONF_FILE}] is pre-defined!!!"
-    exit -1
-fi
-
-
-# Start Broker
-docker run -d  -v ${DATA_HOME}/logs:/home/rocketmq/logs -v 
${DATA_HOME}/store:/home/rocketmq/store \
-  -v ${DATA_HOME}/conf:/home/rocketmq/conf \
-  --name rmqbroker \
-  -e "NAMESRV_ADDR=${NAMESRV_ADDR}" \
-  -p 10911:10911 -p 10912:10912 -p 10909:10909 \
-  rocketmqinc/rocketmq:${ROCKETMQ_VERSION} \
-  sh mqbroker -c /home/rocketmq/conf/${CONF_FILE}
diff --git a/rocketmq-docker/product/start-ns.sh 
b/rocketmq-docker/product/start-ns.sh
deleted file mode 100644
index baa61f2..0000000
--- a/rocketmq-docker/product/start-ns.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-
-## Main
-if [ $# -lt 2 ]; then
-    echo "Usage: sh $0 DATA_HOME ROCKETMQ_VERSION"
-    exit -1
-fi
-
-DATA_HOME=$1
-ROCKETMQ_VERSION=$2
-
-## Show Env Setting
-echo "ENV Setting: "
-echo "DATA_HOME=${DATA_HOME} ROCKETMQ_VERSION=${ROCKETMQ_VERSION}"
-
-# Start nameserver
-docker run -d -v ${DATA_HOME}/logs:/home/rocketmq/logs \
-  --name rmqnamesrv \
-  -p 9876:9876 \
-  rocketmqinc/rocketmq:ROCKETMQ_VERSION \
-  sh mqnamesrv
\ No newline at end of file
diff --git a/rocketmq-docker/stage.sh b/rocketmq-docker/stage.sh
deleted file mode 100644
index dbf24f4..0000000
--- a/rocketmq-docker/stage.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-function checkVersion()        
-{
-    echo "Stage version = $1"
-       echo $1 |grep -E "^[0-9]+\.[0-9]+\.[0-9]+" > /dev/null
-    if [ $? = 0 ]; then
-        return 1
-    fi
-            
-       echo "Version $1 illegal, it should be X.X.X format(e.g. 4.5.0), please 
check released versions in 
'https://dist.apache.org/repos/dist/release/rocketmq/'"
-    return 0
-} 
-
-CURRENT_DIR="$(cd "$(dirname "$0")"; pwd)"
-
-[ ! -d "$STAGE_DIR" ] &&  STAGE_DIR=$CURRENT_DIR/stages
-mkdir -p $STAGE_DIR
-
-if [ $# -lt 1 ]; then
-    echo "Usage: sh $0 version"
-    exit -1
-fi
-
-version=$1
-checkVersion $version
-if [ $? = 0 ]; then
-       exit -1
-fi
-
-echo "mkdir $STAGE_DIR/$version"
-mkdir -p "$STAGE_DIR/$version"
-
-cp -rf "$CURRENT_DIR/templates/" "$STAGE_DIR/$version"
-
-echo "staged templates into folder $STAGE_DIR/$version"
-
-# Stage the real version
-# todo fix on linux (sed)
-#find "$STAGE_DIR/$version" -type f -exec sed -i "" 
"s/ROCKETMQ_VERSION/${version}/g" {} \;
-find "$STAGE_DIR/$version" -type f | xargs perl -pi -e 
"s/ROCKETMQ_VERSION/${version}/g"
-
-cd $STAGE_DIR
diff --git a/rocketmq-docker/templates/data/broker/conf/broker.conf 
b/rocketmq-docker/templates/data/broker/conf/broker.conf
deleted file mode 100644
index e460e54..0000000
--- a/rocketmq-docker/templates/data/broker/conf/broker.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-brokerClusterName = DefaultCluster
-brokerName = broker-abc
-brokerId = 0
-deleteWhen = 04
-fileReservedTime = 48
-brokerRole = ASYNC_MASTER
-flushDiskType = ASYNC_FLUSH
-brokerIP1 = 30.25.90.30
diff --git a/rocketmq-docker/templates/data/broker/conf/broker1.conf 
b/rocketmq-docker/templates/data/broker/conf/broker1.conf
deleted file mode 100644
index 7233af9..0000000
--- a/rocketmq-docker/templates/data/broker/conf/broker1.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-brokerClusterName = DefaultCluster
-brokerName = broker-abc1
-brokerId = 1
-deleteWhen = 04
-fileReservedTime = 48
-brokerRole = ASYNC_MASTER
-flushDiskType = ASYNC_FLUSH
-brokerIP1 = m30
-listenPort = 10921
diff --git a/rocketmq-docker/templates/data/broker0/conf/dledger/broker.conf 
b/rocketmq-docker/templates/data/broker0/conf/dledger/broker.conf
deleted file mode 100644
index 7b21174..0000000
--- a/rocketmq-docker/templates/data/broker0/conf/dledger/broker.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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.
-
-brokerClusterName = RaftCluster
-brokerName=RaftNode00
-listenPort=30911
-#namesrvAddr=127.0.0.1:9876
-storePathRootDir=/tmp/rmqstore/node00
-storePathCommitLog=/tmp/rmqstore/node00/commitlog
-enableDLegerCommitLog=true
-dLegerGroup=RaftNode00
-dLegerPeers=n0-172.18.0.12:40911;n1-172.18.0.13:40912;n2-172.18.0.14:40913
-## must be unique
-dLegerSelfId=n0
-sendMessageThreadPoolNums=16
diff --git a/rocketmq-docker/templates/data/broker1/conf/dledger/broker.conf 
b/rocketmq-docker/templates/data/broker1/conf/dledger/broker.conf
deleted file mode 100644
index 8b32bb2..0000000
--- a/rocketmq-docker/templates/data/broker1/conf/dledger/broker.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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.
-
-brokerClusterName = RaftCluster
-brokerName=RaftNode01
-listenPort=30911
-#namesrvAddr=127.0.0.1:9876
-storePathRootDir=/tmp/rmqstore/node00
-storePathCommitLog=/tmp/rmqstore/node00/commitlog
-enableDLegerCommitLog=true
-dLegerGroup=RaftNode00
-dLegerPeers=n0-172.18.0.12:40911;n1-172.18.0.13:40912;n2-172.18.0.14:40913
-## must be unique
-dLegerSelfId=n1
-sendMessageThreadPoolNums=16
diff --git a/rocketmq-docker/templates/data/broker2/conf/dledger/broker.conf 
b/rocketmq-docker/templates/data/broker2/conf/dledger/broker.conf
deleted file mode 100644
index 6fec70e..0000000
--- a/rocketmq-docker/templates/data/broker2/conf/dledger/broker.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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.
-
-brokerClusterName = RaftCluster
-brokerName=RaftNode02
-listenPort=30911
-#namesrvAddr=127.0.0.1:9876
-storePathRootDir=/tmp/rmqstore/node00
-storePathCommitLog=/tmp/rmqstore/node00/commitlog
-enableDLegerCommitLog=true
-dLegerGroup=RaftNode00
-dLegerPeers=n0-172.18.0.12:40911;n1-172.18.0.13:40912;n2-172.18.0.14:40913
-## must be unique
-dLegerSelfId=n2
-sendMessageThreadPoolNums=16
diff --git 
a/rocketmq-docker/templates/docker-compose/data/broker/conf/broker.conf 
b/rocketmq-docker/templates/docker-compose/data/broker/conf/broker.conf
deleted file mode 100644
index a8f04e2..0000000
--- a/rocketmq-docker/templates/docker-compose/data/broker/conf/broker.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-brokerClusterName = DefaultCluster
-brokerName = broker-a
-brokerId = 0
-deleteWhen = 04
-fileReservedTime = 48
-brokerRole = ASYNC_MASTER
-flushDiskType = ASYNC_FLUSH
diff --git 
a/rocketmq-docker/templates/docker-compose/data1/broker/conf/broker.conf 
b/rocketmq-docker/templates/docker-compose/data1/broker/conf/broker.conf
deleted file mode 100644
index acf84fb..0000000
--- a/rocketmq-docker/templates/docker-compose/data1/broker/conf/broker.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-brokerClusterName = DefaultCluster
-brokerName = broker-b
-brokerId = 1
-deleteWhen = 04
-fileReservedTime = 48
-brokerRole = ASYNC_MASTER
-flushDiskType = ASYNC_FLUSH
diff --git a/rocketmq-docker/templates/docker-compose/docker-compose.yml 
b/rocketmq-docker/templates/docker-compose/docker-compose.yml
deleted file mode 100644
index 64271b9..0000000
--- a/rocketmq-docker/templates/docker-compose/docker-compose.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-version: '2'
-services:
-  #Service for nameserver
-  namesrv:
-    image: rocketmqinc/rocketmq:ROCKETMQ_VERSION
-    container_name: rmqnamesrv
-    ports:
-      - 9876:9876
-    volumes:
-      - ./data/namesrv/logs:/home/rocketmq/logs
-      - ./data/namesrv/store:/home/rocketmq/store
-    command: sh mqnamesrv
-
-  #Service for broker
-  broker:
-    image: rocketmqinc/rocketmq:ROCKETMQ_VERSION
-    container_name: rmqbroker
-    links:
-      - namesrv
-    ports:
-      - 10909:10909
-      - 10911:10911 
-    environment:
-      - NAMESRV_ADDR=namesrv:9876
-    volumes:
-      - ./data/broker/logs:/home/rocketmq/logs
-      - ./data/broker/store:/home/rocketmq/store
-      - 
./data/broker/conf/broker.conf:/opt/rocketmq-ROCKETMQ_VERSION/conf/broker.conf
-    command: sh mqbroker -c ../conf/broker.conf
-
-  #Service for another broker -- broker1
-  broker1:
-    image: rocketmqinc/rocketmq:ROCKETMQ_VERSION
-    container_name: rmqbroker1
-    links:
-      - namesrv
-    ports:
-      - 10929:10909
-      - 10931:10911 
-    environment:
-      - NAMESRV_ADDR=namesrv:9876
-    volumes:
-      - ./data1/broker/logs:/home/rocketmq/logs
-      - ./data1/broker/store:/home/rocketmq/store
-      - 
./data1/broker/conf/broker.conf:/opt/rocketmq-ROCKETMQ_VERSION/conf/broker.conf
-    command: sh mqbroker -c ../conf/broker.conf
diff --git a/rocketmq-docker/templates/kubernetes/deployment.yaml 
b/rocketmq-docker/templates/kubernetes/deployment.yaml
deleted file mode 100644
index a71e8b1..0000000
--- a/rocketmq-docker/templates/kubernetes/deployment.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: rocketmq
-spec:
-  replicas: 1
-  template:
-    metadata:
-     labels:
-       app: rocketmq
-    spec:
-      containers:
-      - name: broker
-        image: rocketmqinc/rocketmq:ROCKETMQ_VERSION
-        command: ["sh","mqbroker", "-n","localhost:9876"]
-        imagePullPolicy: IfNotPresent
-        ports:
-          - containerPort: 10909
-          - containerPort: 10911
-        volumeMounts:
-          - mountPath: /home/rocketmq/logs
-            name: brokeroptlogs
-          - mountPath: /home/rocketmq/store
-            name: brokeroptstore
-      - name: namesrv
-        image: rocketmqinc/rocketmq:ROCKETMQ_VERSION
-        command: ["sh","mqnamesrv"]
-        imagePullPolicy: IfNotPresent
-        ports:
-          - containerPort: 9876
-        volumeMounts:
-          - mountPath: /home/rocketmq/logs
-            name: namesrvoptlogs
-          - mountPath: /home/rocketmq/store
-            name: namesrvoptstore
-      volumes:
-      - name: brokeroptlogs
-        hostPath:
-          path: /data/broker/logs
-      - name: brokeroptstore
-        hostPath:
-          path: /data/broker/store
-      - name: namesrvoptlogs
-        hostPath:
-          path: /data/namesrv/logs
-      - name: namesrvoptstore
-        hostPath:
-          path: /data/namesrv/store
diff --git a/rocketmq-docker/templates/kubernetes/deployment2.yaml 
b/rocketmq-docker/templates/kubernetes/deployment2.yaml
deleted file mode 100644
index fa5db99..0000000
--- a/rocketmq-docker/templates/kubernetes/deployment2.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
-kind: Deployment
-apiVersion: extensions/v1beta1
-metadata:
-  name: rocketmq-ns-deployment
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: rocketmq-nameserver
-      name: rocketmq-nameserver
-  template:
-    metadata:
-     labels:
-      app: rocketmq-nameserver
-      name: rocketmq-nameserver
-    spec:
-      containers:
-      - name: rocketmq-nameserver
-        image: rocketmqinc/rocketmq:ROCKETMQ_VERSION
-        command: ["sh","mqnamesrv"]
-        imagePullPolicy: IfNotPresent
-        ports:
-          - containerPort: 9876
-        volumeMounts:
-          - mountPath: /home/rocketmq/logs
-            name: namesrvlogs
-          - mountPath: /home/rocketmq/store
-            name: namesrvstore
-      volumes:
-      - name: namesrvlogs
-        emptyDir: {}
-      - name: namesrvstore 
-        emptyDir: {}
----          
-kind: Deployment
-apiVersion: extensions/v1beta1
-metadata:
-  name: rocketmq-broker-deployment
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: rocketmq-broker
-      name: rocketmq-broker
-  template:
-    metadata:
-     labels:
-      app: rocketmq-broker
-      name: rocketmq-broker
-    spec:
-      containers:
-      - name: rocketmq-broker
-        image: rocketmqinc/rocketmq:ROCKETMQ_VERSION
-        command: ["sh","mqbroker", "-n","rocketmq-ns-deployment:9876"]
-        imagePullPolicy: IfNotPresent
-        ports:
-          - containerPort: 10909
-          - containerPort: 10911
-        volumeMounts:
-          - mountPath: /home/rocketmq/logs
-            name: brokerlogs
-          - mountPath: /home/rocketmq/store
-            name: brokerstore
-      volumes:
-      - name: brokerlogs
-        emptyDir: {}
-      - name: brokerstore
-        emptyDir: {}
-
-
diff --git a/rocketmq-docker/templates/play-consumer.sh 
b/rocketmq-docker/templates/play-consumer.sh
deleted file mode 100755
index 5f9f6e3..0000000
--- a/rocketmq-docker/templates/play-consumer.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-# Consume messages
-docker exec -ti rmqbroker sh ./tools.sh 
org.apache.rocketmq.example.quickstart.Consumer
\ No newline at end of file
diff --git a/rocketmq-docker/templates/play-docker-compose.sh 
b/rocketmq-docker/templates/play-docker-compose.sh
deleted file mode 100755
index f1b5c3a..0000000
--- a/rocketmq-docker/templates/play-docker-compose.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-RMQ_CONTAINER=$(docker ps -a|awk '/rmq/ {print $1}')
-if [[ -n "$RMQ_CONTAINER" ]]; then
-   echo "Removing RocketMQ Container..."
-   docker rm -fv $RMQ_CONTAINER
-   # Wait till the existing containers are removed
-   sleep 5
-fi
-
-if [ ! -d "`pwd`/data" ]; then
-  mkdir -p "data"
-fi
-
-# Run namesrv and broker
-docker-compose -f ./docker-compose/docker-compose.yml up -d
diff --git a/rocketmq-docker/templates/play-docker-deledger.sh 
b/rocketmq-docker/templates/play-docker-deledger.sh
deleted file mode 100755
index 4be6521..0000000
--- a/rocketmq-docker/templates/play-docker-deledger.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-RMQ_CONTAINER=$(docker ps -a|awk '/rmq/ {print $1}')
-if [[ -n "$RMQ_CONTAINER" ]]; then
-   echo "Removing RocketMQ Container..."
-   docker rm -fv $RMQ_CONTAINER
-   # Wait till the existing containers are removed
-   sleep 5
-fi
-
-DLEDGER_NET=$(docker network ls |awk '/dledger-br/ {print $1}')
-if [[ -n "$DLEDGER_NET" ]]; then
-   echo "Removing DLedger Bridge network..."
-   docker network rm $DLEDGER_NET
-   # Wait till the existing networks are removed
-   sleep 5
-fi
-
-if [ ! -d "`pwd`/data" ]; then
-  mkdir -p "data"
-fi
-
-echo "Starting RocketMQ nodes..."
-
-# Create network
-docker network create --subnet=172.18.0.0/16 dledger-br
-
-# Start nameserver
-docker run --net dledger-br --ip 172.18.0.11  -d -p 9876:9876 -v 
`pwd`/data/namesrv/logs:/home/rocketmq/logs -v 
`pwd`/data/namesrv/store:/home/rocketmq/store --name rmqnamesrv  
rocketmqinc/rocketmq:ROCKETMQ_VERSION sh mqnamesrv
-
-# Start Brokers
-docker run --net dledger-br --ip 172.18.0.12 -d -p 30911:30911 -p 30909:30909 
-v `pwd`/data/broker0/logs:/home/rocketmq/logs -v 
`pwd`/data/broker0/store:/home/rocketmq/store -v 
`pwd`/data/broker0/conf/dledger:/opt/rocketmq-ROCKETMQ_VERSION/conf/dledger 
--name rmqbroker --link rmqnamesrv:namesrv -e "MAX_POSSIBLE_HEAP=200000000" -e 
"NAMESRV_ADDR=namesrv:9876" rocketmqinc/rocketmq:ROCKETMQ_VERSION sh mqbroker  
-c  ../conf/dledger/broker.conf
-docker run --net dledger-br --ip 172.18.0.13 -d -p 30921:30921 -p 30919:30919 
-v `pwd`/data/broker1/logs:/home/rocketmq/logs -v 
`pwd`/data/broker1/store:/home/rocketmq/store -v 
`pwd`/data/broker1/conf/dledger:/opt/rocketmq-ROCKETMQ_VERSION/conf/dledger 
--name rmqbroker1 --link rmqnamesrv:namesrv -e "MAX_POSSIBLE_HEAP=200000000" -e 
"NAMESRV_ADDR=namesrv:9876" rocketmqinc/rocketmq:ROCKETMQ_VERSION sh mqbroker  
-c  ../conf/dledger/broker.conf
-docker run --net dledger-br --ip 172.18.0.14 -d -p 30931:30931 -p 30929:30929 
-v `pwd`/data/broker2/logs:/home/rocketmq/logs -v 
`pwd`/data/broker2/store:/home/rocketmq/store -v 
`pwd`/data/broker2/conf/dledger:/opt/rocketmq-ROCKETMQ_VERSION/conf/dledger 
--name rmqbroker2 --link rmqnamesrv:namesrv -e "MAX_POSSIBLE_HEAP=200000000" -e 
"NAMESRV_ADDR=namesrv:9876" rocketmqinc/rocketmq:ROCKETMQ_VERSION sh mqbroker  
-c  ../conf/dledger/broker.conf
-
-# Servive unavailable when not ready
-# sleep 20
-
-# Produce messages
-# sh ./play-producer.sh
diff --git a/rocketmq-docker/templates/play-docker.sh 
b/rocketmq-docker/templates/play-docker.sh
deleted file mode 100755
index dd2e7fd..0000000
--- a/rocketmq-docker/templates/play-docker.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-RMQ_CONTAINER=$(docker ps -a|awk '/rmq/ {print $1}')
-if [[ -n "$RMQ_CONTAINER" ]]; then
-   echo "Removing RocketMQ Container..."
-   docker rm -fv $RMQ_CONTAINER
-   # Wait till the existing containers are removed
-   sleep 5
-fi
-
-if [ ! -d "`pwd`/data" ]; then
-  mkdir -p "data"
-fi
-
-echo "Starting RocketMQ nodes..."
-
-# Start nameserver
-# Start nameserver
-docker run -d -v `pwd`/data/namesrv/logs:/home/rocketmq/logs -v 
`pwd`/data/namesrv/store:/home/rocketmq/store --name rmqnamesrv 
rocketmqinc/rocketmq:ROCKETMQ_VERSION sh mqnamesrv
-
-# Start Broker
-docker run -d  -v `pwd`/data/broker/logs:/home/rocketmq/logs -v 
`pwd`/data/broker/store:/home/rocketmq/store --name rmqbroker --link 
rmqnamesrv:namesrv -e "NAMESRV_ADDR=namesrv:9876" 
rocketmqinc/rocketmq:ROCKETMQ_VERSION sh mqbroker
-
-# Servive unavailable when not ready
-# sleep 20
-
-# Produce messages
-# sh ./play-producer.sh
diff --git a/rocketmq-docker/templates/play-kubernetes.sh 
b/rocketmq-docker/templates/play-kubernetes.sh
deleted file mode 100755
index 6ddd5d5..0000000
--- a/rocketmq-docker/templates/play-kubernetes.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-if [ ! -d "`pwd`/data" ]; then
-  mkdir -p "data"
-fi
-
-# Run nameserver and broker on your Kubernetes cluster
-kubectl apply -f kubernetes/deployment.yaml
diff --git a/rocketmq-docker/templates/play-producer.sh 
b/rocketmq-docker/templates/play-producer.sh
deleted file mode 100755
index 657195c..0000000
--- a/rocketmq-docker/templates/play-producer.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-# Produce messages
-docker exec -ti rmqbroker sh ./tools.sh 
org.apache.rocketmq.example.quickstart.Producer
\ No newline at end of file
diff --git a/rocketmq-docker/templates/scripts/runbroker-customize.sh 
b/rocketmq-docker/templates/scripts/runbroker-customize.sh
deleted file mode 100755
index 7c625cf..0000000
--- a/rocketmq-docker/templates/scripts/runbroker-customize.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-#===========================================================================================
-# Java Environment Setting
-#===========================================================================================
-error_exit ()
-{
-    echo "ERROR: $1 !!"
-    exit 1
-}
-
-[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
-[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
-[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME 
variable in your environment, We need java(x64)!"
-
-export JAVA_HOME
-export JAVA="$JAVA_HOME/bin/java"
-export BASE_DIR=$(dirname $0)/..
-export CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH}
-
-#===========================================================================================
-# JVM Configuration
-#===========================================================================================
-# Get the max heap used by a jvm, which used all the ram available to the 
container.
-if [ -z "$MAX_POSSIBLE_HEAP" ]
-then
-       MAX_POSSIBLE_RAM_STR=$(java -XX:+UnlockExperimentalVMOptions 
-XX:MaxRAMFraction=1 -XshowSettings:vm -version |& awk '/Max\. Heap Size 
\(Estimated\): [0-9KMG]+/{ print $5}')
-       MAX_POSSIBLE_RAM=$MAX_POSSIBLE_RAM_STR
-       CAL_UNIT=${MAX_POSSIBLE_RAM_STR: -1}
-       if [ "$CAL_UNIT" == "G" -o "$CAL_UNIT" == "g" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024 \* 1024 \* 
1024` | awk '{printf "%d",$1*$2}')
-       elif [ "$CAL_UNIT" == "M" -o "$CAL_UNIT" == "m" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024 \* 1024` | 
awk '{printf "%d",$1*$2}')
-       elif [ "$CAL_UNIT" == "K" -o "$CAL_UNIT" == "k" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024` | awk 
'{printf "%d",$1*$2}')
-       fi
-       MAX_POSSIBLE_HEAP=$[MAX_POSSIBLE_RAM/4]
-fi
-
-# Dynamically calculate parameters, for reference.
-Xms=$MAX_POSSIBLE_HEAP
-Xmx=$MAX_POSSIBLE_HEAP
-Xmn=$[MAX_POSSIBLE_HEAP/2]
-MaxDirectMemorySize=$MAX_POSSIBLE_HEAP
-# Set for `JAVA_OPT`.
-JAVA_OPT="${JAVA_OPT} -server -Xms${Xms} -Xmx${Xmx} -Xmn${Xmn}"
-JAVA_OPT="${JAVA_OPT} -XX:+UseG1GC -XX:G1HeapRegionSize=16m 
-XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 
-XX:SoftRefLRUPolicyMSPerMB=0 -XX:SurvivorRatio=8"
-JAVA_OPT="${JAVA_OPT} -verbose:gc -Xloggc:/dev/shm/mq_gc_%p.log 
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime 
-XX:+PrintAdaptiveSizePolicy"
-JAVA_OPT="${JAVA_OPT} -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 
-XX:GCLogFileSize=30m"
-JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow"
-JAVA_OPT="${JAVA_OPT} -XX:+AlwaysPreTouch"
-JAVA_OPT="${JAVA_OPT} -XX:MaxDirectMemorySize=${MaxDirectMemorySize}"
-JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages -XX:-UseBiasedLocking"
-JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${BASE_DIR}/lib"
-#JAVA_OPT="${JAVA_OPT} -Xdebug 
-Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
-JAVA_OPT="${JAVA_OPT} ${JAVA_OPT_EXT}"
-JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"
-
-numactl --interleave=all pwd > /dev/null 2>&1
-if [ $? -eq 0 ]
-then
-       if [ -z "$RMQ_NUMA_NODE" ] ; then
-               numactl --interleave=all $JAVA ${JAVA_OPT} $@
-       else
-               numactl --cpunodebind=$RMQ_NUMA_NODE --membind=$RMQ_NUMA_NODE 
$JAVA ${JAVA_OPT} $@
-       fi
-else
-       $JAVA ${JAVA_OPT} $@
-fi
diff --git a/rocketmq-docker/templates/scripts/runserver-customize.sh 
b/rocketmq-docker/templates/scripts/runserver-customize.sh
deleted file mode 100755
index 4cefb00..0000000
--- a/rocketmq-docker/templates/scripts/runserver-customize.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-#===========================================================================================
-# Java Environment Setting
-#===========================================================================================
-error_exit ()
-{
-    echo "ERROR: $1 !!"
-    exit 1
-}
-
-[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
-[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
-[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME 
variable in your environment, We need java(x64)!"
-
-export JAVA_HOME
-export JAVA="$JAVA_HOME/bin/java"
-export BASE_DIR=$(dirname $0)/..
-export CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH}
-
-#===========================================================================================
-# JVM Configuration
-#===========================================================================================
-# Get the max heap used by a jvm, which used all the ram available to the 
container.
-if [ -z "$MAX_POSSIBLE_HEAP" ]
-then
-       MAX_POSSIBLE_RAM_STR=$(java -XX:+UnlockExperimentalVMOptions 
-XX:MaxRAMFraction=1 -XshowSettings:vm -version |& awk '/Max\. Heap Size 
\(Estimated\): [0-9KMG]+/{ print $5}')
-       MAX_POSSIBLE_RAM=$MAX_POSSIBLE_RAM_STR
-       CAL_UNIT=${MAX_POSSIBLE_RAM_STR: -1}
-       if [ "$CAL_UNIT" == "G" -o "$CAL_UNIT" == "g" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024 \* 1024 \* 
1024` | awk '{printf "%d",$1*$2}')
-       elif [ "$CAL_UNIT" == "M" -o "$CAL_UNIT" == "m" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024 \* 1024` | 
awk '{printf "%d",$1*$2}')
-       elif [ "$CAL_UNIT" == "K" -o "$CAL_UNIT" == "k" ]; then
-               MAX_POSSIBLE_RAM=$(echo 
${MAX_POSSIBLE_RAM_STR:0:${#MAX_POSSIBLE_RAM_STR}-1} `expr 1 \* 1024` | awk 
'{printf "%d",$1*$2}')
-       fi
-       MAX_POSSIBLE_HEAP=$[MAX_POSSIBLE_RAM/4]
-fi
-
-# Dynamically calculate parameters, for reference.
-Xms=$MAX_POSSIBLE_HEAP
-Xmx=$MAX_POSSIBLE_HEAP
-Xmn=$[MAX_POSSIBLE_HEAP/2]
-# Set for `JAVA_OPT`.
-JAVA_OPT="${JAVA_OPT} -server -Xms${Xms} -Xmx${Xmx} -Xmn${Xmn}"
-JAVA_OPT="${JAVA_OPT} -XX:+UseConcMarkSweepGC 
-XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 
-XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 
-XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8  -XX:-UseParNewGC"
-JAVA_OPT="${JAVA_OPT} -verbose:gc -Xloggc:/dev/shm/rmq_srv_gc.log 
-XX:+PrintGCDetails"
-JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow"
-JAVA_OPT="${JAVA_OPT}  -XX:-UseLargePages"
-JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${BASE_DIR}/lib"
-#JAVA_OPT="${JAVA_OPT} -Xdebug 
-Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
-JAVA_OPT="${JAVA_OPT} ${JAVA_OPT_EXT}"
-JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"
-
-$JAVA ${JAVA_OPT} $@

Reply via email to