Chef-server run list questions


#1

Hello.

I’m create role with 3 recipes, and apply it to node via chef-client.
After that in webui i’m attach recipe to this node (screen). Recipe done
successful.

But in webui status page in node run list recipe screen does not
disappear. What is default behavior to recipes what already completed?

Thank You.


Vasiliy G Tolstov v.tolstov@selfip.ru
Selfip.Ru


#2

Vasilly,
Be sure to use the #chef IRC channel at irc.freenode.net. This is best.

Anyway, it seems to want your recipes to execute for 1 time only.

Normally in chef, we expect our recipes are run over and over, at each
node interval. So this is the “idempotent” part of chef. That means
whatever the initial conditions, we expect that the computers
configuration will end up in a consistent, known and repeatable state.
That is, after any recipe is completed.

If we want to run something once, then we put guard statements in our
recipes, and check first whether something has been installed. Eg we
dont want to install the webserver each time so we use “only_if” or
"not_if" conditions. So skips over that part of the recipe if done
once before.

Therefore we dont expect the recipes to disappear from the run list.
They should remain and be re-run. This is normal. It just means that
the 2nd, 3rd time the recipe is just double checking that the things
it manages are still configured right and in the correct place.

On Wed, May 19, 2010 at 2:29 PM, Vasiliy G Tolstov v.tolstov@selfip.ru wrote:

Hello.

I’m create role with 3 recipes, and apply it to node via chef-client.
After that in webui i’m attach recipe to this node (screen). Recipe done
successful.

But in webui status page in node run list recipe screen does not
disappear. What is default behavior to recipes what already completed?

Thank You.


Vasiliy G Tolstov v.tolstov@selfip.ru
Selfip.Ru


#3

В Срд, 19/05/2010 в 14:49 +0100, dreamcat four пишет:

Vasilly,
Be sure to use the #chef IRC channel at irc.freenode.net. This is best.

Anyway, it seems to want your recipes to execute for 1 time only.

Normally in chef, we expect our recipes are run over and over, at each
node interval. So this is the “idempotent” part of chef. That means
whatever the initial conditions, we expect that the computers
configuration will end up in a consistent, known and repeatable state.
That is, after any recipe is completed.

If we want to run something once, then we put guard statements in our
recipes, and check first whether something has been installed. Eg we
dont want to install the webserver each time so we use “only_if” or
"not_if" conditions. So skips over that part of the recipe if done
once before.

Therefore we dont expect the recipes to disappear from the run list.
They should remain and be re-run. This is normal. It just means that
the 2nd, 3rd time the recipe is just double checking that the things
it manages are still configured right and in the correct place.

Ok. Thank’s for answer. But if i want install all needed software only
once and after that shutdown chef-client and delete authorization token?


Vasiliy G Tolstov v.tolstov@selfip.ru
Selfip.Ru


#4

On Wed, May 19, 2010 at 3:30 PM, Vasiliy G Tolstov v.tolstov@selfip.ru wrote:

В Срд, 19/05/2010 в 14:49 +0100, dreamcat four пишет:

Vasilly,
Be sure to use the #chef IRC channel at irc.freenode.net. This is best.

Anyway, it seems to want your recipes to execute for 1 time only.

Normally in chef, we expect our recipes are run over and over, at each
node interval. So this is the “idempotent” part of chef. That means
whatever the initial conditions, we expect that the computers
configuration will end up in a consistent, known and repeatable state.
That is, after any recipe is completed.

If we want to run something once, then we put guard statements in our
recipes, and check first whether something has been installed. Eg we
dont want to install the webserver each time so we use “only_if” or
"not_if" conditions. So skips over that part of the recipe if done
once before.

Therefore we dont expect the recipes to disappear from the run list.
They should remain and be re-run. This is normal. It just means that
the 2nd, 3rd time the recipe is just double checking that the things
it manages are still configured right and in the correct place.

Ok. Thank’s for answer. But if i want install all needed software only
once and after that shutdown chef-client and delete authorization token?

Sure, yes you can. Or run it once from cmdline with chef-solo.


Vasiliy G Tolstov v.tolstov@selfip.ru
Selfip.Ru