add pfsserver dockerfile#148
Conversation
go/README_CN.md
Outdated
| @@ -0,0 +1,20 @@ | |||
| 1. 如何创建pfsserver的DockerImage | |||
There was a problem hiding this comment.
pfsserver => PFSServer ?
go/README_CN.md
Outdated
| @@ -0,0 +1,20 @@ | |||
| 1. 如何创建pfsserver的DockerImage | |||
| - 创建pfsserver的编译环境 | |||
There was a problem hiding this comment.
创建pfsserver的编译环境
==>
构建PFSServer的开发环境镜像
go/README_CN.md
Outdated
| docker run --rm -v $(pwd):/root/gopath/src/github.com/PaddlePaddle/cloud/go pfsserver:dev | ||
| ``` | ||
|
|
||
| - 创建pfsserver的DockerImage |
There was a problem hiding this comment.
创建pfsserver的DockerImage
=>
构建PFSServer的生产环境镜像
| @@ -0,0 +1,5 @@ | |||
| FROM ubuntu:16.04 | |||
There was a problem hiding this comment.
This Dockerfile is used for PFSServer, so we can move this to ./cmd/pfsserver ?
There was a problem hiding this comment.
目前还不行,依赖了./tools/gen_config.sh,用来生成配置文件。后续解耦合以后可以放到./cmd/pfsserver下。
我在这里创建了一个ISSUE:#157
| @@ -0,0 +1,17 @@ | |||
| cat > ./Dockerfile << EOF | |||
There was a problem hiding this comment.
I think we can use golang:1.8 as the base Docker image so that it will reduce the Image size.
There was a problem hiding this comment.
golang:1.8最小的257M,这个只有125M。
There was a problem hiding this comment.
Yep, but you should wget golang.tar.gz if you use ubuntu as the base image. and we also need VPN so that we can download the tar file from storage.googleapis.com.
There was a problem hiding this comment.
编译环境和运行环境是分开的。运行环境不需要wget任何东西。
编译环境很长时间才需要构建一次。
k8s/pfs_ingress.yaml
Outdated
| @@ -0,0 +1,19 @@ | |||
| apiVersion: extensions/v1beta1 | |||
There was a problem hiding this comment.
Ingress 和python django部分现在可以完成分发了么?
go/.tools/gen_config.sh
Outdated
| cat > ~/.paddle/config << EOF | ||
| datacenters: | ||
| - name: datacenter1 | ||
| username: [email protected] |
There was a problem hiding this comment.
[email protected] should not exist, use your-user-name instead.
go/.tools/gen_config.sh
Outdated
| datacenters: | ||
| - name: datacenter1 | ||
| username: [email protected] | ||
| password: T123 |
There was a problem hiding this comment.
T123 have no meaning, use your-secret instead.
| @@ -0,0 +1,61 @@ | |||
| 1. 如何构建PFSServer的DockerImage | |||
There was a problem hiding this comment.
Just a mark, we need to put pfs and pcloud in the same image later.
| @@ -0,0 +1,19 @@ | |||
| cat > ./Dockerfile << EOF | |||
There was a problem hiding this comment.
Having both go/docker/ and docker/ seems confusing, move to the same direcotry or use docker/build_docker.sh.
| if len(a) < 3 { | ||
| func checkUser(pathStr string, user string) error { | ||
| pathStr = path.Clean(strings.TrimSpace(pathStr)) | ||
| a := strings.Split(pathStr, "/") |
There was a problem hiding this comment.
Should use os.PathSeparator instead of "/" to support Windows, or use filepath.Split()
There was a problem hiding this comment.
这个地方的路径是server端路径,格式是固定的。
go/.tools/gen_config.sh
Outdated
| username: [email protected] | ||
| password: T123 | ||
| endpoint: http://127.0.0.1:8080 | ||
| pfsendpoint: http://127.0.0.1:8080 |
There was a problem hiding this comment.
It's not simple enough for users to configure if we have two "endpoints", just use static paths like http://127.0.0.1:8080/api/v1/jobs and http://127.0.0.1:8080/api/v1/pfs, so users only need to configure endpoint to http://127.0.0.1:8080
k8s/cloud_deployment.yaml
Outdated
| - name: paddle-cloud | ||
| imagePullPolicy: Always | ||
| image: paddlepaddle/cloud | ||
| image: gongweibao/pcloud |
There was a problem hiding this comment.
gongweibao/pcloud should not appear.
k8s/cloud_ingress.yaml
Outdated
| spec: | ||
| rules: | ||
| - host: cloud.paddlepaddle.org | ||
| - host: cloud1.paddlepaddle.org |
There was a problem hiding this comment.
cloud1.paddlepaddle.org is confusing.
k8s/pfs_deployment.yaml
Outdated
| containers: | ||
| - name: pfs | ||
| imagePullPolicy: Always | ||
| image: gongweibao/pfsserver:latest |
There was a problem hiding this comment.
gongweibao/pfsserver:latest should not appear.
gongweibao
left a comment
There was a problem hiding this comment.
改的次数太多,忘记把测试环境的改过来了。汗。
typhoonzero
left a comment
There was a problem hiding this comment.
LGTM++
except for one small comment
| image: paddlepaddle/pfsserver:latest | ||
| env: | ||
| - name: CURRENT_DATACENTER | ||
| value: "meiyan" |
There was a problem hiding this comment.
"meiyan" should be a template too.
There was a problem hiding this comment.
我单独搞一个PR来处理template的问题
No description provided.