This repository was archived by the owner on Jul 14, 2021. It is now read-only.
Roles and Environments should have identical implementations #182
Labels
Type: Enhancement
Adds new functionality.
They're basically the same right now, but environments support cookbook version pinning and roles do not (at least not without the hacky equality pinning in the run_list). If they were normalized, then the distinction between them would go away. Environments could ideally then be just dropped and sites could use
role[production]
.role[development]
, etc. We'd still probably keep them around because people want a thing called 'environment' that matches their 'development/test/integration/production' workflow.Right now environments are bad because its a 1-1 mapping and results in sites having to decide up front what their strategy will be and then they will get locked in. You see sites where they start mixing in datacenters and canaries and all kinds of other dimensions into the environment in order to get their deployment cells.
The difference is that before you might have a server with:
The result is a large number of environments to manage as we have the cross product of all the dimensions expressed in the environment. Each item in the cross product is another cell to manage.
And afterwards:
Now we don't have to manage and name the cross product of the things, we just manage the axes and then they get mixed in. That keeps 'environment' as the name for the thing people expect (or they could drop it entirely), and then also allows the rest of the matrix to expand organically. If the company fragments and they need to add logical business units to the run_list to segregate companies-within-a-company then they can just add another role to all the servers that maps to the business units, etc.
The text was updated successfully, but these errors were encountered: