Skip to content

Commit 1c87474

Browse files
caijieming-baidubluebore
authored andcommitted
Modified docker deploy's doc into en (#1091)
1 parent e35910f commit 1c87474

File tree

2 files changed

+155
-45
lines changed

2 files changed

+155
-45
lines changed

example/docker/README.md

Lines changed: 77 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,82 @@
1-
Docker部署Tera
1+
Use Docker to deploy Tera
22
===============
3-
##第一章 准备
4-
###Dokcer篇
5-
* 安装Docker
6-
请参见https://docs.docker.com/ 。Ubuntu下Docker安装命令为:
3+
##Prerequisites
4+
###Install Docker
5+
* For docker installation, please refer to [Docker](https://docs.docker.com/). Ubuntu's Docker installation:
76

87
```
98
wget -qO- https://get.docker.com/ | sh
109
```
1110

12-
* 为Docker添加Non-root权限
11+
* Manage Docker as a non-root user
12+
13+
To create the docker group and add your user:
14+
15+
1. Log into Ubuntu as a user with sudo privileges.
16+
2. Create the docker group. bash $ sudo groupadd docker
17+
3. Add your user to the docker group.
18+
19+
```$ sudo usermod -aG docker $USER```
20+
21+
4. Log out and log back in so that your group membership is re-evaluated.
22+
23+
24+
###Enable Password-less SSH
25+
* Generate the SSH keys: ssh-keygen -t rsa
26+
27+
Generating public/private key pair.
28+
Enter file in which to save the key (/xxx/.ssh/id_rsa):
29+
Enter passphrase (empty for no passphrase):
30+
Enter same passphrase again:
31+
Your identification has been saved in /xxx/.ssh/id_rsa.
32+
Your public key has been saved in /xxx/.ssh/id_rsa.pub.
33+
34+
* Copy the key to each Node:
35+
36+
ssh-copy-id {username}@node1
37+
ssh-copy-id {username}@node2
38+
ssh-copy-id {username}@node3
39+
40+
###Install Python and Tera Image
41+
* Use exsample/docker/install.sh to install python package and download Tera docker image. For example:
42+
43+
```
44+
//Cluster has 3 nodes:
45+
// deplying node is 192.168.100.2;
46+
// other two slave node is 192.168.100.3 and 192.168.100.4
47+
//
48+
// exec installation like (no need to setup installation in deplying node):
49+
sh install.sh 192.168.100.3 192.168.100.4
50+
```
1351

14-
执行sudo usermod -aG docker $USER,登出再登进
1552

16-
###机器篇
17-
* 配置集群间免密码ssh登陆
53+
##Running
54+
###Configuration
1855

19-
###Python和Docker镜像篇
20-
* 安装Python包并下载Tera镜像
2156

22-
执行exsample/docker/install.sh脚本。参数为集群中除本机外的ip地址。例如,集群中有三台主机:192.168.100.2,192.168.100.3,192.168.100.4,当前登录192.168.100.2,则安装命令为:
23-
57+
* Use example/docker/conf as a template to configure your Tera cluster, for example:
58+
2459
```
25-
./install.sh 192.168.100.3 192.168.100.4
60+
ip : ip address, use the colon as a separator
61+
hdfs :configure the number of hdfs's datanode
62+
zk :configure the number of zookeeper's node
63+
tera :configure the number of Tera's tablet servers
64+
log_prefix:log file's dir ($HOME by default)
65+
66+
conf template:
67+
{
68+
"ip":"192.168.100.2:192.168.100.3:192.168.100.4",
69+
"hdfs":3,
70+
"zk":3,
71+
"tera":3
72+
}
2673
```
2774

75+
###Execution
2876

29-
##第二章 奔跑
30-
31-
###执行篇
32-
33-
* 一键启动
77+
* Fast startup
3478

35-
直接执行/example/docker/cluster_setup.py会自动搭建一个本地Tera集群。配置如下
79+
use /example/docker/cluster_setup.py, it will create a Tera cluster automatically
3680

3781
```
3882
hdfs:namenode*1,datanode*1
@@ -41,38 +85,26 @@ Docker部署Tera
4185
log: $HOME
4286
```
4387

44-
* 启动自定义Tera集群
88+
* Self-configure Tera cluster
4589

46-
cluster_setup.py脚本默认启动zk,hdfs和Tera,可通过参数选择启动某一或两项
90+
cluster_setup.py will start zk, hdfs and tera together by default; User can use flags to setup one or more cluster respectively
4791

4892

49-
--help: 显示帮助
50-
--conf: 配置文件路径(配置文件说明见配置篇)
51-
--docker:Tera的docker镜像ID
52-
--zk: 启动zookeeper集群
53-
--hdfs: 启动hdfs集群
54-
--tera: 启动tera集群
93+
--help: show help manual
94+
--conf: cluster's configuration information, see below
95+
--docker:Tera's docker image ID
96+
--zk: startup zookeeper cluster
97+
--hdfs: startup hdfs cluster
98+
--tera: startup tera cluster
5599

56100
57-
例如
101+
for example
58102

59103
```
60-
python cluster_setup.py --conf my_config --docker abc // 使用镜像abc启动配置为my_config的Tera集群
104+
// use TeraImage and my_config file to startup Tera cluster
105+
python cluster_setup.py --conf my_config --docker TeraImage
61106
62-
python cluster_setup.py --zk --hdfs // 启动单机版zk和hdfs
107+
// startup zk and hdfs
108+
python cluster_setup.py --zk --hdfs
63109
```
64110

65-
###配置篇
66-
67-
68-
* 修改example/docker目录下conf中的配置自定义Tera集群,其中:
69-
70-
```
71-
ip :集群ip地址,用冒号分隔
72-
hdfs :hdfs集群中datanode的个数
73-
zk :Zookeeper集群中zk个数
74-
tera :Tera集群中tablenode个数
75-
log_prefix:log目录(默认为$HOME)
76-
77-
例如 {"ip":"192.168.100.2:192.168.100.3:192.168.100.4", "hdfs":3, "zk":3, "tera":3}
78-
```

example/docker/readme-cn.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Docker部署Tera
2+
===============
3+
##第一章 准备
4+
###Dokcer篇
5+
* 安装Docker
6+
请参见https://docs.docker.com/ 。Ubuntu下Docker安装命令为:
7+
8+
```
9+
wget -qO- https://get.docker.com/ | sh
10+
```
11+
12+
* 为Docker添加Non-root权限
13+
14+
执行sudo usermod -aG docker $USER,登出再登进
15+
16+
###机器篇
17+
* 配置集群间免密码ssh登陆
18+
19+
###Python和Docker镜像篇
20+
* 安装Python包并下载Tera镜像
21+
22+
执行exsample/docker/install.sh脚本。参数为集群中除本机外的ip地址。例如,集群中有三台主机:192.168.100.2,192.168.100.3,192.168.100.4,当前登录192.168.100.2,则安装命令为:
23+
24+
```
25+
./install.sh 192.168.100.3 192.168.100.4
26+
```
27+
28+
29+
##第二章 奔跑
30+
31+
###执行篇
32+
33+
* 一键启动
34+
35+
直接执行/example/docker/cluster_setup.py会自动搭建一个本地Tera集群。配置如下:
36+
37+
```
38+
hdfs:namenode*1,datanode*1
39+
zk: standalone
40+
tera:master*1, tabletnode*1
41+
log: $HOME
42+
```
43+
44+
* 启动自定义Tera集群
45+
46+
cluster_setup.py脚本默认启动zk,hdfs和Tera,可通过参数选择启动某一或两项。
47+
48+
49+
--help: 显示帮助
50+
--conf: 配置文件路径(配置文件说明见配置篇)
51+
--docker:Tera的docker镜像ID
52+
--zk: 启动zookeeper集群
53+
--hdfs: 启动hdfs集群
54+
--tera: 启动tera集群
55+
56+
57+
例如:
58+
59+
```
60+
python cluster_setup.py --conf my_config --docker abc // 使用镜像abc启动配置为my_config的Tera集群
61+
62+
python cluster_setup.py --zk --hdfs // 启动单机版zk和hdfs
63+
```
64+
65+
###配置篇
66+
67+
68+
* 修改example/docker目录下conf中的配置自定义Tera集群,其中:
69+
70+
```
71+
ip :集群ip地址,用冒号分隔
72+
hdfs :hdfs集群中datanode的个数
73+
zk :Zookeeper集群中zk个数
74+
tera :Tera集群中tablenode个数
75+
log_prefix:log目录(默认为$HOME)
76+
77+
例如 {"ip":"192.168.100.2:192.168.100.3:192.168.100.4", "hdfs":3, "zk":3, "tera":3}
78+
```

0 commit comments

Comments
 (0)