On Fri, Nov 22, 2013 at 11:32 AM, Eric Feldhusen
I took over an existing Chef server and it has several cookbooks with
multiple versions, with various environments locked to several of those
I now need to edit multiple cookbook versions to fix hardcoded items due to
changes in our environment and I was wondering what the best way to handle
making those changes would be?
I was thinking I could create various git branches on my workstation and
knife download the specific version, change the hardcode item(s), and force
a cookbook upload.
It’s not perfect, but it helps until I can move various servers/environments
to latest cookbook versions.
It sounds like you already understand the following, but just for
others on the list: It’s not best practice to upload the same version
of something after you change the code underneath (you don’t release
Microsoft Windows 2003 a hundred times for all the bug fixes, you make
a service pack).
Nevertheless, you can overwrite old versions of cookbooks on the Chef server:
- knife cookbook download my-cookbook X.Y.Z
- tar zxvf my-cookbook-X.Y.Z.tar.gz -C cookbooks
- knife cookbook upload my-cookbook # might need to --force if X.Y.Z
is frozen on the server
[ Julian C. Dunn firstname.lastname@example.org * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]