-
Notifications
You must be signed in to change notification settings - Fork 40k
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 CONTRIBUTING section on build #36590
Conversation
YAY ... assigned to a PR :) |
the content looks good to me. when i click view md (not raw), the numbered list doesn't seem to be recognized and it's displayed as a single paragraph. |
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="pkg/kubelet"`. |
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.
"cmd/kubectl" may be a better example as it generates a binary folks can use!
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.
A couple of tweaks to talk about. Excited that we are improving this!!!
@@ -82,6 +82,27 @@ some bugs or smaller features. We have a [feature development | |||
process](https://github.com/kubernetes/features/blob/master/README.md), but | |||
navigating the Kubernetes system as a newcomer can be very challenging. | |||
|
|||
### Building the project | |||
|
|||
There are a few things you need to build and test Kubernetes: |
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.
Build and test Kubernetes
This project?
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
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 installed. |
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.
Which platforms does this work on? Windows? Also should we link a n00b doc that has links to install instructions for each. I always approach this as a really really dumb perspective :)
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
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="pkg/kubelet"`. |
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.
$ make
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.
disagree - this is a commandline, not a console log.
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.
Sounds good
1. `go` - Kubernetes is written in Go (aka golang), so you need a relatively | ||
recent version of the Go toolchain installed. | ||
|
||
To build Kubernetes, simply type `make`. This should figure out what it needs |
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.
Type on a command line...
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.
You will need to git clone it first 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.
ok, adding some words about downloads.
|
||
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`. |
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.
variable
environment variable :)
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 is not an env var, it is a make var. I think env vars also work, but that is not what is being shown here
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.
Touche
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.
Improvement
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. |
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 needs a link to our recommendation. I would suggest minikube onboarding and docker-env.
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.
According to Dan Lorenc, minikube is targeting k8s end users. Using it for development of Kubernetes may be not very convenient. Or did I miss something here? Also, minikube by itself is probably overkill if the developer just wants to have docker.
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.
+1 for Ivan, minikube is not for developers of k8s, for developers of k8s look at #36590 (comment) or #36590 (comment)
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.
For local docker, pretty much any recent version works. I used 1.9 until recently.
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.
Sure "but pretty much any recent version" is not sufficient and I would really just like us to punt to somewhere where we know a known good version is being maintained. For cross-platform availability for workstations the closest thing we got is minikube.
@ivan4th @pigmej Also, it isn't for k8s developer but it is a known good version of the Docker engine that the k8s community tests and packages as VMs.
1. `go` - Kubernetes is written in Go (aka golang), so you need a relatively | ||
recent version of the Go toolchain installed. | ||
|
||
To build Kubernetes, simply type `make`. This should figure out what it needs |
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.
You will need to git clone it first too :)
It might be worth adding a line saying that we are investigating bazel with a link to the doc about that. |
@spxtr I don't want to talk about how the build runs, I would recommend talking about how to run the build :) Bazel is awesome, but can we document that separately. |
@@ -82,6 +82,27 @@ some bugs or smaller features. We have a [feature development | |||
process](https://github.com/kubernetes/features/blob/master/README.md), but | |||
navigating the Kubernetes system as a newcomer can be very challenging. | |||
|
|||
### Building the project | |||
|
|||
There are a few things you need to build and test Kubernetes: |
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.
You need a newline after this or the list won't render properly.
@chrislovecnm that's reasonable. |
I have some suggestion can we somehow recommend using https://github.com/Mirantis/k8s-devbox and/or https://github.com/Mirantis/kubeadm-dind-cluster as a fast way to test your stuff? devbox is supposed to create reproducible development environment for working on Kubernetes project and there are some plans to add kubeadm to it which will allow to play with remote clusters too. I'm open to suggestions there. (cc @ivan4th author of these). Devbox has some shortcuts for newcomers (e2e simplification etc) |
@jnowak: to be more precise, k8s-devbox tries to help getting k8s development environment up&running quickly and also tries to help new developers getting acquinted with k8s development workflow. As of now it uses kubernetes-dind-cluster as a fast method of multinode test cluster startup, but it will support kubeadm-dind-cluster soon. The latter uses kubeadm to create docker-in-docker-based cluster and supports workflows based on remote docker engine (copy binaries directly from the build data container & run the test cluster on the same remote docker where they were built). Both of these projects support running e2e tests locally, including ones requiring multiple nodes (unlike local-up-cluster). They're also much faster than VM-based clusters. |
All, this doc is NOT an encyclopedic listing of everythign you need to know about how to use kube. It is an intro doc. Feel free to send followups that link to more details. |
1864741
to
0916a81
Compare
@thockin do we need an issue for an encyclopedic version of this doc? |
Probably. I am on mobile now, can do later On Nov 11, 2016 12:29 PM, "Chris Love" notifications@github.com wrote:
|
@thockin It shouldn't block this PR, but I'd like this doc to be very brief, with links to more information, which won't live in the kubernetes repo. |
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 |
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.
#36655 claims that this doesn't work.
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 does not work, if you don't have a go environment setup and use the documented build-tools/run.sh make
cc @sebgoa |
Let's merge and iterate. |
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.
Overall I am not going to fight this Docker version thing but we are honestly too close to the tech here to think "just install some known good version of Docker" is good enough as a developer onramp.
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. |
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.
Sure "but pretty much any recent version" is not sufficient and I would really just like us to punt to somewhere where we know a known good version is being maintained. For cross-platform availability for workstations the closest thing we got is minikube.
@ivan4th @pigmej Also, it isn't for k8s developer but it is a known good version of the Docker engine that the k8s community tests and packages as VMs.
If I knew where to punt, I would On Tue, Nov 22, 2016 at 11:57 AM, Brandon Philips notifications@github.com
|
@thockin I am suggesting we punt to minikube and force minikube to have a good docker install story on all platforms. |
Automatic merge from submit-queue |
@kubernetes/contributor-experience
This change is