- From: Yoshi Spendiff <
>
- To: chef <
>
- Subject: [chef] Re: Testing and chef best practices
- Date: Tue, 16 Jun 2015 08:06:45 -0700
1. Parameterise it if it's something that would need changing. If it's a service for something specific and that service usually has a well known name then don't parameterise it
2. If you use parameters then set them as attributes in an attribute file in your cookbook, i.e.
default['mycookbook']['service_name'] = 'myservice'
default['mycookbook']['service_port'] = 1234
3. If this is a cookbook that you intend to release to the community then I would write both unit and integration tests. It's a lot quicker to run a chefspec suite (especially if you use caching instead of let) than full integration tests, so you can run those while you're developing to quickly see if you've introduced a problem and then move up to integration tests once those pass
Archive powered by MHonArc 2.6.16.