Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Adds a kitchen flag that gives options for different kitchen configs #1517

Conversation

burtlo
Copy link
Contributor

@burtlo burtlo commented Mar 8, 2018

To provide support out-of-the-box for kitchen-dokken there is a flag now to specify which base kitchen configuration to use.

By default a chef cookbook will generate a kitchen configuration using vagrant as the driver. You may find that you want to use kitchen-dokken as your default kitchen environment when generating your cookbooks.

$ chef generate cookbook COOKBOOKNAME --kitchen dokken

That plugin requires a little more setup as it is a driver, provisioner, and transport. It also requires special considerations with the platforms that it uses for testing.

To learn more about the benefits of kitchen-dokken take a look at this blog post: https://blog.chef.io/2018/03/06/kitchen-docker-or-kitchen-dokken-using-test-kitchen-and-docker-for-fast-cookbook-testing/

Signed-off-by: Franklin Webber franklin@chef.io

@burtlo burtlo requested a review from a team March 8, 2018 15:30
Copy link
Contributor

@danielsdeleo danielsdeleo left a comment

Choose a reason for hiding this comment

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

👍 from me. Kinda wondering if we should try to unify the kitchen yaml templates but IMO we can merge this and clean that up later should we decide it's needed.

@burtlo
Copy link
Contributor Author

burtlo commented Mar 8, 2018

vagrant berks config vs vagrant policy file config

image

vagrant berks config vs dokken config

image

vagrant policy file config vs dokken config

image

@burtlo
Copy link
Contributor Author

burtlo commented Mar 8, 2018

I imagine if we tried to merge these would place more logic in the recipe that could make sense.

Most of that content could be represented as JSON and then inserted correctly. Comments would be a meta-field in that data structure that would render alongside the appropriate field.

I'd be happy to make that change here or in a future commit if this approach and YET ANOTHER FLAG is the best way to proceed.

image: dokken/ubuntu-16.04
- name: centos-7
driver:
image: dokken/centos-7
Copy link
Contributor

Choose a reason for hiding this comment

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

Option: could add the "so you want to verify services?" shenanigans to these driver entries in the platform section?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it’s a good idea. Of course based on our conversation it assumes you’re running on a *nix based system.

I’d be interested in learning the windows option if that is known and add that.

@danielsdeleo
Copy link
Contributor

@burtlo thanks for posting those diffs. It actually made me realize we need to delete the policyfile one. Doing that would bring us back to just 2 templates which is below the "rule of 3" for refactoring so just ignore my earlier comment :)

To provide support out-of-the-box for kitchen-dokken there is a flag now
to specify which base kitchen configuration to use.

Signed-off-by: Franklin Webber <franklin@chef.io>
@robbkidd robbkidd force-pushed the feature/cookbook_generator-kitchen_flag branch from 9df4e0f to e7fd003 Compare November 21, 2018 18:28
@robbkidd
Copy link
Contributor

Rebased against current master branch.

let's see if it works out

Copy link
Contributor

@robbkidd robbkidd left a comment

Choose a reason for hiding this comment

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

I don't remember what I meant by ...

the "so you want to verify services?" shenanigans

... so ...

thumbs up

@marcparadise marcparadise merged commit 21d6504 into chef-boneyard:master Nov 28, 2018
marcparadise added a commit that referenced this pull request Nov 28, 2018
PR: #1517

Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
@lock
Copy link

lock bot commented Jan 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants