Skip to content
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 Docker support for local development #12

Merged
merged 11 commits into from
Mar 25, 2020

Conversation

llitfkitfk
Copy link
Contributor

@llitfkitfk llitfkitfk commented Mar 22, 2020

  1. add docker support for local development
  2. add quick start for local development

@llitfkitfk llitfkitfk changed the title Add Docker support Add Docker support for dev Mar 22, 2020
@llitfkitfk llitfkitfk changed the title Add Docker support for dev Add Docker support for development Mar 22, 2020
@llitfkitfk llitfkitfk changed the title Add Docker support for development Add Docker support for local development Mar 22, 2020
@UlricQin
Copy link
Member

  • 没有看到judge、tsdb、collector,是有意为之?
  • ldap那块前一个pr已经做了一些修改,需要你这边更新一下代码哈

@llitfkitfk
Copy link
Contributor Author

@UlricQin
等会我加上 昨天整得太晚 先睡去了

@llitfkitfk
Copy link
Contributor Author

llitfkitfk commented Mar 23, 2020

@UlricQin updated
Can u check the error when build tsdb?

github.com/didi/nightingale/src/modules/tsdb/rrdtool
github.com/didi/nightingale/src/modules/tsdb/http/routes
github.com/didi/nightingale/src/modules/tsdb/migrate
# github.com/didi/nightingale/src/modules/tsdb/http/routes
src/modules/tsdb/http/routes/op_router.go:57:15: undefined: str.Checksum
# github.com/didi/nightingale/src/modules/tsdb/migrate
src/modules/tsdb/migrate/worker.go:55:25: undefined: "github.com/didi/nightingale/src/toolkits/str".GetKey
src/modules/tsdb/migrate/worker.go:89:26: undefined: "github.com/didi/nightingale/src/toolkits/str".GetKey

@llitfkitfk
Copy link
Contributor Author

@UlricQin updated
Can u check the error when build tsdb?

github.com/didi/nightingale/src/modules/tsdb/rrdtool
github.com/didi/nightingale/src/modules/tsdb/http/routes
github.com/didi/nightingale/src/modules/tsdb/migrate
# github.com/didi/nightingale/src/modules/tsdb/http/routes
src/modules/tsdb/http/routes/op_router.go:57:15: undefined: str.Checksum
# github.com/didi/nightingale/src/modules/tsdb/migrate
src/modules/tsdb/migrate/worker.go:55:25: undefined: "github.com/didi/nightingale/src/toolkits/str".GetKey
src/modules/tsdb/migrate/worker.go:89:26: undefined: "github.com/didi/nightingale/src/toolkits/str".GetKey

fixed

@llitfkitfk
Copy link
Contributor Author

@UlricQin All updated

@@ -136,12 +136,12 @@ status()
build_one()
{
mod=$1
go build -o n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
go build -o bin/n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
Copy link
Member

@UlricQin UlricQin Mar 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要bin目录了,会导致默认的配置文件路径不对了,二进制默认会读取etc下的配置,方便调试

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

能否加个 build for docker的 如果不加bin
之后有个不够copy需要一个个写编译出的bin文件名称 有点不通用

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

能否通过通配符的方式拷贝,比如cp n9e-* /path

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

试过 不行 不支持

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好,那把control脚本修改一下吧,./control build docker 这样调用的话,就按照你这个方式来

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@@ -0,0 +1,34 @@
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

配置文件在docker下面又放了一份,后面修改的时候需要修改两份,可否用一份搞定?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker 内的配置 连接其他服务需要改host 能否使用环境变量?
如果不行, 明天改为打包的时候用sed修改一下host

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没太理解,能否加个微信详细沟通一下 18612185520

@llitfkitfk
Copy link
Contributor Author

@UlricQin updated

@UlricQin UlricQin merged commit 3e8a694 into ccfos:master Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants