Test Kitchen is a common tool for integration testing of Chef cookbooks. Usually a combination of Vagrant&VirtualBox is used to bring up the VMs. This works well for local development setups, but what about Continuous Integration environments? You can find several approaches how cookbooks can be tested in the CI:
Well, but what about the case you want to use Vagrant&VirtualBox in the CI too? There are some reasons for this approach:
- Maybe you can not use public cloud providers for some reasons and do not have your own on-premise cloud like OpenStack
- Maybe you want to use the same setup/technologies in the CI and locally as you want be able to easy reproduce errors and problems
GitLab is quite often used in the enterprise environments, where restrictions on the public cloud usage may apply. GitLab has its own GitLab CI, which can be easily used for cookbook testing.
This post covers a basic GitLab CI setup with Test Kitchen and Vagrant&VirtualBox as backend.
Read more →