shrink hackers readme, allow cdist-deploy-to to be hacked

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-17 16:50:44 +01:00
parent bd026bad18
commit 6d38ae5f11
2 changed files with 15 additions and 38 deletions

View file

@ -23,44 +23,16 @@ eof
# Tell the user what we do, so this script makes sense during execution
set -x
# Abort on any error
set -e
# prepare use (only from top level directory)
export PATH="$PATH:$(pwd -P)/bin"
export __cdist_config="$(pwd -P)/conf"
__cdist_out_objects=/tmp/localhost/objects
__cdist_out_explorers=/tmp/localhost/explorers
__cdist_out_execs=/tmp/localhost/exec
# Change paths so we can debug stuff :-)
base=/tmp/localhost
export __cdist_out_objects=${base}/objects
export __cdist_out_explorers=${base}/explorers
export __cdist_out_execs=${base}/exec
cdist-deploy-to localhost
# Run explorer on a "remote" host
cdist-explorer-run localhost "$__cdist_out_explorers"
# Display result
find "$__cdist_out_explorers"
# Test first level manifest execution
cdist-manifest-init localhost "$__cdist_out_objects"
# See what it generated
find "$__cdist_out_objects"
# Generate all objects, including from types that generate objects as well
cdist-manifest-run-all localhost "$__cdist_out_objects"
# See what it generated
find "$__cdist_out_objects"
# Generate code for all objects in object dir
cdist-object-codegen-all localhost "$__cdist_out_objects" "$__cdist_out_execs"
# Display result, including permissions
ls -lR "$__cdist_out_execs"
# Transfer generated code
cdist-exec-transfer localhost "$__cdist_out_execs"
# Execute generated code
cdist-exec-run localhost
find "${base}"

View file

@ -23,13 +23,18 @@
. cdist-config
[ $# -eq 1 ] || __cdist_usage "<target host>"
set -e
__cdist_target_host="$1"
export __cdist_out_explorers="$__cdist_tmp_dir/$__cdist_name_explorer"
export __cdist_out_objects="$__cdist_tmp_dir/$__cdist_name_object"
export __cdist_out_execs="$__cdist_tmp_dir/$__cdist_name_exec"
: ${__cdist_out_explorers:="$__cdist_tmp_dir/$__cdist_name_explorer"}
: ${__cdist_out_objects:="$__cdist_tmp_dir/$__cdist_name_object"}
: ${__cdist_out_execs:="$__cdist_tmp_dir/$__cdist_name_exec"}
export __cdist_out_explorers
export __cdist_out_objects
export __cdist_out_execs
# See cdist-stages(7)
cdist-explorer-run "$__cdist_target_host" "$__cdist_out_explorers"