2011-02-14 10:16:50 +00:00
|
|
|
cat << eof
|
|
|
|
|
2010-12-01 19:06:07 +00:00
|
|
|
Hey hackers,
|
|
|
|
|
2011-03-04 10:09:52 +00:00
|
|
|
this README is for you, for those who want to dig into cdist, hack it or try
|
|
|
|
to get a deeper understanding.
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-03-04 10:09:52 +00:00
|
|
|
A lot of documentation is still missing, but running cdist-quickstart should
|
|
|
|
give you an impression of how cdist works.
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-03-04 10:09:52 +00:00
|
|
|
I hope you have a lot of fun with cdist, because it was also a lot of fun to
|
|
|
|
develop it!
|
|
|
|
|
|
|
|
-- Nico, 20110304
|
2010-12-01 19:06:07 +00:00
|
|
|
|
|
|
|
|
2011-02-26 10:38:01 +00:00
|
|
|
## Conventions
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-02-26 10:38:01 +00:00
|
|
|
- All variables exported by cdist are prefixed with a double underscore (__)
|
|
|
|
- All cdist-internal variables are prefixed with __cdist_ and are generally not exported.
|
|
|
|
|
|
|
|
## Running cdist when developing
|
|
|
|
|
|
|
|
This file is suitable for execution and saving the objects and
|
|
|
|
explorers from cdist. I usually do it like this:
|
2011-02-17 15:13:35 +00:00
|
|
|
|
2011-03-03 08:49:19 +00:00
|
|
|
% ./HACKERS_README
|
2011-02-14 10:16:50 +00:00
|
|
|
|
2011-02-26 10:38:01 +00:00
|
|
|
################################################################################
|
2011-02-14 10:16:50 +00:00
|
|
|
eof
|
|
|
|
|
2011-02-17 15:26:48 +00:00
|
|
|
set -x
|
2011-02-26 10:39:13 +00:00
|
|
|
# Tell the user what we do, so this script makes sense during execution
|
2011-02-17 15:26:48 +00:00
|
|
|
|
2011-02-17 08:16:44 +00:00
|
|
|
# prepare use (only from top level directory)
|
2010-12-01 19:06:07 +00:00
|
|
|
export PATH="$PATH:$(pwd -P)/bin"
|
2011-02-23 18:01:29 +00:00
|
|
|
export __cdist_conf_dir="$(pwd -P)/conf"
|
2011-02-17 08:16:44 +00:00
|
|
|
|
2011-03-02 17:58:16 +00:00
|
|
|
# Allow user to supply hostname
|
2011-02-19 00:44:24 +00:00
|
|
|
target="${1:-localhost}"
|
2011-02-26 10:39:13 +00:00
|
|
|
|
2011-03-02 17:58:16 +00:00
|
|
|
# And use hostname as basedir (dangerous, but hackers know what they do)
|
|
|
|
export __cdist_local_base_dir="/tmp/$target"
|
|
|
|
|
2011-02-26 10:39:13 +00:00
|
|
|
# Run the real script
|
2011-02-19 00:44:24 +00:00
|
|
|
cdist-deploy-to "$target"
|
2011-02-17 14:35:56 +00:00
|
|
|
|
2011-02-26 10:39:13 +00:00
|
|
|
# Display results
|
2011-02-23 18:05:46 +00:00
|
|
|
find "${__cdist_local_base_dir}"
|