shrink hackers readme, allow cdist-deploy-to to be hacked
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
bd026bad18
commit
6d38ae5f11
2 changed files with 15 additions and 38 deletions
|
@ -23,44 +23,16 @@ eof
|
||||||
# Tell the user what we do, so this script makes sense during execution
|
# Tell the user what we do, so this script makes sense during execution
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Abort on any error
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# prepare use (only from top level directory)
|
# prepare use (only from top level directory)
|
||||||
export PATH="$PATH:$(pwd -P)/bin"
|
export PATH="$PATH:$(pwd -P)/bin"
|
||||||
export __cdist_config="$(pwd -P)/conf"
|
export __cdist_config="$(pwd -P)/conf"
|
||||||
|
|
||||||
__cdist_out_objects=/tmp/localhost/objects
|
# Change paths so we can debug stuff :-)
|
||||||
__cdist_out_explorers=/tmp/localhost/explorers
|
base=/tmp/localhost
|
||||||
__cdist_out_execs=/tmp/localhost/exec
|
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
|
find "${base}"
|
||||||
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
|
|
||||||
|
|
|
@ -23,13 +23,18 @@
|
||||||
|
|
||||||
. cdist-config
|
. cdist-config
|
||||||
[ $# -eq 1 ] || __cdist_usage "<target host>"
|
[ $# -eq 1 ] || __cdist_usage "<target host>"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
__cdist_target_host="$1"
|
__cdist_target_host="$1"
|
||||||
|
|
||||||
export __cdist_out_explorers="$__cdist_tmp_dir/$__cdist_name_explorer"
|
: ${__cdist_out_explorers:="$__cdist_tmp_dir/$__cdist_name_explorer"}
|
||||||
export __cdist_out_objects="$__cdist_tmp_dir/$__cdist_name_object"
|
: ${__cdist_out_objects:="$__cdist_tmp_dir/$__cdist_name_object"}
|
||||||
export __cdist_out_execs="$__cdist_tmp_dir/$__cdist_name_exec"
|
: ${__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)
|
# See cdist-stages(7)
|
||||||
cdist-explorer-run "$__cdist_target_host" "$__cdist_out_explorers"
|
cdist-explorer-run "$__cdist_target_host" "$__cdist_out_explorers"
|
||||||
|
|
Loading…
Reference in a new issue