Cookbook versions


#1

I don’t know if I am just missing something obvious or what, but is there a way to download/update your cookbook without downloading it to a directory with the version number?

For example, if I download my latest java cookbook, it will download it to a directory called java-0.1.3 instead of just to the java directory. I have tried using the -d flag to specify the cookbooks/java directory, but it just downloads it to cookbooks/java/java-0.1.3.

If I then make modifications to the scripts in java-0.1.3 I have to copy the modifications to the java directory to actually upload the cookbook.

Any thoughts?

Thanks in advance!

Bridger Larson


#2

I created an “update” folder in my local copy of our repo. when I want to
update a cookbook version older then what’s in trunk I download the
cookbook to trunk (root of trunk, not the “cookbooks” folder") and then
move it to the update folder with the right name. I think tell knife to
upload it to the server from the upload folder (instead of looking for it
in my default cookbooks path):

cd trunk
knife cookbook download java 0.1.3
mv java-0.1.3 update/java
<make edits in update/java/>
knife cookbook upload java -o update/

MG

On Tue, Dec 4, 2012 at 1:43 PM, Bridger Larson <
Bridger.Larson@sirsidynix.com> wrote:

I don’t know if I am just missing something obvious or what, but is
there a way to download/update your cookbook without downloading it to a
directory with the version number?****


For example, if I download my latest java cookbook, it will download it to
a directory called java-0.1.3 instead of just to the java directory. I
have tried using the -d flag to specify the cookbooks/java directory, but
it just downloads it to cookbooks/java/java-0.1.3. ****


If I then make modifications to the scripts in java-0.1.3 I have to copy
the modifications to the java directory to actually upload the cookbook.**
**


Any thoughts?****


Thanks in advance!****


Bridger Larson****



#3

That is basically what I have been doing, but I have been copying the java-0.1.3 to the java cookbook then uploading java. I am still trying to learn how to work with cookbooks, so I recently found out I can just upload the java-0.1.3 directly, which made things a lot easier.

Thanks!

Bridger Larson

From: Michael Glenney [mailto:mike.glenney@gmail.com]
Sent: Tuesday, December 04, 2012 3:22 PM
To: chef@lists.opscode.com
Subject: [chef] Re: Cookbook versions

I created an “update” folder in my local copy of our repo. when I want to update a cookbook version older then what’s in trunk I download the cookbook to trunk (root of trunk, not the “cookbooks” folder") and then move it to the update folder with the right name. I think tell knife to upload it to the server from the upload folder (instead of looking for it in my default cookbooks path):

cd trunk
knife cookbook download java 0.1.3
mv java-0.1.3 update/java
<make edits in update/java/>
knife cookbook upload java -o update/

MG

On Tue, Dec 4, 2012 at 1:43 PM, Bridger Larson <Bridger.Larson@sirsidynix.commailto:Bridger.Larson@sirsidynix.com> wrote:
I don’t know if I am just missing something obvious or what, but is there a way to download/update your cookbook without downloading it to a directory with the version number?

For example, if I download my latest java cookbook, it will download it to a directory called java-0.1.3 instead of just to the java directory. I have tried using the -d flag to specify the cookbooks/java directory, but it just downloads it to cookbooks/java/java-0.1.3.

If I then make modifications to the scripts in java-0.1.3 I have to copy the modifications to the java directory to actually upload the cookbook.

Any thoughts?

Thanks in advance!

Bridger Larson