Use Cheffish resources for user and org creation #88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As part of a larger effort to make use of our own primitives, the
test::post-install recipe should use Cheffish chef_user and
chef_organization resources to create the example user and organization.
It may be many more lines of code, but at the end of the day it is
declarative, and these resources are inherently both convergent and
idempotent. Running the chef-server-ctl commands requires a guard, which
parses output that can change more easily in a user-facing tool. The
Cheffish resources use the REST API of the Chef Server, and changes to
the API itself is made with far more consideration.
That said, there's a bug in the Cheffish chef_organization resource,
addressed by the following pull request:
chef/cheffish#50
As such, we install the Cheffish gem built from the branch in that PR.
When that is merged and a new Cheffish gem is released, then we can
remove the git and rake use in the recipe, and just use chef_gem.