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

Use Cheffish resources for user and org creation #88

Closed
wants to merge 1 commit into from

Conversation

jtimberman
Copy link
Contributor

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.

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.
@jtimberman
Copy link
Contributor Author

As it turns out there's a race to compile time in the post-install recipe to get git installed on RHEL platforms. Going to revisit this perhaps elsewhere :/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants