[chef] Re: knife node from URL?


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: knife node from URL?
  • Date: Thu, 22 Sep 2011 00:45:37 +0530

I have encountered similar scenarios in multiple projects. In one of them the cookbook polls S3 for a version.txt file (using http request inside a ruby block resource) and checks if it has changed , and  triggers deployment based on that, once deployed it sets an attribute same as the version.txt content so that it can be checked in next run. I dont see any particular need of a knife feature to poll a url for a role, where we can do this using ruby blocks any way. In some other projects I have used scm revisions or db migration numbers (rails prjects typically) to trigger the same things,

On Thu, Sep 22, 2011 at 12:31 AM, < "> > wrote:
This post started about one thing which is included below for context and the
original questions are still interesting, but as I thought through solutions I
came across one that seems appealing. It would be ideal if knife could read a
role from a URL instead of a file. We have Jenkins put build artifacts into an
Artifactory repository, and the problem below could be solved if Jenkins built
a role as an artifact and we could just knife it right out of Artifactory.

Is it possible to make a knife plugin that can do this?

Original post:

I've been reading through the wiki, the list and google and can't seem to find
the answer to my question. I think it is a basic question but I'm missing the
answer.

We currently use a buildstamp as a node attribute to drive a lot of recipes.
What are others doing so that upon every build, Chef gets set/told of the new
buildstamp so that a set of servers uses that buildstamp on the next
chef-client run?

We're currently storing the buildsamp in a role file and loading it every time,
but that is too cumbersome and want/need a solution that doesn't involve an
intermediate file. Simply knife in a chunk of JSON attributes?

Is there a way to set a node attribute without an intermediate file? Is there
another way to accomplish this that I just don't see?

We are using Jenkins to perform the builds.

Thanks,
Dan




Archive powered by MHonArc 2.6.16.

§