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

COOK-92 Recipe for cdap user #224

Merged
merged 1 commit into from Mar 20, 2017
Merged

Conversation

wolf31o2
Copy link
Contributor

This creates a cdap::user recipe, which can be run independently of the other recipes. As such, the user recipe is not guarded using node['cdap']['create_cdap_user'] so it can be included without modifying any other attributes.

  • Attributes under node['cdap']['cdap_user'] namespace
  • Include cdap::user in base before cdap package installation, if configured
  • Split base and prerequisites tests into their own files

Necessary Berksfile changes are in #223 to restrict windows cookbook.

@wolf31o2 wolf31o2 force-pushed the feature/cook-92-user-recipe branch from 4350cd9 to 798aa5c Compare March 16, 2017 18:04
@@ -9,6 +9,7 @@
node.default['hadoop']['mapred_site']['mapreduce.framework.name'] = 'yarn'
stub_command(/update-alternatives --display /).and_return(false)
stub_command(/test -L /).and_return(false)
stub_command(/getent/).and_return(false)
Copy link
Collaborator

Choose a reason for hiding this comment

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

i dont think these are actually needed, are they? default behavior didn't change, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Default behavior didn't change, but tests were failing before I put these into the tests. I think ChefSpec needs any shell-based tests stubbed, whether it's in the execution or not. Dunno...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. Figured it out. I originally had create_cdap_user as true by default, which is what prompted this. I just removed them and verified and tests still pass.

@dereklwood
Copy link
Collaborator

minor question on the specs, potentially unecessary stubs. otherwise 👍 lgtm

@wolf31o2 wolf31o2 force-pushed the feature/cook-92-user-recipe branch from 798aa5c to faf35dc Compare March 20, 2017 21:00
@wolf31o2 wolf31o2 merged commit f190c11 into master Mar 20, 2017
@wolf31o2 wolf31o2 deleted the feature/cook-92-user-recipe branch March 20, 2017 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants