Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>remotes/origin/1.0
parent
d171ad5e64
commit
4b5d7dda25
@ -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 |
@ -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) |
||||
|
@ -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 new issue