Some users and customers would like to maintain their own Design Center repo. It’s pretty simple if you copy and paste these commands to run them as root. Add -v to see debug output if something goes wrong.
For example, say we start with Utilities::Roles. Copy the roles directory from the Design Center (/var/cfengine/share/*Base/sketches/utilities/roles) to /my/repo/sketches and edit sketch.json and main.cf as needed, let’s say changing the list of roles.
cp -rp /var/cfengine/share/*Base/sketches/utilities/roles /my/repo/sketches/
cp -rp /var/cfengine/share/*Base/sketches/sketch_template /my/repo/sketches/
This will fail if the sketch.json files found are invalid, or if /my/repo/sketches doesn’t exist. It creates the sketch index file.
/var/cfengine/design-center/bin/cf-sketch --make_cfsketches --inputs /my/repo --is=/my/repo/sketches/cfsketches.json
This will regenerate the README.md files for each sketch, which will please your users.
/var/cfengine/design-center/bin/cf-sketch --make_readme --is=/my/repo/sketches/cfsketches.json
/var/cfengine/design-center/bin/cf-sketch --install-all --is=/my/repo/sketches/cfsketches.json --inputs=/var/cfengine/design-center
See also: [Package The Sketch][Write a new Sketch#Package The Sketch]