mirror of https://github.com/k3s-io/k3s
Merge pull request #36590 from thockin/contrib-doc
Automatic merge from submit-queue Add CONTRIBUTING section on build @kubernetes/contributor-experiencepull/6/head
commit
3406000a9c
|
@ -82,6 +82,46 @@ some bugs or smaller features. We have a [feature development
|
||||||
process](https://github.com/kubernetes/features/blob/master/README.md), but
|
process](https://github.com/kubernetes/features/blob/master/README.md), but
|
||||||
navigating the Kubernetes system as a newcomer can be very challenging.
|
navigating the Kubernetes system as a newcomer can be very challenging.
|
||||||
|
|
||||||
|
### Downloading the project
|
||||||
|
|
||||||
|
There are a few ways you can download this code. You must download it into a
|
||||||
|
GOPATH - see [golang.org](https://golang.org/doc/code.html) for more info on
|
||||||
|
how Go works with code. This project expects to be found at the Go package
|
||||||
|
`k8s.io/kubernetes`.
|
||||||
|
|
||||||
|
1. You can `git clone` the repo. If you do this, you MUST make sure it is in
|
||||||
|
the GOPATH as `k8s.io/kubernetes` or it may not build. E.g.: `git clone
|
||||||
|
https://github.com/kubernetes/kubernetes $GOPATH/src/k8s.io/kubernetes`
|
||||||
|
1. You can use `go get` to fetch the repo. This will automatically put it into
|
||||||
|
your GOPATH in the right place. E.g.: `go get -d k8s.io/kubernetes`
|
||||||
|
1. You can download an archive of the source. If you do this, you MUST make
|
||||||
|
sure it is unpacked into the GOPATH as `k8s.io/kubernetes` or it may not
|
||||||
|
build. See [rel.k8s.io](http://rel.k8s.io) for a list of available releases.
|
||||||
|
|
||||||
|
### Building the project
|
||||||
|
|
||||||
|
There are a few things you need to build and test this project:
|
||||||
|
|
||||||
|
1. `make` - the human interface to the Kubernetes build is `make`, so you must
|
||||||
|
have this tool installed on your machine. We try not to use too many crazy
|
||||||
|
features of `Makefile`s and other tools, so most commonly available versions
|
||||||
|
should work.
|
||||||
|
1. `docker` - some parts of the build/test system depend on `docker`. You
|
||||||
|
need a relatively recent version of Docker installed, and available to you.
|
||||||
|
1. `go` - Kubernetes is written in Go (aka golang), so you need a relatively
|
||||||
|
recent version of the [Go toolchain](https://golang.org/dl/) installed.
|
||||||
|
While Linux is the primary platform for Kubernetes, it should compile on a
|
||||||
|
Mac, too. Windows is in progress.
|
||||||
|
|
||||||
|
To build Kubernetes, simply type `make`. This should figure out what it needs
|
||||||
|
to do and not need any input from you. If you want to just build a subset of
|
||||||
|
code, you can pass the `WHAT` variable to `make`: e.g. `make
|
||||||
|
WHAT="cmd/kubelet"`.
|
||||||
|
|
||||||
|
To run basic tests, simply type `make test`. This will run all of the unit
|
||||||
|
tests in the project. If you want to just test a subset of the project, you
|
||||||
|
can pass the `WHAT` variable to `make`: e.g. `make test WHAT=pkg/kubelet`.
|
||||||
|
|
||||||
### Protocols for Collaborative Development
|
### Protocols for Collaborative Development
|
||||||
|
|
||||||
Please read [this doc](docs/devel/collab.md) for information on how we're
|
Please read [this doc](docs/devel/collab.md) for information on how we're
|
||||||
|
|
Loading…
Reference in New Issue