WEBUi - Force chef-client action


#1

HI,

I saw the Opscode platform that it’s possible to mouse over the tab “run list” at the point “Status” and see the complete run list of this node. But if I’m installing the server on my own, I didn’t get this feature. I can click on it and nothing happened or mouse over. For what is this button?! I thought, that you are able to push a new run list to a node but this is only an idea and I can’t do it :frowning: Soo my question is, is there a way to force an chef-client via the WEBUI?! It will be very nice, because if you have a necessary task and you have to do it now, you can’t login to every server and enter the command “chef-client” .

Can anybody help me with this question?!
Regards Andreas


#2

On Mar 18, 2011, at 2:56 AM, WEINHAPL Andreas wrote:

HI,

I saw the Opscode platform that it’s possible to mouse over the tab
“run list” at the point “Status” and see the complete run list of
this node. But if I’m installing the server on my own, I didn’t get
this feature. I can click on it and nothing happened or mouse over.
For what is this button?! I thought, that you are able to push a
new run list to a node but this is only an idea and I can’t do it L
Soo my question is, is there a way to force an chef-client via the
WEBUI?! It will be very nice, because if you have a necessary task
and you have to do it now, you can’t login to every server and enter
the command “chef-client”

As others have said this has nothing to do with actually running
anything, but at least when I looked into this on the 0.9.12 apt
packaged version it wasn’t working due to an incorrectly minified
version of jQuery (which was no longer syntactically correct). I have
vague memories of jtimberman mentioning that it was some debian policy
to use a central version of jQuery and that was breaking things.

–Noah


#3

The platform (AFAIK) doesn’t take any action - it is really a datastore,
chef-client must be run from the machine.

So you either (or both) setup a cron on each machine (as part of your chef
config) to run “chef-client” periodically, and/or you use the wonderful tool
"knife" to run chef-client on many machines:

knife ssh “role:some-role-or-other” “chef-client”

that will run “chef-client” on every machine that has the role
"some-role-or-other" in their run list.

Many other possibilities:
http://wiki.opscode.com/display/chef/Knife
(note that the platform can provide you with a knife.rb configuration file
but knife itself is a command-line tool installed with chef).

all the best

Tim

On Fri, Mar 18, 2011 at 9:56 AM, WEINHAPL Andreas <
andreas.weinhapl@thalesgroup.com> wrote:

HI,

I saw the Opscode platform that it’s possible to mouse over the tab “run
list” at the point “Status” and see the complete run list of this node. But
if I’m installing the server on my own, I didn’t get this feature. I can
click on it and nothing happened or mouse over. For what is this button?!
I thought, that you are able to push a new run list to a node but this is
only an idea and I can’t do it L Soo my question is, is there a way to
force an chef-client via the WEBUI?! It will be very nice, because if you
have a necessary task and you have to do it now, you can’t login to every
server and enter the command “chef-client” .

Can anybody help me with this question?!

Regards Andreas


#4

On 18 March 2011 09:56, WEINHAPL Andreas
andreas.weinhapl@thalesgroup.com wrote:

HI,

I saw the Opscode platform that it’s possible to mouse over the tab “run
list” at the point “Status” and see the complete run list of this node. But
if I’m installing the server on my own, I didn’t get this feature. I can
click on it and nothing happened or mouse over. For what is this button?!

It used to work on non-Platform webUI. I don’t recall when it broke.
It did the same as you describe the Platform UI doing.

I’m pretty sure it was only informational. It had nothing to do with
actually running the client.

Jonathan

Jonathan Matthews
London, UK
http://www.jpluscplusm.com/contact.html


#5

As already mentioned, you can use the command line tool
Knifehttp://help.opscode.com/kb/chefbasics/knife to
enact an action on the chef-clients immediately. You can also setup the
chef-client to run from cron, or some other scheduler.

A third option would be to daemonize the chef-client. From the Chef
Wikihttp://wiki.opscode.com/display/chef/Chef+Client
:

"To run the chef-client as a persistent daemon, make your startup script for
the chef client execute something like:

$ chef-client -i 3600 -s 600

The -i option provides an Interval - it’s how often the Chef client will
attempt to wake up and Converge this Node. The -s option is the Splay - a
random piece of time added to the interval, which helps avoid the thundering
herd problem."

By updating the policy on the server, when the chef client wakes up and
converges the node, it would reapply the policies from the Chef Server
enacting the change at the interval set for the persistent daemon.

If you use the chef-client
cookbookhttp://community.opscode.com/cookbooks/chef-client,
it automatically sets up the client to run as a daemon.

Unrelated note for your information: beyond use of this and the chef-dev
mailing list, and the IRC channel, as a Opscode Platform customer, you can
also direct questions to support@opscode.com or enter a support request
directly at help.opscode.com.

On Fri, Mar 18, 2011 at 3:30 AM, Jonathan Matthews
contact@jpluscplusm.comwrote:

On 18 March 2011 09:56, WEINHAPL Andreas
andreas.weinhapl@thalesgroup.com wrote:

HI,

I saw the Opscode platform that it’s possible to mouse over the tab “run
list” at the point “Status” and see the complete run list of this node.
But
if I’m installing the server on my own, I didn’t get this feature. I can
click on it and nothing happened or mouse over. For what is this
button?!

It used to work on non-Platform webUI. I don’t recall when it broke.
It did the same as you describe the Platform UI doing.

I’m pretty sure it was only informational. It had nothing to do with
actually running the client.

Jonathan

Jonathan Matthews
London, UK
http://www.jpluscplusm.com/contact.html

Tom Thomas | Opscode, Inc.
tom@opscode.com | © 206.234.1193 | www.opscode.com