Forum: CFEngine Help
Subject: Re: seek second thought
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,24549,24564#msg-24564

Can the binary update sequence be predicted?

The reason I ask is that I do policy updates in a rolling fashion, and this 
seems like it could be done in a similar way.  I store policy in a subversion 
server, and have a few class of servers (alpha, test, and production).  Each 
server pulls its config from either the alpha, test, or production location.  
When I tag a development release as "stable", I basically just do a "svn 
switch" (actually updating an "externals" property, but the effect is the same) 
in the alpha directory, which triggers the alpha servers to get the new policy. 
 After a while, I do the same in the test directory, and finally in the 
production directory.

The policy source is controlled by a variable.  I have a default_alpha, 
default_test and default_prducution variable, each with the path to the 
appropriate directory.  If the server is an alpha server, the "policy_source" 
is set to default_alpha, etc.  Then the update routine just pulls from 
update_source.

I also have a per-host configuration which contains another bundle.  The bundle 
is usually empty, but I can define an override_source variable.  The pre-update 
bundle checks to see if override_source is defined, and if so, it raises a 
class named source_overide_set (names may not be exactly what I use, but you 
get the picture).  So now, on the servers, I set policy_source to 
override_source if source_overide_set is defined, or I set policy_source to, 
say, default_alpha if the servertype_alpha class is raised *and* if 
source_overide_set is not set.

Extending upon that, you could easily have multiple similarly-structured binary 
directories, and switch between them based on server grouping or individual 
overrides, and do your updates by just copying (or, to save space, linking) the 
appropriate versions into the appropriate staging directories.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to