Code of conduct
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See
CODE_OF_CONDUCT.md in this repository for more information.
This repository contains chef artifacts used to deploy all the different pieces of infrastructure which run RubyGems.org. There are a few patterns which we use and enforce throughout the repo:
- All cookbooks should live somewhere upstream. This could be a developers’s GitHub account, or the Chef community site. All the cookbooks in the
cookbooksdirectory are wrappers which set attributes, configure necessary LWRP’s, and include recipes. The functionality itself comes from the upstream cookbooks.
- Unless a wrapper cookbooks requires a cookbook for the same software which is different than what’s on the Chef community site, all dependencies should be in a wrapper cookbook’s
metadata.rb, rather than in the
Berksfilelocated in the root of this repo.
- No binaries ever go into this repo. They should all live in an apt repository or in S3.
To run chef on all nodes (staging, common, production) run:
knife ssh "*:*" "sudo chef-client" -x $(whoami).
We use roles as minimally as possible. All top-level functionality should be in the appropriate role-specific cookbook (i.e. rubygems-app). We only use roles for easing the use of search and for monitoring configuration.
knife role from file roles/*.rb after updating any roles to upload them to the Chef server.
knife environment from file environments/*.json after updating any environments to upload them to the Chef server.
This readme has some high-level information in it, but our wiki is where you can find more advanced and complete information about the RubyGems.org infrastructure.
ChefDK is the recommended way to get the different tools necessary to manage, install, and test our chef deployment. It includes things like an embedded Ruby, Berkshelf, and Test Kitchen. After you’ve download and installed the necessary ChefDK package for your platform, run
/opt/chefdk/embedded/bin/bundle install --local to add a few tools we use which are not included in the ChefDK packages.
If you’d prefer to avoid ChefDK, then you will need to have Ruby 2.0 and Bundler installed. Then run
bundle install --local to install all the gems required for development.
This repository is free software made available under the MIT license. You can view the full text of the license in the
LICENSE file included as part of this repository. That file must be redistributed.
It should be noted that some files in this repository are included with licensed other than MIT. These files have a header with their license information and those licenses are compatible with the MIT license.