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 CONTRIBUTING section on build #36590

Merged
merged 1 commit into from
Nov 28, 2016

Conversation

thockin
Copy link
Member

@thockin thockin commented Nov 10, 2016

@kubernetes/contributor-experience


This change is Reviewable

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-label-needed labels Nov 10, 2016
@chrislovecnm
Copy link
Contributor

YAY ... assigned to a PR :)

@grodrigues3
Copy link
Contributor

grodrigues3 commented Nov 10, 2016

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"`.
Copy link
Member

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!

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@chrislovecnm chrislovecnm left a 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:
Copy link
Contributor

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?

Copy link
Member Author

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.
Copy link
Contributor

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 :)

Copy link
Member Author

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"`.
Copy link
Contributor

Choose a reason for hiding this comment

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

$ make

Copy link
Member Author

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.

Copy link
Contributor

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
Copy link
Contributor

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...

Copy link
Contributor

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 :)

Copy link
Member Author

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`.
Copy link
Contributor

Choose a reason for hiding this comment

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

variable

environment variable :)

Copy link
Member Author

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Touche

Copy link
Contributor

@philips philips left a 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.
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

@pigmej pigmej Nov 10, 2016

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)

Copy link
Member Author

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.

Copy link
Contributor

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
Copy link
Contributor

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 :)

@spxtr
Copy link
Contributor

spxtr commented Nov 10, 2016

It might be worth adding a line saying that we are investigating bazel with a link to the doc about that.

@chrislovecnm
Copy link
Contributor

@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:
Copy link
Contributor

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.

@spxtr
Copy link
Contributor

spxtr commented Nov 10, 2016

@chrislovecnm that's reasonable.

@pigmej
Copy link
Contributor

pigmej commented Nov 10, 2016

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)

@ivan4th
Copy link
Contributor

ivan4th commented Nov 10, 2016

@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.

@k8s-github-robot k8s-github-robot added the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Nov 11, 2016
@thockin thockin added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. labels Nov 11, 2016
@thockin
Copy link
Member Author

thockin commented Nov 11, 2016

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.

@thockin thockin force-pushed the contrib-doc branch 2 times, most recently from 1864741 to 0916a81 Compare November 11, 2016 07:39
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 11, 2016
@chrislovecnm
Copy link
Contributor

@thockin do we need an issue for an encyclopedic version of this doc?

@thockin
Copy link
Member Author

thockin commented Nov 11, 2016

Probably. I am on mobile now, can do later

On Nov 11, 2016 12:29 PM, "Chris Love" notifications@github.com wrote:

@thockin https://github.com/thockin do we need an issue for an
encyclopedic version of this doc?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#36590 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFVgVFwMq_KokVih5hyMSsV2We8DUdJvks5q9NAKgaJpZM4Ku9rn
.

@bgrant0607
Copy link
Member

@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
Copy link
Member

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.

Copy link
Contributor

@sebgoa sebgoa Nov 15, 2016

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

@bgrant0607
Copy link
Member

cc @sebgoa

@bgrant0607
Copy link
Member

Let's merge and iterate.
LGTM.

@bgrant0607 bgrant0607 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 14, 2016
Copy link
Contributor

@philips philips left a 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.
Copy link
Contributor

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.

@thockin
Copy link
Member Author

thockin commented Nov 22, 2016

If I knew where to punt, I would

On Tue, Nov 22, 2016 at 11:57 AM, Brandon Philips notifications@github.com
wrote:

@philips commented on this pull request.

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.

In CONTRIBUTING.md
#36590 (review)
:

@@ -82,6 +82,27 @@ some bugs or smaller features. We have a feature development
process
, 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:
+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 Makefiles 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.

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 https://github.com/ivan4th @pigmej https://github.com/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.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#36590 (review),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFVgVFODNXFc9BHHMWXzbVWdDpsh1fIFks5rA0kbgaJpZM4Ku9rn
.

@philips
Copy link
Contributor

philips commented Nov 22, 2016

@thockin I am suggesting we punt to minikube and force minikube to have a good docker install story on all platforms.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 3406000 into kubernetes:master Nov 28, 2016
@thockin thockin deleted the contrib-doc branch August 14, 2019 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.