Merge remote-tracking branch 'sans/master'
This commit is contained in:
commit
1be5a01a1e
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -6,7 +6,9 @@ doc/man/.marker
|
||||||
doc/man/man1/*.1
|
doc/man/man1/*.1
|
||||||
doc/man/man7/*.7
|
doc/man/man7/*.7
|
||||||
doc/man/man*/*.html
|
doc/man/man*/*.html
|
||||||
|
doc/man/man*/*.xml
|
||||||
doc/man/man7/cdist-type__*.text
|
doc/man/man7/cdist-type__*.text
|
||||||
|
doc/man/man7/cdist-reference.text
|
||||||
doc/man/man*/docbook-xsl.css
|
doc/man/man*/docbook-xsl.css
|
||||||
|
|
||||||
# Ignore cache for version control
|
# Ignore cache for version control
|
||||||
|
|
|
@ -55,7 +55,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
|
||||||
: ${__cdist_name_manifest:=manifest}
|
: ${__cdist_name_manifest:=manifest}
|
||||||
: ${__cdist_name_object:=object}
|
: ${__cdist_name_object:=object}
|
||||||
: ${__cdist_name_object_finished:=done}
|
: ${__cdist_name_object_finished:=done}
|
||||||
: ${__cdist_name_object_processed:=processed}
|
: ${__cdist_name_object_prepared:=prepared}
|
||||||
: ${__cdist_name_object_id:=object_id}
|
: ${__cdist_name_object_id:=object_id}
|
||||||
: ${__cdist_name_object_source:=source}
|
: ${__cdist_name_object_source:=source}
|
||||||
: ${__cdist_name_objects_created:=.objects_created}
|
: ${__cdist_name_objects_created:=.objects_created}
|
||||||
|
@ -210,9 +210,9 @@ __cdist_object_code()
|
||||||
echo "$(__cdist_object_dir "$1")/${__cdist_name_code}"
|
echo "$(__cdist_object_dir "$1")/${__cdist_name_code}"
|
||||||
}
|
}
|
||||||
|
|
||||||
__cdist_object_processed()
|
__cdist_object_prepared()
|
||||||
{
|
{
|
||||||
echo "$(__cdist_object_dir "$1")/${__cdist_name_object_processed}"
|
echo "$(__cdist_object_dir "$1")/${__cdist_name_object_prepared}"
|
||||||
}
|
}
|
||||||
|
|
||||||
__cdist_object_finished()
|
__cdist_object_finished()
|
||||||
|
|
|
@ -49,7 +49,7 @@ cdist-dir push "$__cdist_target_host" \
|
||||||
"${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}"
|
"${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}"
|
||||||
cdist-explorer-run-global "$__cdist_target_host"
|
cdist-explorer-run-global "$__cdist_target_host"
|
||||||
cdist-manifest-run-init "$__cdist_target_host"
|
cdist-manifest-run-init "$__cdist_target_host"
|
||||||
cdist-object-all "$__cdist_target_host" cdist-object-process
|
cdist-object-all "$__cdist_target_host" cdist-object-prepare
|
||||||
cdist-object-all "$__cdist_target_host" cdist-object-run
|
cdist-object-all "$__cdist_target_host" cdist-object-run
|
||||||
cdist-cache "$__cdist_target_host"
|
cdist-cache "$__cdist_target_host"
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,13 @@ __cdist_object_dir="$(__cdist_object_dir "$__cdist_object")"
|
||||||
# Export to non-core for use in manifest and gencode scripts
|
# Export to non-core for use in manifest and gencode scripts
|
||||||
export $__cdist_name_var_self=$__cdist_object
|
export $__cdist_name_var_self=$__cdist_object
|
||||||
|
|
||||||
__cdist_object_processed="$(__cdist_object_processed "$__cdist_object")"
|
__cdist_object_prepared="$(__cdist_object_prepared "$__cdist_object")"
|
||||||
if [ ! -f "$__cdist_object_processed" ]; then
|
if [ ! -f "$__cdist_object_prepared" ]; then
|
||||||
echo
|
echo
|
||||||
echo "Processing object $__cdist_object"
|
echo "Preparing object $__cdist_object"
|
||||||
cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object"
|
cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object"
|
||||||
cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object"
|
cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object"
|
||||||
|
|
||||||
# Mark this object as processed
|
# Mark this object as prepared
|
||||||
touch "$__cdist_object_processed"
|
touch "$__cdist_object_prepared"
|
||||||
fi
|
fi
|
6
build.sh
6
build.sh
|
@ -57,12 +57,12 @@ case "$1" in
|
||||||
for src in ${MANDIR}/man${section}/*.text; do
|
for src in ${MANDIR}/man${section}/*.text; do
|
||||||
manpage="${src%.text}.$section"
|
manpage="${src%.text}.$section"
|
||||||
if [ ! -f "$manpage" -o "$manpage" -ot "$src" ]; then
|
if [ ! -f "$manpage" -o "$manpage" -ot "$src" ]; then
|
||||||
echo "Compiling manpage for $src"
|
echo "Compiling man page for $src"
|
||||||
$A2XM "$src"
|
$A2XM "$src"
|
||||||
fi
|
fi
|
||||||
htmlpage="${src%.text}.html"
|
htmlpage="${src%.text}.html"
|
||||||
if [ ! -f "$htmlpage" -o "$htmlpage" -ot "$src" ]; then
|
if [ ! -f "$htmlpage" -o "$htmlpage" -ot "$src" ]; then
|
||||||
echo "Compiling html for $src"
|
echo "Compiling html page for $src"
|
||||||
$A2XH "$src"
|
$A2XH "$src"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -99,7 +99,7 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
clean)
|
clean)
|
||||||
rm -f ${MANDIR}/cdist-reference.text
|
rm -f ${MAN7DSTDIR}/cdist-reference.text
|
||||||
find "${MANDIR}" -mindepth 2 -type l \
|
find "${MANDIR}" -mindepth 2 -type l \
|
||||||
-o -name "*.1" \
|
-o -name "*.1" \
|
||||||
-o -name "*.7" \
|
-o -name "*.7" \
|
||||||
|
|
|
@ -16,7 +16,6 @@ CORE
|
||||||
|
|
||||||
- cdist-object-gencode: remove code if output empty?
|
- cdist-object-gencode: remove code if output empty?
|
||||||
- also take care of that in cdist-code-run!
|
- also take care of that in cdist-code-run!
|
||||||
- cdist-object-process -> cdist-object-prepare
|
|
||||||
- Remove cdist-object-push, covers only one line and is used only once:
|
- Remove cdist-object-push, covers only one line and is used only once:
|
||||||
[20:22] kr:bin% grep cdist-object-push *
|
[20:22] kr:bin% grep cdist-object-push *
|
||||||
cdist-object-run: cdist-object-push "$__cdist_target_host" "$__cdist_object"
|
cdist-object-run: cdist-object-push "$__cdist_target_host" "$__cdist_object"
|
||||||
|
|
4
doc/man/.gitignore
vendored
4
doc/man/.gitignore
vendored
|
@ -1,4 +0,0 @@
|
||||||
cdist.7
|
|
||||||
*.html
|
|
||||||
cdist-design.7
|
|
||||||
cdist-reference.text
|
|
|
@ -23,7 +23,7 @@ called stages. It is intented to run either from the command line or from cron.
|
||||||
ENVIRONMENT
|
ENVIRONMENT
|
||||||
-----------
|
-----------
|
||||||
If the environment variable **__cdist_conf_dir** is not set, the
|
If the environment variable **__cdist_conf_dir** is not set, the
|
||||||
configuration is read from /etc/cdist. The local output directory can
|
configuration is read from <git-checkout>/conf. The local output directory can
|
||||||
be changed by the variable **__cdist_local_base_dir**. All environment
|
be changed by the variable **__cdist_local_base_dir**. All environment
|
||||||
variables are handled by cdist-config.
|
variables are handled by cdist-config.
|
||||||
|
|
||||||
|
|
31
doc/man/man1/cdist-object-all.text
Normal file
31
doc/man/man1/cdist-object-all.text
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
cdist-object-all(1)
|
||||||
|
===================
|
||||||
|
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||||
|
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
cdist-object-all - Run the given command on all objects
|
||||||
|
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
cdist-object-all HOSTNAME COMMAND
|
||||||
|
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
Iterates over all defined objects and executes the given command on each
|
||||||
|
of them.
|
||||||
|
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
- cdist(7)
|
||||||
|
- cdist-type(1)
|
||||||
|
|
||||||
|
|
||||||
|
COPYING
|
||||||
|
-------
|
||||||
|
Copyright \(C) 2011 Steven Armstrong. Free use of this software is
|
||||||
|
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
|
@ -21,7 +21,7 @@ Execute the local and remote code for the given object.
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
- cdist(7)
|
- cdist(7)
|
||||||
- cdist-object-run-all(1)
|
- cdist-object-run(1)
|
||||||
- cdist-code-run(1)
|
- cdist-code-run(1)
|
||||||
- cdist-run-remote(1)
|
- cdist-run-remote(1)
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ SEE ALSO
|
||||||
--------
|
--------
|
||||||
- cdist(7)
|
- cdist(7)
|
||||||
- cdist-code-run(1)
|
- cdist-code-run(1)
|
||||||
- cdist-object-run-all(1)
|
- cdist-object-run(1)
|
||||||
- cdist-object-gencode(1)
|
- cdist-object-gencode(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
35
doc/man/man1/cdist-object-prepare.text
Normal file
35
doc/man/man1/cdist-object-prepare.text
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
cdist-object-prepare(1)
|
||||||
|
=======================
|
||||||
|
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||||
|
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
cdist-object-prepare - Prepare an object
|
||||||
|
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
cdist-object-prepare HOSTNAME OBJECT
|
||||||
|
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
Prepare the given object by running it through stage 3 (object information
|
||||||
|
retrieval) and stage 4 (run the object manifest).
|
||||||
|
See related man pages for details.
|
||||||
|
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
- cdist(7)
|
||||||
|
- cdist-stages(7)
|
||||||
|
- cdist-object-explorer-run(1)
|
||||||
|
- cdist-object-manifest-run(1)
|
||||||
|
- cdist-type(1)
|
||||||
|
|
||||||
|
|
||||||
|
COPYING
|
||||||
|
-------
|
||||||
|
Copyright \(C) 2011 Steven Armstrong. Free use of this software is granted
|
||||||
|
under the terms of the GNU General Public License version 3 (GPLv3).
|
|
@ -21,7 +21,7 @@ Transfers the given object to the target host.
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
- cdist(7)
|
- cdist(7)
|
||||||
- cdist-object-run-all(1)
|
- cdist-object-run(1)
|
||||||
- cdist-type(1)
|
- cdist-type(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
cdist-object-run-all(1)
|
|
||||||
=======================
|
|
||||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
|
||||||
|
|
||||||
|
|
||||||
NAME
|
|
||||||
----
|
|
||||||
cdist-object-run-all - Run all created objects on the target host
|
|
||||||
|
|
||||||
|
|
||||||
SYNOPSIS
|
|
||||||
--------
|
|
||||||
cdist-object-run-all HOSTNAME
|
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTION
|
|
||||||
-----------
|
|
||||||
Transfers type explorers to the target then runs cdist-object-run(1)
|
|
||||||
for each created object.
|
|
||||||
|
|
||||||
|
|
||||||
SEE ALSO
|
|
||||||
--------
|
|
||||||
- cdist(7)
|
|
||||||
- cdist-type-explorer-push(1)
|
|
||||||
- cdist-object-run(1)
|
|
||||||
- cdist-type(1)
|
|
||||||
|
|
||||||
|
|
||||||
COPYING
|
|
||||||
-------
|
|
||||||
Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is
|
|
||||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
|
|
@ -1,6 +1,6 @@
|
||||||
cdist-object-run(1)
|
cdist-object-run(1)
|
||||||
===================
|
===================
|
||||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||||
|
|
||||||
|
|
||||||
NAME
|
NAME
|
||||||
|
@ -15,15 +15,15 @@ cdist-object-run HOSTNAME OBJECT
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
Runs the given object on the given target host.
|
Applies the given object on the target host by running it through stage 5
|
||||||
The different subtasks are dispatched to specialized exectuables.
|
(code generation) and stage 6 (code execution).
|
||||||
See related man pages for details.
|
See related man pages for details.
|
||||||
|
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
- cdist(7)
|
- cdist(7)
|
||||||
- cdist-object-explorer-run(1)
|
- cdist-stages(7)
|
||||||
- cdist-object-gencode-run(1)
|
- cdist-object-gencode-run(1)
|
||||||
- cdist-object-push(1)
|
- cdist-object-push(1)
|
||||||
- cdist-object-code-run(1)
|
- cdist-object-code-run(1)
|
||||||
|
@ -32,5 +32,5 @@ SEE ALSO
|
||||||
|
|
||||||
COPYING
|
COPYING
|
||||||
-------
|
-------
|
||||||
Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is
|
Copyright \(C) 2011 Steven Armstrong. Free use of this software is
|
||||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
||||||
|
|
|
@ -11,8 +11,8 @@ DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
Starting the execution of deployment with cdist-deploy-to(1), cdist passes
|
Starting the execution of deployment with cdist-deploy-to(1), cdist passes
|
||||||
through different stages, each can be triggered and debugged on its own.
|
through different stages, each can be triggered and debugged on its own.
|
||||||
Reading the source of the cdist-deploy-to and cdist-object-run-all executables
|
Reading the source of the cdist-deploy-to executable shows the scripts
|
||||||
shows the scripts responsible for each stage.
|
responsible for each stage.
|
||||||
|
|
||||||
|
|
||||||
STAGE 0: INTERNAL PREPERATION
|
STAGE 0: INTERNAL PREPERATION
|
||||||
|
@ -56,7 +56,7 @@ STAGE 3: OBJECT INFORMATION RETRIEVAL
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
Every object is checked whether its type has explorers and if so, these are
|
Every object is checked whether its type has explorers and if so, these are
|
||||||
transfered to the target host and executed. The results are transfered back
|
transfered to the target host and executed. The results are transfered back
|
||||||
and can be used in the following stages to decide what changes need to made
|
and can be used in the following stages to decide what changes need to be made
|
||||||
on the target to implement the desired state.
|
on the target to implement the desired state.
|
||||||
|
|
||||||
Related documentation:
|
Related documentation:
|
||||||
|
@ -68,10 +68,9 @@ Related documentation:
|
||||||
|
|
||||||
STAGE 4: RUN THE OBJECT MANIFEST
|
STAGE 4: RUN THE OBJECT MANIFEST
|
||||||
--------------------------------
|
--------------------------------
|
||||||
Every object is checked whether its type has a manifest file. If the type has
|
Every object is checked whether its type has a executable manifest. The
|
||||||
a manifest file and it is executable, it will be executed. The manifest script
|
manifest script may generate and change the created objects. In other words,
|
||||||
may generate and change the created objects. In other words, one type can reuse
|
one type can reuse other types.
|
||||||
other types.
|
|
||||||
|
|
||||||
For instance the object __apache/www.test.ch is of type __apache, which may
|
For instance the object __apache/www.test.ch is of type __apache, which may
|
||||||
contain a manifest script, which creates new objects of type __file.
|
contain a manifest script, which creates new objects of type __file.
|
||||||
|
@ -88,11 +87,10 @@ Related documentation:
|
||||||
|
|
||||||
STAGE 5: CODE GENERATION
|
STAGE 5: CODE GENERATION
|
||||||
------------------------
|
------------------------
|
||||||
In this stage for every created objects its type is checked whether it has a
|
In this stage for every created object its type is checked for executable
|
||||||
gencode script. If the type has a gencode script and it is executable it will
|
gencode scripts. The gencode scripts generate the code to be executed on the
|
||||||
be executed. This executable should create code to be executed on the target
|
target on stdout. If the gencode executables fail, they must print diagnostic
|
||||||
on stdout. If the gencode executable fails, it must print diagnostic messages
|
messages on stderr and exit non-zero.
|
||||||
on stderr and exit non-zero.
|
|
||||||
|
|
||||||
Related documentation:
|
Related documentation:
|
||||||
- cdist-object-gencode-run(1)
|
- cdist-object-gencode-run(1)
|
||||||
|
|
Loading…
Reference in a new issue