Tom Klino
Tom Klino

Reputation: 2504

Testing an update to a cookbook on a single production server

We have sometimes cookbooks that can't be fully tested in staging environment as the result does not always reflect what might happen in production environment. As a solution what I'm trying to do is to freeze the version for the environment like so:

{
  "name": "production",
  "description": "Production Environment",
  "cookbook_versions": {
    "deployment": "= 0.1.12"
  },
...

and exclude a specific server for that limitation by specifying the new version explicitly in its run list like so:

...
  "run_list": [
  "recipe[base]",
  "recipe[security]",
  "recipe[deployment::[email protected]]"
]
...

problem is, when the version of the environment is not the same as that specified in the run_list, chef-client gets stuck on resolving cookbooks for run list: ...

why is that? is there a way to get around this? is there a better way to test an update for a recipe only on one server?

Upvotes: 1

Views: 99

Answers (1)

coderanger
coderanger

Reputation: 54181

You can't override an existing constraint, so you would have to temporarily move that node to a new environment for testing purposes.

Upvotes: 2

Related Questions