bloomberg/chef-bcpc — pull request #285 by cbaenziger (2014-08-19 01:12:08+00:00)
Title: Allow multiple users to admin bootstrap node

This is a PR to allow bootstrap administration on a casual level; this allows users to modify the bootstrap node by logging in with a user account which has an ssh key provided or shadow password entry provided by someone out-of-band.

The pattern allows one to:

# Modify the Chef Recipes:

To clone the chef code used for the cluster, run:

`$ git clone ~vagrant/chef-bcpc-repo`

If you make changes, be sure to set your name and e-mail address in Git:

`$ git config --global user.name "John Doe"`
`$ git config --global user.email johndoe@example.com`

To push your changes back to the master repository, simply run:

`$ git push`

The Chef server will pull and upload all changes once a minute to the Chef-Server.
To verify your changes were deployed, one can run (i.e. to download the `bcpc-hadoop` cookbook):

`$ cd; sudo -u vagrant knife cookbook download bcpc-hadoop -c ~vagrant/chef-bcpc/.chef/knife.rb`

# Deploy Chef Recipes:

To deploy the Chef recipes one can:

* Wait, the cluster may be configured to pull the recipes via the chef-client cookbook automatically. Particularly, it will be every `node[:chef_client][:interval]` seconds.
* Manually push the changes:
* `$ cd ~vagrant/chef-bcpc; sudo -u vagrant ./cluster-assign-roles.sh _ [machine|machine type]_`
* Where:
* _Environment_ is the cluster to Chef (e.g. the chef-environment etc.)
* `Hadoop` or `Kafka` is the type of role assignment to do (will only do that respective cluster)
* Optionally: _machine_ may be a short hostname or _machine type_ maybe a role name (e.g. `Hadoop-Head-Namenode`)