DockerCon14 Contributing to Docker by Tianon
-
Upload
docker-inc -
Category
Documents
-
view
227 -
download
1
Transcript of DockerCon14 Contributing to Docker by Tianon
Contributing to Docker
introduction
Contributing to Docker
Andrew “Tianon” Page
TM
Contributing to Docker
introduction
my story
How did I get involved in such a cool project?
Contributing to Docker
introduction
obligatory stats
IT’S OVER NINE-THOUSAND!
¥ Git/GitHub Stats
¥ Over 12,000 stars (yeah, we passed 9,000 a while ago... indulge me? :))
¥ Over 2,000 forks¥ Over 450 contributors
¥ File Types
¥ Over 590 Go files (and over 160 of those are _test.go files)¥ Over 160 Markdown files¥ Over 60 Bash/Shell files¥ Even 15+ CSS and 20+ JavaScript files!
¥ IRC
¥ Averaging 900+ in #docker
¥ ... and 150+ in #docker-dev
Contributing to Docker
clearly, many ways to contribute
helping out!
No Code, No Code
¥ Support in #docker on IRC and on the “docker” ML
¥ Triaging issues (reproducing, chasing down duplicates)
¥ Constructive dialog on issues, pull requests, and the“docker-dev” ML
¥ Bug hunting and filing new issues
Contributing to Docker
clearly, many ways to contribute
packaging
Insert Your Favorite Distribution Here
¥ Alpine
¥ Arch
¥ boot2docker
¥ CentOS
¥ CoreOS
¥ CRUX
¥ Debian
¥ Fedora
¥ FrugalWare
¥ Gentoo
¥ Homebrew
¥ Nix
¥ openSUSE
¥ RHEL
¥ Slackware
¥ Ubuntu
¥ If you’re interested in helping make this list even longer,read hack/PACKAGERS.md and get in touch with me!
Contributing to Docker
clearly, many ways to contribute
reviewing PRs
“IANTM” — I Am Not The Maintainer
¥ Be kind and respectful, especially of contributor’s time(donated time is a precious resource we shouldn’t waste)
Contributing to Docker
clearly, many ways to contribute
reviewing PRs
Become A Maintainer!
¥ (see CONTRIBUTING.md and hack/MAINTAINERS.md)
¥ Learn the component you want to maintain inside and out
¥ Check out Gordon(https://github.com/dotcloud/gordon)
¥ Contribute code, bugfixes, support, etc.
¥ Propose yourself at the weekly contributors meeting in#docker-dev (Thursdays at 10:30am PST)
¥ Submit a PR adding yourself to the MAINTAINERS file forthe component
Contributing to Docker
pull requests!
are you sure??
So, you really want to submit a PR?
¥ Bug Fixes
¥ Feature Enhancements
¥ Documentation
¥ (remember those nice file type stats we saw earlier?there’s something for everyone here!)
Contributing to Docker
pull requests!
respect!
Maintainers Are Contributors Too
¥ As stressed earlier, be respectful of time — we all only haveso much of it!
¥ If it’s a large change, discuss it somewhere first so yourown time isn’t wasted (on IRC in #docker-dev, on the“docker-dev” ML, etc)
Contributing to Docker
pull requests!
building blocks
Git / GitHub
¥ git clone https://github.com/dotcloud/docker.git
¥ git remote add yourname [email protected]:yourname/docker.git
¥ git fetch --all -p
¥ (master always tracks origin/master)
¥ git checkout -b your-new-pr-branch
¥ Once you’ve submitted your PR with a branch, keep it; force push it toupdate your PR (in GitHub, one PR = one branch)
Contributing to Docker
pull requests!
building blocks
Unit Tests, Integration Tests, and CLI IntegrationTests, Oh My!
¥ Simple - if your functions can be tested easily, create aGo-standard yourfilename_test.go file and throw yourtests inside it.
¥ Complex - if, on the other hand, your tests require more ofDocker available (or you want to test complex features orfeature interactions),integration-cli/docker_cli_commandtotest_test.go.
¥ integration/ is our old integration tests - if you wantsome likely-easy PRs, help us convert them over tointegration-cli/. :)
Contributing to Docker
pull requests!
building blocks
Size Matters
¥ Small PRs are easy to review (remember that maintainers are
contributors too - time is our precious resource)
¥ Large PRs are sometimes necessary, but they rob us(WE REQUIRE MORE VESPENE GAS)
Contributing to Docker
pull requests!
building blocks
Building On The Shoulders Of Giants
¥ I know this really cool project that helps create consistentuserspace environments which are absolutely ideal forbuilding software... :)
¥ make, make all
¥ make shell
¥ ./hack/make.sh binary
¥ ./hack/make.sh test
¥ ./hack/make.sh binary test-integration-cli
Contributing to Docker
pull requests!
review
We Don’t Bite!
¥ Seriously, we try to be pretty nice.
¥ ... but on the other hand, please try to realize that it’s justcode (trust me, I know this is hard — we can’t all be asaltruistic as crosbymichael).
¥ Also realize that the person who’s reviewing your code isprobably going to be the sap who has to maintain andsupport it, so they’ve got a vested interest in making sureit’s something they can commit to maintain. If it’s not upto snuff, they won’t commit, you won’t get merged, and allthat “code snobbery” will have been for naught.
¥ ./hack/getmaintainer.sh
Contributing to Docker
pull requests!
review
Gordon!
¥ Seriously, did you check him out yet?
¥ https://github.com/dotcloud/gordon
¥ If you even have an inkling of becoming a maintainer, he’sgoing to help make your life easier.
Contributing to Docker
questions?
AMA!
Andrew “Tianon” Page
TM