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

Making test-kitchen work again #112

Merged
merged 2 commits into from
Jan 11, 2018
Merged

Conversation

artem-sidorenko
Copy link
Member

@artem-sidorenko artem-sidorenko commented Jan 9, 2018

This PR focuses only on getting test-kitchen work locally again. Anything besides that is out of scope of this PR and will be covered in the further PRs.

The current compliance of puppet-os-hardening to linux-baseline is almost 100% (mainly due to the great work done by @mcgege):

$ kitchen verify centos-7
....
Profile Summary: 52 successful controls, 1 control failure, 1 control skipped
Test Summary: 124 successful, 1 failure, 1 skipped

How to use it:

  • You should have virtualbox and vagrant installed
  • You should have working ruby, usage of rvm might be a good idea
  • You should have bundler installed (otherwise gem install bundler)
$ git clone https://github.com/dev-sec/puppet-os-hardening.git
$ cd puppet-os-hardening
$ git fetch origin pull/112/head:kitchen
$ git checkout kitchen
$ bundler install
$ bundle exec kitchen verify centos-7
$ bundle exec kitchen destroy

Next steps:

  • PR with CI integration (MS Azure as a backend)
  • Getting everything green
  • PDK integration?

@mcgege mcgege added this to the 2.1.0 milestone Jan 10, 2018
Copy link
Member

@mcgege mcgege left a comment

Choose a reason for hiding this comment

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

Great work @artem-sidorenko! It took me some time to setup an environment to test this ... Virtualbox in Virtualbox (or VMware) doesn't seem to work (only 32bit guests possible), so I managed to set this up on my Win10 desktop :-)

.kitchen.yml Outdated
box: bento/fedora-26
- name: opensuse-leap-42
driver_config:
box: bento/opensuse-leap-42.1
Copy link
Member

Choose a reason for hiding this comment

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

Could you test against 42.3?

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, there is indeed a new bento box available

@@ -0,0 +1,3 @@
forge "http://forge.puppetlabs.com"
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need this? I think using Puppetfile is depreciated ...

Copy link
Member Author

Choose a reason for hiding this comment

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

I remember 4 years ago librarian was state of the art for puppet, is not the case anymore? I took a look to kitchen-puppet and still see librarian there, is there any other way to get the dependencies?

Copy link
Member

Choose a reason for hiding this comment

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

Well, I just know Puppetfile out of metadata perspective, and there it's not used any more ... but it seems to be used for automatic environment management / deployment, so it's still valid :-)

Copy link
Member Author

Choose a reason for hiding this comment

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

great :-)

@artem-sidorenko
Copy link
Member Author

Virtualbox in Virtualbox (or VMware) doesn't seem to work (only 32bit guests possible), so I managed to set this up on my Win10 desktop :-)

@mcgege respect for getting it running on windows :) I would not manage to do so I guess...

yes, 32bit guests are because of missing support for nested virtualisation within VirtualBox. 32bit mode is a full emulation without VT CPU technology, its so slooow...

Signed-off-by: Artem Sidorenko <artem@posteo.de>
and making it similar to the Gemfile in chef-os-hardening

Signed-off-by: Artem Sidorenko <artem@posteo.de>
@artem-sidorenko
Copy link
Member Author

@mcgege I merge this as it seems to be Ok from your side. I try to provide the next PR in the next days

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.

None yet

3 participants