Re: chef + vlad/capistrano?


Chronological Thread 
  • From: Michal Frackowiak <michalf@wikidot.com>
  • To: chef@lists.opscode.com
  • Subject: Re: chef + vlad/capistrano?
  • Date: Tue, 10 Mar 2009 10:10:58 +0100

Hi,

I think we are close to the working configuration - which I will describe in more details later.
There is one problem we have with EC2 AMIs and one design question:

1. Problem with validation_token

We have clients authenticating with validation_token (alphanumeric only). The problem is that when we issue
chef-client -j dna.json
from an EC2 machine we are getting an Unauthorized exception:

[Mon, 09 Mar 2009 20:43:16 +0000] DEBUG: Sending HTTP Request via POST to /openid/server/decision
/usr/lib/ruby/1.8/net/http.rb:2097:in `error!': 401 "Unauthorized" (Net::HTTPServerException)
...

The node is available through server's web interface for manual validation, but cannot register automatically. Its default name is e.g. domU-12-31-39-02-61-71.

It looks like the problem is with the node name itself. It took us at least an hour, but when we do:

chef-client -j dna.json -n foonode

it works perfectly.


2. Fetching list of active nodes and removing nodes

Thanks to Adam for the hint how to pull node information from the indexer through the REST API. What we are going to do is we are adding the "capistrano_role" attribute to the nodes automatically when we initialize the node.

The problem with the nature of EC2 is that instances can be short- lived and they are not automatically removed from the list of nodes and this could confuse our capistrano tasks.

Is there a REST API we could hook to? (Could not find any documentation for it yet, but I would be happy to get a hint where to look for). Removing nodes is a key for our application since we have variable number of e.g. video transcoding nodes.

Thanks,

Michal



On Mar 9, 2009, at 6:27 PM, Adam Jacob wrote:

I think you are on the right track - let us know how it works!   I
would love to see this sort of thing broken in to a new project on
Github, at least as a loadable Chef library.  If we can provide any
more assistance with using the Chef REST API to make this work, let us
know.



---------------
Michal Frackowiak
COO of Wikidot Inc.
michalf@wikidot.com
http://michalfrackowiak.com

Wikidot Inc.
Pl. Sw. Katarzyny 9
87-100 Torun
POLAND
Phone: +48564754757
Fax: +48564754756
http://www.wikidot.com/company




Archive powered by MHonArc 2.6.16.

§