From 963a977c406118f5ff88eccb56b4b81b10644302 Mon Sep 17 00:00:00 2001 From: Andy Xie Date: Mon, 16 Oct 2017 11:23:07 +0800 Subject: [PATCH] add setup readme --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 048501a9..52116202 100644 --- a/README.md +++ b/README.md @@ -73,9 +73,20 @@ Refer [heapster docs](https://github.com/kubernetes/heapster/blob/master/docs/so * `--hostname-override`: A customized node name used for node-problem-detector to update conditions and emit events. node-problem-detector gets node name first from `hostname-override`, then `NODE_NAME` environment variable and finally fall back to `os.Hostname`. ## Build Image -Run `make` in the top directory. It will: -* Build the binary. -* Build the docker image. The binary and `config/` are copied into the docker image. +* `go get` or `git clone` node-problem-detector repo into `$GOPATH/src/k8s.io` or `$GOROOT/src/k8s.io` +with one of the below directions: + * `cd $GOPATH/src/k8s.io && git clone git@github.com:kubernetes/node-problem-detector.git` + * `cd $GOROOT/src/k8s.io && git clone git@github.com:kubernetes/node-problem-detector.git` + * `cd $GOPATH/src/k8s.io && go get k8s.io/node-problem-detector` + +* run `make` in the top directory. It will: + * Build the binary. + * Build the docker image. The binary and `config/` are copied into the docker image. + +**Note**: +By default node-problem-detector will be built with systemd support with `make` command. This requires systemd develop files. +You should download the systemd develop files first. For Ubuntu, `libsystemd-journal-dev` package should +be installed. ## Push Image `make push` uploads the docker image to registry. By default, the image will be uploaded to