-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pfsserver dockerfile #148
Conversation
go/README_CN.md
Outdated
@@ -0,0 +1,20 @@ | |||
1. 如何创建pfsserver的DockerImage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pfsserver
=> PFSServer
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
go/README_CN.md
Outdated
@@ -0,0 +1,20 @@ | |||
1. 如何创建pfsserver的DockerImage | |||
- 创建pfsserver的编译环境 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
创建pfsserver的编译环境
==>
构建PFSServer的开发环境镜像
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
创建pfsserver的DockerImage
=>
构建PFSServer的生产环境镜像
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -0,0 +1,5 @@ | |||
FROM ubuntu:16.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Dockerfile
is used for PFSServer
, so we can move this to ./cmd/pfsserver
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前还不行,依赖了./tools/gen_config.sh
,用来生成配置文件。后续解耦合以后可以放到./cmd/pfsserver
下。
我在这里创建了一个ISSUE:#157
go/docker/build.sh
Outdated
@@ -0,0 +1,17 @@ | |||
cat > ./Dockerfile << EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golang:1.8
最小的257M,这个只有125M。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
编译环境和运行环境是分开的。运行环境不需要wget任何东西。
编译环境很长时间才需要构建一次。
k8s/pfs_ingress.yaml
Outdated
@@ -0,0 +1,19 @@ | |||
apiVersion: extensions/v1beta1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ingress 和python django部分现在可以完成分发了么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
go/.tools/gen_config.sh
Outdated
cat > ~/.paddle/config << EOF | ||
datacenters: | ||
- name: datacenter1 | ||
username: user@baidu.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user@baidu.com
should not exist, use your-user-name
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
go/.tools/gen_config.sh
Outdated
datacenters: | ||
- name: datacenter1 | ||
username: user@baidu.com | ||
password: T123 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
T123
have no meaning, use your-secret
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -0,0 +1,61 @@ | |||
1. 如何构建PFSServer的DockerImage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a mark, we need to put pfs and pcloud in the same image later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
go/docker/build.sh
Outdated
@@ -0,0 +1,19 @@ | |||
cat > ./Dockerfile << EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use os.PathSeparator
instead of "/" to support Windows, or use filepath.Split()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方的路径是server端路径,格式是固定的。
go/.tools/gen_config.sh
Outdated
username: user@baidu.com | ||
password: T123 | ||
endpoint: http://127.0.0.1:8080 | ||
pfsendpoint: http://127.0.0.1:8080 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
k8s/cloud_deployment.yaml
Outdated
@@ -39,7 +39,7 @@ spec: | |||
containers: | |||
- name: paddle-cloud | |||
imagePullPolicy: Always | |||
image: paddlepaddle/cloud | |||
image: gongweibao/pcloud |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gongweibao/pcloud
should not appear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
k8s/cloud_ingress.yaml
Outdated
@@ -4,10 +4,15 @@ metadata: | |||
name: paddle-cloud-ingress | |||
spec: | |||
rules: | |||
- host: cloud.paddlepaddle.org | |||
- host: cloud1.paddlepaddle.org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cloud1.paddlepaddle.org
is confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
k8s/pfs_deployment.yaml
Outdated
containers: | ||
- name: pfs | ||
imagePullPolicy: Always | ||
image: gongweibao/pfsserver:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gongweibao/pfsserver:latest
should not appear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改的次数太多,忘记把测试环境的改过来了。汗。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM++
except for one small comment
image: paddlepaddle/pfsserver:latest | ||
env: | ||
- name: CURRENT_DATACENTER | ||
value: "meiyan" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"meiyan" should be a template too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我单独搞一个PR来处理template
的问题
No description provided.