How to version to a role?

When I look at Cookbooks tab of the Chef WebUI, all my roles appear as
version 0.0.0

Is there a way that I can set the version for my roles or are they not
meant to have versions at all?

Cookbooks tab showing versions of "roles" doesn't make sense.

Look at the roles tab.

To the best of my knowledge, roles are not version-able at all.

--AJ

On 21 November 2011 21:31, Bryan Berry bryan.berry@gmail.com wrote:

When I look at Cookbooks tab of the Chef WebUI, all my roles appear as
version 0.0.0
Is there a way that I can set the version for my roles or are they not meant
to have versions at all?

They are meant not to have versions.

Think about it like this. You have a tool at your disposal to describe desired state, and to encode any kind of tricky transitions around how to move from one state to the next. You can either:

A) Encode those transitions in code
B) Encode those transitions in branches, dependencies, and version constraints

To put it more plainly, a Role should define attributes and run-lists for your infrastructure, and the run-lists may vary by environment. If you need to have custom code to make sure both an old and a new version of a component works, encode that in the recipes, rather than trying to obfuscate it with versions.

Best,
Adam


Opscode, Inc.
Adam Jacob, Chief Product Officer
T: (206) 619-7151 E: adam@opscode.com

On Nov 21, 2011, at 12:36 AM, AJ Christensen wrote:

Cookbooks tab showing versions of "roles" doesn't make sense.

Look at the roles tab.

To the best of my knowledge, roles are not version-able at all.

--AJ

On 21 November 2011 21:31, Bryan Berry bryan.berry@gmail.com wrote:

When I look at Cookbooks tab of the Chef WebUI, all my roles appear as
version 0.0.0
Is there a way that I can set the version for my roles or are they not meant
to have versions at all?

Adam, that makes perfect sense

I was just confused by the fact that the roles appear on the cookbooks tab
of the WebUI and that they all show the version number 0.0.0

On Mon, Nov 21, 2011 at 7:59 PM, Adam Jacob adam@opscode.com wrote:

They are meant not to have versions.

Think about it like this. You have a tool at your disposal to describe
desired state, and to encode any kind of tricky transitions around how to
move from one state to the next. You can either:

A) Encode those transitions in code
B) Encode those transitions in branches, dependencies, and version
constraints

To put it more plainly, a Role should define attributes and run-lists for
your infrastructure, and the run-lists may vary by environment. If you need
to have custom code to make sure both an old and a new version of a
component works, encode that in the recipes, rather than trying to
obfuscate it with versions.

Best,
Adam


Opscode, Inc.
Adam Jacob, Chief Product Officer
T: (206) 619-7151 E: adam@opscode.com

On Nov 21, 2011, at 12:36 AM, AJ Christensen wrote:

Cookbooks tab showing versions of "roles" doesn't make sense.

Look at the roles tab.

To the best of my knowledge, roles are not version-able at all.

--AJ

On 21 November 2011 21:31, Bryan Berry bryan.berry@gmail.com wrote:

When I look at Cookbooks tab of the Chef WebUI, all my roles appear as
version 0.0.0
Is there a way that I can set the version for my roles or are they not
meant
to have versions at all?

On Mon, Nov 21, 2011 at 11:08 AM, Bryan Berry bryan.berry@gmail.com wrote:

Adam, that makes perfect sense
I was just confused by the fact that the roles appear on the cookbooks tab
of the WebUI and that they all show the version number 0.0.0

That should not be the case. Perhaps someone has structured your
chef-repo in a funny way and then uploaded roles as cookbooks with no
metadata?

KC