mega cleaunp discussion commit :-)
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
d171ad5e64
commit
4b5d7dda25
40 changed files with 84 additions and 67 deletions
|
@ -9,13 +9,13 @@ Do not believe anything written in cdist, besides what's written in this file
|
|||
-- Nico, 20101201
|
||||
|
||||
|
||||
What you can do so far:
|
||||
What you can do so far: (executed from top level directory)
|
||||
|
||||
# prepare use:
|
||||
export PATH="$PATH:$(pwd -P)/bin"
|
||||
|
||||
# Test first level manifest execution
|
||||
__cdist_config=$(pwd -P)/conf __cdist_target_host=ikq02.ethz.ch cdist-manifest-init
|
||||
__cdist_config=$(pwd -P)/conf __cdist_target_host=ikq02.ethz.ch cdist-manifest-init
|
||||
|
||||
# See what it generated
|
||||
find conf/cache
|
||||
|
|
10
TODO
10
TODO
|
@ -6,6 +6,7 @@
|
|||
- cdist-push-pull
|
||||
- cdist-quickstart
|
||||
- cdist-types [IMPORTANT]
|
||||
- cdist.text [IMPORTANT]
|
||||
- add terminology
|
||||
- define steps within configuration apply
|
||||
- detect impossible/unsafe things:
|
||||
|
@ -14,12 +15,11 @@
|
|||
- and report location of occurence
|
||||
- parse afterwards?
|
||||
- multi master setups
|
||||
|
||||
- how to define templates
|
||||
- variable substitution from shell may be problematic
|
||||
- templating
|
||||
- how to define templates
|
||||
- variable substitution from shell may be problematic
|
||||
- SHELL SCRIPTS! (executables? do not support?)
|
||||
- stdout
|
||||
- cleanup / integrate doc/man/cdist.text
|
||||
- stdout == output of template == what will be used
|
||||
- cdist-explore
|
||||
- add more stuff to explore
|
||||
- write manpage
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2010 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# Apply configuration to local host
|
||||
#
|
||||
|
||||
. cdist-config
|
||||
|
||||
whereiam="$(cdist_explore_hostname)"
|
||||
conf="${CDIST_HOSTS}/${whereiam}"
|
||||
|
||||
if [ ! -d "${conf}" ]; then
|
||||
echo "Sorry, ${whereiam} has no configuration"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run the manifest, but abort on first error
|
||||
set -e
|
||||
|
||||
# change to config dir, to be able to use relative filenames
|
||||
cd "${conf}"
|
||||
|
||||
# And apply the stuff
|
||||
. "${conf}/manifest"
|
|
@ -1,2 +1,4 @@
|
|||
setenv PATH ${PATH}:${HOME}/cdist/bin
|
||||
setenv CDIST_CONFIG ${HOME}/cdist/conf
|
||||
export PATH=$PATH:$HOME/cdist/bin
|
||||
export CDIST_CONFIG=$HOME/cdist/conf
|
|
@ -8,7 +8,7 @@ conf/manifests/init
|
|||
will be available for tracking in
|
||||
cdist core functions
|
||||
|
||||
core/manifests/* (all other)
|
||||
conf/manifests/* (all other)
|
||||
- same function as above
|
||||
- but won't be called by cdist
|
||||
- method to seperate configuration parts
|
||||
|
@ -26,9 +26,8 @@ conf/types/<name>/
|
|||
but more like reusable defines
|
||||
- or may implement some functionality on their own
|
||||
|
||||
lib/types/<name>/
|
||||
- same as above, but provided by the cdist distribution
|
||||
- if name exists in both, conf/ has priority
|
||||
conf/explorers/<name>
|
||||
- explorers to be run on the target hosts
|
||||
|
||||
Differences manifests vs. types
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
1) safer and fast version
|
||||
cat blob | ssh host > tmp;
|
||||
for var in ...
|
||||
var=grep ^var= tmp
|
||||
2) slow & secure
|
||||
for var in ...
|
||||
eval var=$(cat single_blob | ssh host"
|
||||
|
||||
3) easy & insecure
|
||||
cat blob | ssh host > tmp; . tmp
|
||||
|
||||
4) - rsync here/explorers target/explorers
|
||||
- ssh target_host for explorer in target/explorers/; do
|
||||
target/explorers/$explorer > target/cache/explorers/$explorer
|
||||
done
|
||||
- rsync target/cache/explorers here/cache/explorers....
|
||||
- MINUS RSYNC!!!!!!!!!??????????
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
TO_MAN: EXPLORER VALUES ARE UNTRUSTED (think of webclients and webapps)
|
||||
|
50
doc/internal.REMOVE_PRE_1.0/logs/2011-02-03
Normal file
50
doc/internal.REMOVE_PRE_1.0/logs/2011-02-03
Normal file
|
@ -0,0 +1,50 @@
|
|||
Steven:
|
||||
|
||||
- cdist-deploy-to = main script
|
||||
- all user usable variables are defined using export __var=...
|
||||
- cdist-explorer return one line of output (or empty)
|
||||
- cdist-manifest-init: generates what the user defined to be configured on target host
|
||||
- HACKERS_README == starting point (until 1.0)
|
||||
- [12:49] kr:cdist% __cdist_config=$(pwd -P)/conf __cdist_target_host=ikq02.ethz.ch cdist-manifest-init
|
||||
- cdist_tree_wrapper == non-user-binary => libexec
|
||||
- conf/explorer collection of explorer
|
||||
- config-layout: current status of configuration
|
||||
- needs to go into manpage
|
||||
- TODO: contains most up-to-date todo stuff, mid-term
|
||||
- ROADMAP: next steps
|
||||
- Documentation must be bit better than excellent at first release
|
||||
- test/: ignore (braindump and pre-braindump)
|
||||
- conf/
|
||||
cache: generated
|
||||
explorer: ok => contains explores
|
||||
lib: deprecated (does not exist)
|
||||
manifests: entry point for config2host
|
||||
types: cdist-types(7)
|
||||
- alternative names for explorer:
|
||||
- probe
|
||||
- fact
|
||||
- ...
|
||||
- => STEVEN TO DECIDE
|
||||
- explorer / execution:
|
||||
- see explorer-implementation-ideas.TO_FINISH_AND_DELETE
|
||||
|
||||
Todo:
|
||||
- cdist-preprocess:
|
||||
- fix call to cdist-build-explorer and transfer explorer to target host
|
||||
- cdist-manifest-init/ cdist_tree_wrapper:
|
||||
- fails on second run => use different cache! (old cache exists until new is valid!)
|
||||
- .source in cdist_tree_wrapper records wrong source!
|
||||
- cdist-config:
|
||||
- use export to mark user available variables!
|
||||
- doc/man/* => defined in TODO
|
||||
|
||||
|
||||
Future:
|
||||
- ids containing slashes for easier use in types?
|
||||
- a) __file abc --source /path/from/abc --destination /path/to/abc
|
||||
- b) id=abc
|
||||
__file $id --source /path/from/$id --destination /path/to/$id
|
||||
- c) __file abc --sourcedir /path/from/ --destination_dir /path/to/
|
||||
- type file defines that id is implicitly used when --...dir variants used
|
||||
- d) __file /path/to/abc --source ? --destination ?
|
||||
- reusing id with slashes would be nice
|
|
@ -1,12 +0,0 @@
|
|||
1) safer and fast version
|
||||
cat blob | ssh host > tmp;
|
||||
for var in ...
|
||||
var=grep ^var= tmp
|
||||
2) slow & secure
|
||||
for var in ...
|
||||
eval var=$(cat single_blob | ssh host"
|
||||
|
||||
3) easy & insecure
|
||||
cat blob | ssh host > tmp; . tmp
|
||||
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
export PATH=$PATH:$HOME/cdist/bin
|
||||
export CDIST_CONFIG=$HOME/cdist/conf
|
|
@ -1 +0,0 @@
|
|||
$0 evaluated in a sourced script returns name of the caller.
|
Loading…
Reference in a new issue