test-kitchen

Testing Chef roles and environments

人走茶凉 提交于 2019-11-30 15:05:56
问题 I'm new to Chef and have been using Test Kitchen to test the validity of my cookbooks, which works great. Now I'm trying to ensure that environment-specific attributes are correct on production nodes prior to running Chef initially. These would be defined in a role. For example, I may have recipes that converge using a Vagrant box with dev settings, which validates the cookbook. I want to be able to test that a production node's role. I think I want these tests as the source of truth

Testing Chef roles and environments

我的梦境 提交于 2019-11-30 13:21:38
I'm new to Chef and have been using Test Kitchen to test the validity of my cookbooks, which works great. Now I'm trying to ensure that environment-specific attributes are correct on production nodes prior to running Chef initially. These would be defined in a role. For example, I may have recipes that converge using a Vagrant box with dev settings, which validates the cookbook. I want to be able to test that a production node's role. I think I want these tests as the source of truth describing my environment. Looking at Test Kitchen's documentation, this seems beyond its scope. Is my

Adding Attributes to Test Kitchen

眉间皱痕 提交于 2019-11-30 03:21:37
问题 I'm trying to override attributes in the java cookbook with test-kitchen. When I try run kitchen converge default-centos-64 , a bad YAML error shows up. --- driver: name: vagrant customize: memory: 1024 cpuexecutioncap: 50 provisioner: name: chef_solo platforms: - name: centos-6.4 suites: - name: default run_list: - recipe[java::default] - recipe[maven::default] attributes: { java.install_flavor: "oracle", java.jdk_version: "7" } I pasted the above into http://yamllint.com/. When I hit "Go,"