doc -> docs (pypi)

Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
Nico Schottelius 2012-10-25 17:17:52 +02:00
commit 6d1e4d06cf
133 changed files with 12 additions and 12 deletions

23
docs/dev/benchmark-oprofile Executable file
View file

@ -0,0 +1,23 @@
#!/bin/sh -x
# Cleanup
opcontrol --no-vmlinux
opcontrol --stop
opcontrol --shutdown
opcontrol --reset
# Record all calls
opcontrol --separate=none
# NMI conflicts with oprofile
echo 0 > /proc/sys/kernel/nmi_watchdog
# Select events to be recorded
opcontrol --event=CPU_CLK_UNHALTED:30000:0:1:1
opcontrol --start
# The actual programm
"$@"
opcontrol --stop
opcontrol --dump
echo "Output: opreport -l"

View file

@ -0,0 +1,12 @@
#!/bin/sh
outfile="$1"; shift
(
for host in "$@"; do
hosts="$hosts $host"
cdist config -c ~/p/cdist-nutzung -p $hosts 2>&1
done
) | tee "$outfile"
echo "----------"
grep 'INFO: Total processing time for' "$outfile" | sed 's/.*: //'

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

7
docs/dev/fancy-ideas Normal file
View file

@ -0,0 +1,7 @@
== types with namespaces ==
- allow types to have namespaces, e.g.
__path/my/type
implemented as a proof of concept at:
https://github.com/asteven/cdist/tree/type-namespaces

108
docs/dev/git-post-commit-hook Executable file
View file

@ -0,0 +1,108 @@
#!/usr/bin/env bash
# Distributed under the terms of the GNU General Public License v2
# Copyright (c) 2006 Fernando J. Pereda <ferdy@gentoo.org>
#
# Git CIA bot in bash. (no, not the POSIX shell, bash).
# It is *heavily* based on Git ciabot.pl by Petr Baudis.
#
# It is meant to be run either on a post-commit hook or in an update
# hook:
#
# post-commit: It parses latest commit and current HEAD to get the
# information it needs.
#
# update: You have to call it once per merged commit:
#
# refname=$1
# oldhead=$2
# newhead=$3
# for merged in $(git rev-list ${oldhead}..${newhead} | tac) ; do
# /path/to/ciabot.bash ${refname} ${merged}
# done
#
# The project as known to CIA
project="cdist"
# Set to true if you want the full log to be sent
noisy=false
# Addresses for the e-mail
from="nico-cia.vc@schottelius.org"
to="cia@cia.vc"
# SMTP client to use
sendmail="/usr/sbin/sendmail -f ${from} ${to}"
# Changeset URL
url="http://git.schottelius.org/?p=${project};a=commit;h=@@sha1@@"
# You shouldn't be touching anything else.
if [[ $# = 0 ]] ; then
refname=$(git symbolic-ref HEAD 2>/dev/null)
merged=$(git rev-parse HEAD)
else
refname=$1
merged=$2
fi
refname=${refname##refs/heads/}
gitver=$(git --version)
gitver=${gitver##* }
rev=$(git describe ${merged} 2>/dev/null)
[[ -z ${rev} ]] && rev=${merged:0:12}
rawcommit=$(git cat-file commit ${merged})
author=$(sed -n -e '/^author .*<\([^@]*\).*$/s--\1-p' \
<<< "${rawcommit}")
logmessage=$(sed -e '1,/^$/d' <<< "${rawcommit}")
${noisy} || logmessage=$(head -n 1 <<< "${logmessage}")
logmessage=${logmessage//&/&amp;}
logmessage=${logmessage//</&lt;}
logmessage=${logmessage//>/&gt;}
ts=$(sed -n -e '/^author .*> \([0-9]\+\).*$/s--\1-p' \
<<< "${rawcommit}")
out="
<message>
<generator>
<name>CIA Bash client for Git</name>
<version>${gitver}</version>
<url>http://dev.gentoo.org/~ferdy/stuff/ciabot.bash</url>
</generator>
<source>
<project>${project}</project>
<branch>${refname}</branch>
</source>
<timestamp>${ts}</timestamp>
<body>
<commit>
<author>${author}</author>
<revision>${rev}</revision>
<files>
$(git diff-tree -r --name-only ${merged} |
sed -e '1d' -e 's-.*-<file>&</file>-')
</files>
<log>
${logmessage}
</log>
<url>${url//@@sha1@@/${merged}}</url>
</commit>
</body>
</message>"
${sendmail} << EOM
Message-ID: <${merged:0:12}.${author}@${project}>
From: ${from}
To: ${to}
Content-type: text/xml
Subject: DeliverXML
${out}
EOM
# vim: set tw=70 :

22
docs/dev/header Executable file
View file

@ -0,0 +1,22 @@
#!/bin/sh
#
# 2011 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/>.
#
#
# USEFUL DESCRIPTION
#

24
docs/dev/lastchanges Executable file
View file

@ -0,0 +1,24 @@
#!/bin/sh
#
# 2011 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/>.
#
#
# Show the lastest changes from this (upcoming) release
#
awk '/^$/ { exit } { print $0 } END { print "-----" }' < "${0%/*}/../changelog"

12
docs/dev/logs/2010-09-25 Normal file
View file

@ -0,0 +1,12 @@
[12:15] kr:cdist% CDIST_DEBUG=1 cdist-config
Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_dir.sh ...
Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_explore_hostname.sh ...
Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_explore_os.sh ...
Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_explore_pkg_system.sh ...
Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_file.sh ...
Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_package.sh ...
Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_package_backend_pacman_install.sh ...
Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_package_select_backend.sh ...
[12:15] kr:cdist% cdist-config
[12:15] kr:cdist%

View file

@ -0,0 +1,42 @@
- Remote exec: always into file for debug purposes?
- Argumente via evn(TYPNAME_PROPERTYNAME)?
- Kleber zwischen package/provider/pacman/install und type/package/ muss in type oder sein!
- $somebody defines default / mapping from $type to $provider
- may depend on $explore_variables
- Alternativ dir structure?
$basedir/$type/
properties/
name/
required # required | optional
choices # \n liste
meta/
default (shell script)
providers/
pukman/
- allow user to add or overwrite types, providers, etc.
- property vs. option vs. parameter vs. attribute vs. mittagessen
! cleanly define interface between type/provider and cdist core
- easy documentation generatior
- cool error messages
- up-to-date documentation
- validation of user input possible before type called (compile stage)
- find $type => list of ${parameters/term to be defined/see above}
- __package apache [--name nginx]
- type package defines mapping of unique id to ${parameters/term to be defined/see above}
- if --name given, creates config entry below apache
- type2cconfig: define!
- steven: git!!!!!!!!!! [TODAY!!!!!!!!!]
- client status als cconfig => diff possibility
- vs. provider checks && cares abuot what todo
- register creation in cconfig tree to find out how created the first entry!!!
- to warn user "created x already at y, trying to recreate at z"

180
docs/dev/logs/2010-11-09 Normal file
View file

@ -0,0 +1,180 @@
Rethinking ideas of last talk.
What if types are formal / have formal arguments?
What if cdist can do all the parsing stuff and the real
functionality comes out of the library (similar to cfengine)?
What if the library is integral part of cdist?
conf/lib/$name/
attributes/
a
b
c
--------------------------------------------------------------------------------
I'm not sure whether this design is in fact helpful.
But it's clearly necessary to have a directory per type, so a type can
have helpers.
conf/lib/$name/
init?
Prepare some very minimal (non functional) framework for library integration?
Like parsing for command line arguments?
--------------------------------------------------------------------------------
Real configurations versus types:
Types are reusable code: For instance etc_resolv.
Configurations are types used and configured.
--------------------------------------------------------------------------------
Style
__type <id> --option1 <arg1>
<id> = everything your filesystem permits, but may not start with a period (".").
If <id> == ., it setups the standard attributes.
seems to be quite good usable. cdist can easily -----parse--- this.
Nope. We don't parse. We let the shell execute.
So whatever is __type will get executed.
__type must probably be part of some cdist specific path.
Which again could be
conf/lib/$name
Which could result in the directory
conf/lib/.$name for helpers
That style could include a mandority --help, --args arguments
and would thus be independent of the language used (can, but does
not must be shell).
How to solve standard configurations that way?
EASY AS WELL!
__type <either option or magic> --option1 <arg1>
for instance
__type . --option1 <arg1>
--------------------------------------------------------------------------------
Type paths
At least (at maximum)? 2:
user + system
Easy to do.
--------------------------------------------------------------------------------
Types: Name types types or name types modules?
--------------------------------------------------------------------------------
Where to place/start the configuration?
wherever it is: name it configuration!
--------------------------------------------------------------------------------
cdist installation / paths:
/etc/cdist/ # CDISTBASEDIR
config/ # CDISTCONFIGDIR
types/ # CDISTUSERTYPEDIR
$prefix/lib/cdist/types/ # CDISTSYSTYPEDIR
cdist environment:
$__loaded_from # path where $type has been loaded from
PATH=$CDISTUSERTYPEDIR:$CDISTSYSTYPEDIR:$PATH
--------------------------------------------------------------------------------
Recommendation (not a must):
Put helpers for types into the typedir/.$typename
All types should be prefixed by "__" to prevent clashes with the system
binaries.
--------------------------------------------------------------------------------
Type commands (__bla) could get generated by cdist and cdist could use that
to generate the actual cconfig part.
This leads up to the next section
--------------------------------------------------------------------------------
How to write my own type named "coffee":
Create the directory /etc/cdist/types/coffee/
Create the file /etc/cdist/types/coffee/README containing a description of the type.
If your type supports attributes, create the directory /etc/cdist/types/coffee/attributes.
For each attribute, create the file
/etc/cdist/types/coffee/attributes/$attribute_name which contains
a short description on the first line
then a blank line
then a long description (probably over several lines)
If you think your type may be useful for others, submit it for inclusion
into cdist at cdist -- at -- l.schottelius.org.
Create /etc/cdist/types/coffee/init which reads $configinput
(either via cconfig or via environment) and outputs a block of
shell code suitable for running on the client.
--------------------------------------------------------------------------------
cdist exec steps:
- check for valid types, abort if user (re-)defined system types
- generate __type binaries (aliases?), which contains cdist logic
to analyse types and check for correct arguments
- execute /etc/cdist/config/init (MAIN CONFIG) which in turn
calls __type binaries
- __type binaries (which are all the same, multicall!) generate
cconfig
- Run real type/init binaries with respective cconfig dir as path,
which must generate shellcode to be executed.
- Create the temporary shellscript containing all the code and execute
it on the client.
--------------------------------------------------------------------------------
Support metaargs like --depends?
If so, they need to be forbidden for types.
--------------------------------------------------------------------------------
Shell code generator:
- use subshells for each shellcodeblock
- create one main function (to ensure transfer is complete)
Example:
cdist_apply_$hostname()
{
# repeat this block for every type/id defined
echo "Executing block from $type_$id ..."
(
code
)
}
cdist_apply_$hostname

4
docs/dev/logs/2010-11-21 Normal file
View file

@ -0,0 +1,4 @@
Ideas:
- rollback auf versionen
- backup

4
docs/dev/logs/2010-11-29 Normal file
View file

@ -0,0 +1,4 @@
- $type is handled by cdist and generates cconfig
- $type itself gets called by cdist after cconfig generation
- $path as argument
- or chroot

32
docs/dev/logs/2010-12-01 Normal file
View file

@ -0,0 +1,32 @@
what does a type contain?
- possible explorer functions to find out about the system state
- scripts being run on the server, which inputs cconfig and generates code to
apply changes on the client
-> logs errors through stderr
->
- cdist takes all the type scripts, for each defined type
- when to run cdist-explorer tools from types?
- get general impression first and then consider tools?
- what about the overwrites / order / inherits problem?
- is a "how to reuse x"-problem
- NO OVERWRITE POSSIBLE!!!!!!!
- once defined, no redefine
- record creator to issue warning on collision detection!
- "i want to do the same as x, but change a single bit"
- i call the other type under my own name and overwrite stuff afterwards
- apache, tomcat, etc.
-
TYPECHANGES are good!
- what is cm?
- copying files around
- changing files
- removing files
- put together in a context

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

3
docs/dev/logs/2011-01-17 Normal file
View file

@ -0,0 +1,3 @@
Steven:
Type == Provider == Module?
No need for providers like in Puppet (=> Providers can reuse other providers)

View file

@ -0,0 +1,11 @@
# How to create a new type - Try #1
# Define possible parameters
[21:10] kr:cdist% cd lib/types
[21:10] kr:types% mkdir file
[21:10] kr:file% mkdir mandority_parameters
[21:10] kr:file% touch mandority_parameters/name
[21:11] kr:file% touch mandority_parameters/type
[21:11] kr:file% mkdir optional_parameters
[21:11] kr:file% touch optional_parameters/mode

92
docs/dev/logs/2011-01-24 Normal file
View file

@ -0,0 +1,92 @@
Steven / Nico
Type:
- xml/
- parameters/
- optional_parameters
me: too long
User interested it type:
- which arguments are available
- ls /path/to/type (steven)
Steven / proposal:
- manifest/gencode: .meta
- attribute directly in dir
"cdist-help" <type bla>
- if no direct path
--------------------------------------------------------------------------------
Doc proposal (Nico):
man cdist-type-<name>
Directory structure:
"easy to ls -lR and understand what it does"
ls -lR $(cdist-type-path "typename")/meta/
ls -lR $(cdist-path type "typename")/meta/
--------------------------------------------------------------------------------
What consumes most type?
- Writing types, because they are functionality
- Define attributes
- required/optional
Type documentation
$type/.meta/required_parameters/path contains
"Path in which file is created"
--------------------------------------------------------------------------------
Doc of every type:
- required/optional parameters
- description
--------------------------------------------------------------------------------
! Validation of type input:
Not only required/optional parameters:
- handling of either content/source arguments
- validate script in type?
- seperate validation from manifest may be senseful
--------------------------------------------------------------------------------
Explorer per type?
- helpful or evil?
- helps to summarise/get information near ressource that needs it
- emphasises type specific explorers
-> explorer should be reusable by everybody!
--------------------------------------------------------------------------------
Explorer delivers facts
- central repo
- not being able to override
- may be helpful to override facts for debugging (i.e. os=redhat)
- one explorer returns one fact
- facts via environment variables
- proposal steven: UPPER_CASE
- __fact_os (Nico)
- DEFINE path_to_explorer
- DEFINE explorer
--------------------------------------------------------------------------------

50
docs/dev/logs/2011-02-03 Normal file
View 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

View file

@ -0,0 +1,7 @@
Template-Verzeichnis
mit Definitionen für File
User kann globales Template verändern
copy und dann neues default
Defaults kopiert
Global nur Attribute, keine Werte

7
docs/dev/logs/2011-02-22 Normal file
View file

@ -0,0 +1,7 @@
Inherit / subshell:
#
Shell parameters that are set by variable assignment (see the set special built-in) or from the System Interfaces volume of IEEE Std 1003.1-2001 environment inherited by the shell when it begins (see the export special built-in)
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_12

14
docs/dev/logs/2011-02-24 Normal file
View file

@ -0,0 +1,14 @@
- Steven, Nico
- all cdist cores change to the local or remote base dir before excution
of non-core (i.e. manifests, gencode, ...) executables
- non-core executables get helper information via environment variables:
general explorers: __explorers
initial manifest: __manifests
type manifests: __object, __object_id
type explorers: __object, __object_id, __type_explorers
type codegen: __object, __object_id
type code: -

15
docs/dev/logs/2011-02-27 Normal file
View file

@ -0,0 +1,15 @@
Cdist installation / configuring / types
--------------------------------------------------------------------------------
problems:
- types are not in /etc/cdist/type by default
- types should be updatable
- cdist should be easily updateable
- make configuration version control able easily
solution:
- require a special user ("cdist")
- always git clone from specific branch
- better version-1.0 or 1.0 or similar
- conf/manifests mv example?
- upstream types get updated

9
docs/dev/logs/2011-03-03 Normal file
View file

@ -0,0 +1,9 @@
Update on env:
general explorer: __explorer
initial manifest: __manifest, __global
type manifests __object, __object_id, __global
type explorers: __object, __object_id, __type_explorers
type codegen: __object, __object_id, __global
type code: -

9
docs/dev/logs/2011-03-07 Normal file
View file

@ -0,0 +1,9 @@
Update on env:
general explorer: __explorer
initial manifest: __manifest, __global
type manifests __object, __object_id, __global
type explorers: __object, __object_id, __type_explorers, __global
type codegen: __object, __object_id, __global
type code: -

3
docs/dev/logs/2011-03-09 Normal file
View file

@ -0,0 +1,3 @@
Steven & Nico:
- types are closed in themselves
- manpage will be stored in conf/type/NAME/man.text

27
docs/dev/logs/2011-03-15 Normal file
View file

@ -0,0 +1,27 @@
Steven, Nico
How to handle dependencies:
1) Add --require parameter for all types
- Special handling in cdist-type-emulator
+ Everything on one line
2) Add __require type
+ No change in core
- Type influences core
- Additional line
- Core needs to know about requirements
3) cdist-require as a seperate executable
+ No change in cdist-type-emulator
- new behaviour
- first time cdist-xxx dependency in types
4) require="" environment variable for cdist-type-emulator
+ on one line / same context
+ special handling is ok for special case
+ doesn't touch parameters (i.e. type still has full control)
--------------------------------------------------------------------------------
Result: Use version 4.

View file

@ -0,0 +1,7 @@
Proposal for new types, which replace __file:
x __directory /etc [--mode --owner --group --parents [yes|no] ]
x __link /destination --source abc --type [symbolic|hard]
x __file /etc/passwd [--source] --mode --owner --group

View file

@ -0,0 +1,32 @@
Ziel: type __gugus soll abhaengig von type __foo sein
--------------------------------------------------------------------------------
__foo/manifest
__file /nice/file --source /some/where
__file /nice/other/file --source /some/where/else
__package gurk --state installed
--------------------------------------------------------------------------------
a) ohne autorequire
__gugus/manifest
require="__file/nice/file __file/nice/other/file __package/gurk" __file /whatever
--------------------------------------------------------------------------------
b) mit autorequire
__gugus/manifest
require="__foo/someid" __file /whatever
--------------------------------------------------------------------------------
Behauptung: __gugus sollte nicht ueber die internas von __foo bescheid wissen muessen

View file

@ -0,0 +1,22 @@
== Henne/Ei Problem ==
manifest will explorer benutzen der noch gar nicht existiert,
weil explorer ja auch object benutzen kann/soll/will welches erst von manifest
erzuegt wird.
--------------------------------------------------------------------------------
__foo/manifest
state_should="$(cat "$__object/parameter/state")"
state_is="$(cat "$__object/explorer/state")"
# BANG -> $__object/explorer/state does not exist at this point
if [ "$state_should" != "$state_is" ]; then
__file /some/file --source /some/source
fi

View file

@ -0,0 +1,12 @@
Some pgrep fun when grepping for -f /usr/lib/postfix/master:
[23:08] kr:cdist% cat cache/localhost/out/object/__process/usr/lib/postfix/master/.cdist/explorer/runs | grep -e 2529 -e 2537 -e 2538 -e 2539
nico 2529 0.0 0.0 14848 1816 pts/45 S+ 23:08 0:00 /bin/sh /home/users/nico/oeffentlich/rechner/projekte/cdist/bin/cdist-run-remote localhost __object="/var/lib/cdist/out/object/__process/usr/lib/postfix/master" __object_id="usr/lib/postfix/master" cdist-remote-explorer-run __type_explorer /var/lib/cdist/conf/type/__process/explorer /var/lib/cdist/out/object/__process/usr/lib/postfix/master/explorer
nico 2537 0.0 0.0 41976 2324 pts/45 S+ 23:08 0:00 ssh root@localhost export PATH="/var/lib/cdist/bin:$PATH"; __object="/var/lib/cdist/out/object/__process/usr/lib/postfix/master" __object_id="usr/lib/postfix/master" cdist-remote-explorer-run __type_explorer /var/lib/cdist/conf/type/__process/explorer /var/lib/cdist/out/object/__process/usr/lib/postfix/master/explorer
root 2538 0.0 0.0 11440 1264 ? Ss 23:08 0:00 bash -c export PATH="/var/lib/cdist/bin:$PATH"; __object="/var/lib/cdist/out/object/__process/usr/lib/postfix/master" __object_id="usr/lib/postfix/master" cdist-remote-explorer-run __type_explorer /var/lib/cdist/conf/type/__process/explorer /var/lib/cdist/out/object/__process/usr/lib/postfix/master/explorer
root 2539 0.0 0.0 11440 1524 ? S 23:08 0:00 /bin/sh /var/lib/cdist/bin/cdist-remote-explorer-run __type_explorer /var/lib/cdist/conf/type/__process/explorer /var/lib/cdist/out/object/__process/usr/lib/postfix/master/explorer
2529
2537
2538
2539

View file

@ -0,0 +1,14 @@
run global explorers
run init manitest
run all objects
-> depencies aufloesen wie/was/wo ????????
run object
run explorer
run manifest
-> object liste wird evt veraendert
run gencode
run push -> target
run exec code

View file

@ -0,0 +1,9 @@
Fun with yum:
[root@brett ~]# yum --assumeyes --quiet install "vim"
Package 2:vim-enhanced-7.3.056-1.fc14.x86_64 already installed and latest version
[root@brett ~]# rpm -q vim
package vim is not installed
[root@brett ~]#
(Me || yum) == dumb?

View file

@ -0,0 +1,24 @@
Some openbsd experiements:
# pkg_add foo
Can't find foo
# echo $?
0
#
# pkg_info foo
# echo $?
0
# pkg_add -s vim
Ambiguous: vim could be vim-7.2.444-gtk2 vim-7.2.444-no_x11
# pkg_add -s vim--no_x11
# echo $?
0
# pkg_add -s vimfooooooooo
Can't find vimfooooooooo
# pkg_add -s vim--foooooooo
Can't find vim--foooooooo
# echo $?
0

67
docs/dev/logs/2011-04-19 Normal file
View file

@ -0,0 +1,67 @@
Meeting with: Steven, Thorsten, Nico
Problem: execute my code only if somebody else's changed something.
Proposals:
1) Introduce new binary (Steven)
gencode:
if has_changed __file/etc/nginx.conf; then
echo mycode
fi
2) Use -f plus new variable to cover .cdist/has_code:
if [ -f $global/objects/__file/etc/nginx.conf/$has_code ]; then
echo mycode
fi
And $has_code resolves to .cdist/has_code to cover the .cdist
directory.
3) Create a new tree that contains changed objects
if [ -e $global/changed/__file/etc/nginx.conf ]; then
echo mycode
fi
4) Use a \n seperated list
if grep -q __file/etc/nginx.conf $global/changed; then
echo mycode
fi
X) General problem (add to FAQ):
When having "do something only if somebody else did something"
it is possible that users get confused, because code will not
be executed.
This may especially happen in code development:
a) User creates __file/etc/nginx.conf
b) User creates a new type __nginx that restarts
nginx, only if __file/etc/nginx.conf changed.
But __file/etc/nginx.conf has already been deployed
and thus will never be restarted.
--------------------------------------------------------------------------------
Introduce exclude/conflicts attribute for types?
Handling in cdist vs. handling in the types themselves?
Examples: __file, __link, __directory
Need to handle errors on low level for those anyway.
Conclusion: Wait until we need exclude in a different type.
Pro:
Throw error as soon as possible without touching the target.
Contra:
No needod for most cases.
Very controversal for stuff like __package and __package_gem
for instance: rails; Should those two conflict or not?

View file

@ -0,0 +1,2 @@
http://slashdot.org/submission/1533922/cdist-162---usable-configuration-management
http://slashdot.org/submission/1522134/Cdist-Configuration-management-that-makes-fun#

View file

@ -0,0 +1,7 @@
cdist-mass-deploy -p ikq02.ethz.ch; 142
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch; 194
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch; 271
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch; 328
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch; 456
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch; 568

View file

@ -0,0 +1,31 @@
cdist-mass-deploy -p ikq02.ethz.ch; 226
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch; 242
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch; 275
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch; 296
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch; 306
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch; 357
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch; 403
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch; 400
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch; 409
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch; 685
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch; 617
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch; 672
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch; 718
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch; 558
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch; 828
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch; 837
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch; 933
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch; 1007
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch; 1036
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch; 1056
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch; 1151
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch; 1220
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch ikr23.ethz.ch; 1296
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch ikr23.ethz.ch ikr24.ethz.ch; 1347
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch ikr23.ethz.ch ikr24.ethz.ch ikr25.ethz.ch; 1392
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch ikr23.ethz.ch ikr24.ethz.ch ikr25.ethz.ch ikr26.ethz.ch; 1406
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch ikr23.ethz.ch ikr24.ethz.ch ikr25.ethz.ch ikr26.ethz.ch ikr27.ethz.ch; 1957
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch ikr23.ethz.ch ikr24.ethz.ch ikr25.ethz.ch ikr26.ethz.ch ikr27.ethz.ch ikr28.ethz.ch; 1565
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch ikr23.ethz.ch ikr24.ethz.ch ikr25.ethz.ch ikr26.ethz.ch ikr27.ethz.ch ikr28.ethz.ch ikr29.ethz.ch; 1579
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch ikr23.ethz.ch ikr24.ethz.ch ikr25.ethz.ch ikr26.ethz.ch ikr27.ethz.ch ikr28.ethz.ch ikr29.ethz.ch ikr30.ethz.ch; 1591
cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr08.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch ikr23.ethz.ch ikr24.ethz.ch ikr25.ethz.ch ikr26.ethz.ch ikr27.ethz.ch ikr28.ethz.ch ikr29.ethz.ch ikr30.ethz.ch ikr31.ethz.ch; 1625

20
docs/dev/logs/2011-04-27 Normal file
View file

@ -0,0 +1,20 @@
Participants: Nico, Steven
Cdist Benchmark / Scaling ideas:
1) debug cdist using __cdist_echo for timing stages
-> find out, who takes longest time
- profiling using bootchart / oprofile
- continious integration & benchmark
- scaling:
- with number of objects
- w + w/o manifest
- w + w/o gencode-local + 2*n
- w + w/o gencode-remote
- w + w/o gencode-{both}
- with number of cpus!
-
Aim:
Be fast if nothing todo (<30s).
Other cases may take long (independent of cdist).

View file

@ -0,0 +1,56 @@
% x200
data = [ 1 104; 2 129; 6 249 ; 25 1267 ]
% x201, 4.2.2.4 dns, eth
data = [ 1 143; 2 159; 3 198; 4 244; 5 299; 6 350; 7 435; 8 429 ];
% x201, von zuhause aus
data2 = [ 226 242 275 296 306 357 403 400 409 685 617 672 ]
plot(0:size(data)(2)-1, data)
hold off;
plot(data(:,1), data(:,2))
% per host time:
data(:,2)' ./ data(:,1)'
hold on;
plot(data(:,1), data(:,2)' ./ data(:,1)')
Testing on
Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz
4 GiB RAM
Intel Gbit Nic
- 169 objects, all done (i.e. rerun)
- runs are cpu bound
1 host:
core: cdist 1.6.2: Successfully finished run
Run: 104s (1 minutes)
2 hosts:
[13:48] kr:cdist-nutzung% mytime cdist-mass-deploy -p ikq03.ethz.ch ikq04.ethz.ch
Run: 129s (2 minutes)
6 hosts: (7 specified, but ikq01.ethz.ch is dead)
cdist-mass-deploy -p ikq01.ethz.ch ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch
Run: 294s (4 minutes)
25 hosts
[13:58] kr:cdist-nutzung% mytime cdist-mass-deploy -p $(sed 's/^root@//' ~/.dsh/group/ikr)
Run: 723s (12 minutes)
25 hosts without proxy command now:
Run: 1267s (21 minutes)
Run: 1212s (20 minutes)
[14:11] kr:cdist-nutzung% mytime cdist-mass-deploy -p $(sed 's/^root@//' ~/.dsh/group/ikr)

View file

@ -0,0 +1,9 @@
Run: 78s (1 minutes)
[13:25] kr:cdist-nutzung% mytime cdist-deploy-to ikq02.ethz.ch
% mit dash, eth, x201, Mit Apr 27 13:41:49 CEST 2011
data = [ 0 73 77 89 107 130 151 180 197 228 251 260 199 295 335 276 ]
plot(0:size(data2)(2)-1, data2)

File diff suppressed because it is too large Load diff

15
docs/dev/logs/2011-05-09 Normal file
View file

@ -0,0 +1,15 @@
Steven, Nico:
- static explorer (running once) for types?
- probably need to invalidate cache: installing package causes
new list of installed packages
- optimise using parallel builds?
- consens: test on 2 test server
Test servers:
- create one new ssh-keypair to be deployed on both machines
- create rsync script to copy who repo to test machines
- write benchmark script, that runs from 1:n hosts and records
- cpu time
- real time

35
docs/dev/logs/2011-05-10 Normal file
View file

@ -0,0 +1,35 @@
How to create a benchmark / testhost:
- Add testhost
- Generate ssh key pair
- Add generated ssh key pair to root keys
- Deploy to all hosts, so they have the pubkey of your testhost
- Done. You can use the benchmark host.
--------------------------------------------------------------------------------
cdist-mass-deploy -p rnic01 rnic02 2.32s user 1.99s system 48% cpu 8.825 total
--------------------------------------------------------------------------------
Weired behaviour with new trap:
[bach30.ethz.ch] __package/gawk: Executing manifest
^CTerminated
Terminated
Terminated
Segmentation fault
root@rnic01:~/cdist-nutzung# Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Terminated
Terminated
Segmentation fault

View file

@ -0,0 +1 @@
cdist-mass-deploy -p bach10.ethz.ch bach12.ethz.ch bach14.ethz.ch bach19.ethz.ch bach20.ethz.ch bach21.ethz.ch bach22.ethz.ch bach23.ethz.ch bach24.ethz.ch bach25.ethz.ch bach26.ethz.ch 165.77s user 143.46s system 47% cpu 10:44.88 total

27
docs/dev/logs/2011-05-12 Normal file
View file

@ -0,0 +1,27 @@
Steven, Nico
A type __get_and_build:
requires __directory /var/tmp
wget's source to /var/tmp
builds programm in /var/tmp
Question: How to define that this object depends on
__directory/var/tmp?
Answer for now:
require="__directory/var/tmp" $__self "$@"
-> construct $@ from params in directory
Answer2 for now:
Use a second type:
__get_and_build:
__directory /var/tmp
require="__directory/var/tmp" __build
__build:
gencode-remote:
wget && build
Answert for soon:
Should be doable easier!

View file

@ -0,0 +1,112 @@
Provisioning Server ideas
- bootup kernel on target host via TFTP/PXE
- start our code that
- enables networking (dhcp)
- enables sshd
Requires:
- Program that creates our blob that needs to be started
- for Linux: initrd
- Including ssh keys -> known!
- startup sshd
--------------------------------------------------------------------------------
Setup for installation server:
- have dhcpd available
- install tftpd server
- configure dhcp to tell clients to boot from tftp server
- have a kernel
--------------------------------------------------------------------------------
Ideas on how to create "blob"
- Use tools from system?
-> requires same arch on destination!
- Use debian|...| base?
-> works with cuni!
--------------------------------------------------------------------------------
tftp via cuni:
debian pxelinux.0 pxelinux.cfg
[19:44] kr:tftp% ln -s /usr/lib/syslinux/
--------------------------------------------------------------------------------
How to create the initrd?
Base from ...
arch?
debian?
- needs many hardware support / in kernel?
- fit to kernel?
--------------------------------------------------------------------------------
Based on Debian
[21:33] kr:tftp% sudo debootstrap --arch=i386 squeeze debian-squeeze
sudo chroot debian-squeeze /bin/bash
apt-get install openssh-server
--------------------------------------------------------------------------------
Based on Archlinux
Edit / create pacman.conf
Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686
[21:40] kr:~% grep -v ^# pacman.conf | grep -v '^$'
[options]
HoldPkg = pacman glibc
SyncFirst = pacman
Architecture = auto
[core]
Include = Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686
[extra]
Include = Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686
[community]
Include = Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686
[archlinuxfr]
Server = http://repo.archlinux.fr/$arch
[21:40] kr:tftp% sudo mkarchroot -C ~/pacman.conf archlinuxroot
[21:42] kr:tftp% sudo mkarchroot -C ~/pacman.conf archlinuxroot base
--------------------------------------------------------------------------------
Initramfs general:
- need /init
Test in Debian:
root@kr:/# ln -s /sbin/init init
Create initramfs:
[22:47] kr:debian-squeeze% sudo find . -print0 | sudo cpio --null -ov --format=newc | gzip -9 > ../pre-os/initrd.gz
--------------------------------------------------------------------------------
Gentoo: http://en.gentoo-wiki.com/wiki/Initramfs
It is possible to specify multiple initramfs to be extracted during boot. This can be useful if you want to create a generic initramfs (for example one that does mdadm) and then add modifications in separate files (for example a custom /etc/mdadm.conf for every machine).
http://syslinux.zytor.com/wiki/index.php/SYSLINUX#INITRD_initrd_file
It supports multiple filenames separated by commas. This is mostly useful for initramfs, which can be composed of multiple separate cpio or cpio.gz archives. Note: all files except the last one are zero-padded to a 4K page boundary. This should not affect initramfs.
--------------------------------------------------------------------------------
Multiple initrds, #1:
LABEL preos
MENU LABEL Pre OS (Debian Squeeze)
KERNEL debian-squeeze/boot/vmlinuz-2.6.32-5-686
INITRD debian-squeeze/boot/initrd.img-2.6.32-5-686,pre-os/initrd.gz
--------------------------------------------------------------------------------
Debug in rootfs:
root@kr:/# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
test
--------------------------------------------------------------------------------
Multiple nics in Debian...

View file

@ -0,0 +1,19 @@
How to make library functions available to manifest, explorer, etc.
Some ideas / background:
- do not have the user to source $__lib/foo if not needed
- have $__cdist_lib for internal stuff (probably referring to core/)
Implementation:
load_lib()
{
. $__cdist_lib/*
}
run_code_from_user()
{
load_lib
. file_from_user
}

View file

@ -0,0 +1,20 @@
- new executable cinst-deploy-to
- types used by cinst are marked as such ('cinst-only')
- cdist-deploy-to and cinst-deploy-to read the same manifest
- cdist ignores types marked as 'cinst-only'
- cinst ignores types not marked as 'cinst-only'
- update $__explorer/os to recognize preos
- cinst types will ONLY BE CALLED if $__explorer/os == 'preos'
--------------------------------------------------------------------------------
cinst types:
__partition_msdos /dev/sda1 --type 83 --size 100M --bootable
__partition_msdos /dev/sda2 --type 82 --size 512M
__fs_jfs /dev/sda1 --args "-c -q"
__fstab_entry /dev/sda1 --type jfs --mountpoint / --options noatime --freq 0 --passno 0
__fstab_entry /dev/sda2 --type swap

View file

@ -0,0 +1,15 @@
client -------------------> trigger via ssh ----------> server
~/.ssh/authorized_keys
-> cdist-deploy-to <da-wo-ich-herkomme>
ssh -R
server -> via cdist-deploy-to -> client
cdist-mass-deploy -p <host a .. host b...>

View file

@ -0,0 +1,9 @@
when all objects of a type are applied, then run the types gencode-{local,remote} scripts
--------------------------------------------------------------------------------
__mein_type/
type/ # executed when all objects of this type have been applied
gencode-local
gencode-remote

View file

@ -0,0 +1,22 @@
types can contribute global explorers
--------------------------------------------------------------------------------
__mein_type/
global/
explorer/
status-von-foo
anderer
$out/explorer/
hostname
os
...
__mein_type/
status-von-foo
anderer
todos:
- cdist scans types for global/explorer's
- when executing explorers, create the types namespace folder before running type gobal explorers

View file

@ -0,0 +1,4 @@
Debugging cdist:
[0:13] kr:cdist-nutzung% ./local/update-local-core && __cdist_debug=1 __cdist_local_base_dir=/tmp/cdist cdist-deploy-to ikq04.ethz.ch

110
docs/dev/logs/2011-09-12 Normal file
View file

@ -0,0 +1,110 @@
Benchmark from home/X201 (2 cores, 4 threads):
ikq (1): 72.192397
ikq (2): INFO: Total processing time for 2 hosts: 74.1845
ikq* (6): INFO: Total processing time: 117.572312
ikq* + ikr3 (9): INFO: Total processing time: 120.307662
ikq* + ikr (14): INFO: Total processing time: 139.769807
ikq* + ikr (18): INFO: Total processing time: 186.354398
ikq* + ikr (22): INFO: Total processing time: 225.793533
ikq* + ikr (26): INFO: Total processing time: 237.06687
ikq* + ikr (31): INFO: Total processing time: 276.912414
ikr07.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch
ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch
ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch
ikr23.ethz.ch ikr24.ethz.ch ikr25.ethz.ch ikr26.ethz.ch
ikr27.ethz.ch ikr28.ethz.ch ikr29.ethz.ch ikr30.ethz.ch
ikr31.ethz.ch
cdist -c ~/p/cdist-nutzung -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr01.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch
--------------------------------------------------------------------------------
INFO: Total processing time for 1 hosts: 72.166661
INFO: Total processing time for 2 hosts: 76.633228
INFO: Total processing time for 3 host(s): 77.199817
INFO: Total processing time for 4 host(s): 94.045175
INFO: Total processing time for 5 host(s): 103.226354
INFO: Total processing time for 6 host(s): 107.76097
INFO: Total processing time for 7 host(s): 101.571705
INFO: Total processing time for 8 host(s): 107.600093
INFO: Total processing time for 9 host(s): 116.500371
INFO: Total processing time for 10 host(s): 119.445805
INFO: Total processing time for 11 host(s): 123.944385
INFO: Total processing time for 12 host(s): 130.499098
INFO: Total processing time for 13 host(s): 137.250861
INFO: Total processing time for 14 host(s): 154.9841
INFO: Total processing time for 15 host(s): 139.659637
INFO: Total processing time for 16 host(s): 142.70005
INFO: Total processing time for 17 host(s): 148.541452
INFO: Total processing time for 18 host(s): 159.360809
INFO: Total processing time for 19 host(s): 171.907864
INFO: Total processing time for 20 host(s): 178.76695
INFO: Total processing time for 21 host(s): 183.856671
INFO: Total processing time for 22 host(s): 194.504221
INFO: Total processing time for 23 host(s): 207.314842
INFO: Total processing time for 24 host(s): 215.846502
INFO: Total processing time for 25 host(s): 217.223581
INFO: Total processing time for 26 host(s): 238.591705
INFO: Total processing time for 27 host(s): 238.478493
INFO: Total processing time for 28 host(s): 246.058718
INFO: Total processing time for 29 host(s): 264.208372
INFO: Total processing time for 30 host(s): 265.560685
INFO: Total processing time for 31 host(s): 282.264488
--------------------------------------------------------------------------------
Use:
grep "^INFO: Total processing time" doc/dev/logs/2011-09-12 | sed 's/.*: //'
octave
times = [ /* paste here ]
plot(times)
# keep the graph
hold on
# Scale linearly with the single host value
plot((1:31)*times(1))
--------------------------------------------------------------------------------
code:
octave
time = [
72.166661
76.633228
77.199817
94.045175
103.226354
107.76097
101.571705
107.600093
116.500371
119.445805
123.944385
130.499098
137.250861
154.9841
139.659637
142.70005
148.541452
159.360809
171.907864
178.76695
183.856671
194.504221
207.314842
215.846502
217.223581
238.591705
238.478493
246.058718
264.208372
265.560685
282.264488
]
plot(times, "-;cdist;", times(1)*[1:length(times)]', "-;linear;")
title("Configuration duration (cdist-2.0.0-rc4)")
ylabel("Number of hosts")
xlabel("Time in seconds")
print('cdist-2.0.0-rc4.png', '-dpng')

File diff suppressed because it is too large Load diff

3
docs/dev/logs/2011-09-13 Normal file
View file

@ -0,0 +1,3 @@
Name for installer:
installer (flag)
$__installer (variable) - gesetzt oder nicht

View file

@ -0,0 +1,63 @@
48 core
model name : AMD Opteron(tm) Processor 6174
128 GB RAM
Dell PowerEdge R815
root@sgs-r815-01:~/cdist-nutzung# grep "Total processing time for" deploy-all-benchmark-noikr13
INFO: Total processing time for 1 host(s): 257.641541
INFO: Total processing time for 2 host(s): 257.025783
INFO: Total processing time for 3 host(s): 258.933088
INFO: Total processing time for 4 host(s): 259.253074
INFO: Total processing time for 5 host(s): 260.331896
INFO: Total processing time for 6 host(s): 262.051349
INFO: Total processing time for 7 host(s): 323.820878
INFO: Total processing time for 8 host(s): 329.081856
INFO: Total processing time for 9 host(s): 333.346278
INFO: Total processing time for 10 host(s): 334.832419
INFO: Total processing time for 11 host(s): 330.572375
INFO: Total processing time for 12 host(s): 331.726628
INFO: Total processing time for 13 host(s): 331.740591
INFO: Total processing time for 14 host(s): 331.237139
INFO: Total processing time for 15 host(s): 331.718861
INFO: Total processing time for 16 host(s): 332.374645
INFO: Total processing time for 17 host(s): 331.510445
INFO: Total processing time for 18 host(s): 332.030743
INFO: Total processing time for 19 host(s): 332.193198
INFO: Total processing time for 20 host(s): 333.933765
INFO: Total processing time for 21 host(s): 335.292953
INFO: Total processing time for 22 host(s): 337.253608
INFO: Total processing time for 23 host(s): 337.831493
INFO: Total processing time for 24 host(s): 339.024737
INFO: Total processing time for 25 host(s): 343.515044
INFO: Total processing time for 26 host(s): 339.759678
INFO: Total processing time for 27 host(s): 339.378998
INFO: Total processing time for 28 host(s): 339.640378
INFO: Total processing time for 29 host(s): 340.885614
INFO: Total processing time for 30 host(s): 341.836923
INFO: Total processing time for 31 host(s): 343.825758
INFO: Total processing time for 32 host(s): 344.176089
INFO: Total processing time for 33 host(s): 345.408518
INFO: Total processing time for 34 host(s): 347.15322
INFO: Total processing time for 35 host(s): 351.330649
INFO: Total processing time for 36 host(s): 347.640758
INFO: Total processing time for 37 host(s): 347.381126
INFO: Total processing time for 38 host(s): 347.053406
INFO: Total processing time for 39 host(s): 347.453166
INFO: Total processing time for 40 host(s): 347.84804
INFO: Total processing time for 41 host(s): 349.035272
INFO: Total processing time for 42 host(s): 349.41507
INFO: Total processing time for 43 host(s): 351.208072
INFO: Total processing time for 44 host(s): 351.788401
INFO: Total processing time for 45 host(s): 351.730259
INFO: Total processing time for 46 host(s): 515.693497
INFO: Total processing time for 47 host(s): 352.702677
INFO: Total processing time for 48 host(s): 353.418003
INFO: Total processing time for 49 host(s): 355.07111
INFO: Total processing time for 50 host(s): 354.622388
INFO: Total processing time for 51 host(s): 355.192521
INFO: Total processing time for 52 host(s): 355.283238
INFO: Total processing time for 53 host(s): 358.112329
INFO: Total processing time for 54 host(s): 357.717426
INFO: Total processing time for 55 host(s): 357.748707
INFO: Total processing time for 56 host(s): 358.902118
INFO: Total processing time for 57 host(s): 367.817594

File diff suppressed because it is too large Load diff

3
docs/dev/logs/2011-10-04 Normal file
View file

@ -0,0 +1,3 @@
Testing for single tests:
PYTHONPATH=$PYTHONPATH:$(pwd -P)/lib python3 -m unittest cdist.test.test_install.Install.test_explorer_ran

116
docs/dev/logs/2011-10-05 Normal file
View file

@ -0,0 +1,116 @@
Config/Install/Deploy/Run:
target host
remote_cmd_prefix - ssh user@bla sudo foo?????
remote_cp_prefix - cp statt scp oder so
debug -> env für alles += __debug
Storage/Metaobject/Tree? == Path?
base_dir?
nimmt objekte
Sammelt Objekte
Ist prepared hier?
Object
"Infos" / Datenhalde
Base_Dir-Abhängigkeit? - wo
out_dir - wo speichern
nur eigenes verzeichnis interessant?
-> nicht für shell code / aka gencode!
-> __global abhängigkeit
object.gencode()?
hast du type-explorer?
ja?
führe JEDEN remote aus
speichere ausgabe in object
nein:
fertig
hast du gencode-{local,remote}?
ja?
führe local oder remote aus
speichere ausgabe in s/^gen//
nein:
fertig
hast du code-{local,remote}?
ja?
führe local oder remote aus
nein:
fertig
ich habe ...
object_id
type
type.singleton() == False -> require object_id
parameter gegeben
requirements / order
type_explorer := methode zum ausführen?
cdist.object.Object(type, id)
methoden:
gen_code
code
run_manifest
manifest == ort
Type
singleton: ja / nein
install: ja / nein
type_explorer := liste
optional_parameter
required_parameter
TypeExplorer
verwandt oder == explorer
Verwandschaft klären!
sehr abhängig von base_dir!</behauptung :)>
- welche gibt es?
- was für optionen haben sie
cdist.type.Type("/path/to/type")
Tree/Path vieh, das liste von $_ speichert
Einfach iterieren
Explorer
execute(env)
env == __explorer -> nur im explorer
z.B. BaseExplorer oder andersherum GlobalExplorer
Manifest
Exec
wrapper um auszuführen,
error handling,
output redirection (variable, file, beides, socat :-)
--------------------------------------------------------------------------------
- base_dir (conf/, type, ...)
- manifest (initiale)
$methode_mit_inhalt_von_manifest?
run_manifest(code)
ob sinnvoll?
geht auch mit stdin oder datei
stdin -> muss in tmp-datei, für sh -e?
-
--------------------------------------------------------------------------------
save output of shell in buffer instead of displaying?
-> freedom to decide whether to display or not!

30
docs/dev/logs/2011-10-06 Normal file
View file

@ -0,0 +1,30 @@
GlobalExplorer
list_explorers()
list_explorers_names()
base_dir
__init__(name)
out_dir
env
name = id
path
return_code
return_value
--------------------------------------------------------------------------------
Exec:
normal:
scp /from/where $USER@$HOST:REMOTE_BASE/cdist-internal
ssh $USER@$HOST MY_CMD_THAT_NEEDS_TO_RUN_IN_BIN_SH (including ENV)
sudo:
scp $USER@$HOST:REMOTE_BASE/cdist-internal
ssh $USER@$HOST sudo MY_CMD_THAT_NEEDS_TO_RUN_IN_BIN_SH (including ENV)
chroot:
[sudo] cp file /chroot/THE_HOST_BASE/REMOTE_BASE/cdist-internal
[sudo] chroot /chroot MY_CMD_THAT_NEEDS_TO_RUN_IN_BIN_SH (including ENV)

View file

@ -0,0 +1,87 @@
Commands needed:
conf/cmd/remote_exec
conf/cmd/copy
If ! conf/cmd/remote_exec:
use builtin
If ! conf/cmd/copy:
use builtin
--------------------------------------------------------------------------------
--cmd-dir?
$__cdist_cmd_dir
--------------------------------------------------------------------------------
-> Depend on session!
Builtin:
cdist.exec.run_or_fail(["scp", "-qr", source,
self.remote_user + "@" +
self.target_host + ":" +
destination])
self.remote_prefix = ["ssh", self.remote_user + "@" + self.target_host]
self.remote_user = remote_user
self.remote_prefix = remote_prefix
--------------------------------------------------------------------------------
What is in a session?
base_dir
target_host
--------------------------------------------------------------------------------
remote_user
pseudo-static, can be hardcoded again
--------------------------------------------------------------------------------
Result:
os.environ['__remote_exec'] = ["ssh", "-l", "root" ]
os.environ['__remote_exec'] = ["ssh", "-o", "User=root" ]
os.environ['__remote_copy'] = ["scp", "-o", "User=root" ]
__remote_exec=~/sudossh __remote_copy=... cdist config localhost
~/sudossh hostname $@...
~/sudocopy a hostname:b
~/chrootssh
~/chrootcopy
a)
3 cmd verzeichnnise: cdist, sudo, chroot
pro aufruf variable ändern
b)
1 dir, mit zeug
pro aufruf variablen ändern
conf/cmd/remote_exec
args for __remote_exec
$1 = hostname
$2 - ... = stuff to be executed in /bin/sh on remote side
$2 - $7 = env
$7 - 12 = cmd
args for __remote_copy
$1 = file here
$2 = hostname:destination
--------------------------------------------------------------------------------
There needs to be an easy way to change those cmds!
--------------------------------------------------------------------------------
Env-Passing:
_a=b test -> test can access $_a
_a=b test $_a -> $1 = "", because _a is *not* set within the shell
_a=b; test -> can access $_a
_a=b; test $_a -> $1 == "b"

View file

@ -0,0 +1,8 @@
Debug:
DEBUG: Namespace(name=None, state='installed')
DEBUG: Object output dir = /home/users/nico/.tmp/tmpsdaonx/out/object/__package_pacman/zsh/.cdist
DEBUG: Object param dir = /home/users/nico/.tmp/tmpsdaonx/out/object/__package_pacman/zsh/.cdist/parameter
DEBUG: /home/users/nico/.tmp/tmpsdaonx/out/object/__package_pacman/zsh/.cdist/parameter/state<-state = installed
DEBUG: zsh:Writing requirements:
DEBUG: Finished __package_pacman/zsh{'state': 'installed', 'name': None}

8
docs/dev/logs/2011-10-12 Normal file
View file

@ -0,0 +1,8 @@
Todo today + tests:
- explorer (nico)
- create env here
- exec -> local+remote (steven)
- make configinstall work again (nico)
- make manifest work (steven)
- create env here

View file

@ -0,0 +1,10 @@
[17:07] brief:cdist% ./bin/cdist config localhost
cat: /home/users/nico/.tmp/tmpfgy16_/out/object/__directory/tmp/foo/bar/.cdist/explorer/exists: No such file or directory
chgrp: cannot access `/tmp/foo/bar': No such file or directory
ERROR: localhost: Code that raised the error:
chgrp -R "postdrop" "/tmp/foo/bar"
chown -R "nico" "/tmp/foo/bar"
ERROR: Remote script execution failed: /var/lib/cdist/object/__directory/tmp/foo/bar/.cdist/code-remote ['ssh', '-o', 'User=root', '-q', 'localhost', '/bin/sh', '-e', '/var/lib/cdist/object/__directory/tmp/foo/bar/.cdist/code-remote']
[17:08] brief:cdist%

View file

@ -0,0 +1,46 @@
[23:24] brief:cdist% ./bin/cdist config -c ~/p/cdist-nutzung -v ikq04.ethz.ch
INFO: ikq04.ethz.ch: Deploying to ikq04.ethz.ch
INFO: ikq04.ethz.ch: Running object manifests and type explorers
cat: /home/users/nico/.tmp/tmpf969y2/out/object/__addifnosuchline/ssh-root-blukas/.cdist/parameter/line: No such file or directory
#!/bin/sh
#
# 2010-2011 Daniel Roth (dani-cdist@d-roth.li)
#
# 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/>.
#
#
if [ -f "$__object/parameter/file" ]; then
file=$(cat "$__object/parameter/file")
else
file="/$__object_id"
fi
regex=$(cat "$__object/parameter/line")
if [ -f "$file" ]; then
grep -q "^$regex\$" "$file"
if [ $? -eq 1 ]; then
echo "NOTFOUND"
else
echo "FOUND"
fi
else
echo "NOTFOUND"
fi
ERROR: ikq04.ethz.ch: Code that raised the error:
None
ERROR: Remote script execution failed: /var/lib/cdist/conf/type/__addifnosuchline/explorer/findline ['ssh', '-o', 'User=root', '-q', 'ikq04.ethz.ch', '__explorer=/var/lib/cdist/conf/explorer', '__object_fq=__addifnosuchline/ssh-root-blukas/.cdist', '__target_host=ikq04.ethz.ch', '__object_id=ssh-root-blukas', '__type_explorer=/var/lib/cdist/conf/type/__addifnosuchline/explorer', '__object=/home/users/nico/.tmp/tmpf969y2/out/object/__addifnosuchline/ssh-root-blukas/.cdist', '/bin/sh', '-e', '/var/lib/cdist/conf/type/__addifnosuchline/explorer/findline']
[23:25] brief:cdist%

View file

@ -0,0 +1,10 @@
Prefix is missing in some parts for a run, they all need to include
the hostname (required for clean parallel processing)
[0:13] brief:cdist% ./bin/cdist config -c ~/p/cdist-nutzung -v ikq04.ethz.ch
INFO: ikq04.ethz.ch: Running global explorers
INFO: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest
INFO: ikq04.ethz.ch: Running object manifests and type explorers
ERROR: requirements object_id may not start with /: __file//etc/nslcd.conf
ERROR: ikq04.ethz.ch: Code that raised the error:

View file

@ -0,0 +1,43 @@
[0:15] brief:cdist% ./bin/cdist config -c ~/p/cdist-nutzung -v ikq04.ethz.ch
INFO: ikq04.ethz.ch: Running global explorers
INFO: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest
INFO: ikq04.ethz.ch: Running object manifests and type explorers
/var/lib/cdist/conf/type/__file/explorer/.exists.swp: 1: Syntax error: ")" unexpected
Traceback (most recent call last):
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/exec/remote.py", line 147, in run_script
return subprocess.check_output(command).decode()
File "/usr/lib/python3.2/subprocess.py", line 518, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['ssh', '-o', 'User=root', '-q', 'ikq04.ethz.ch', '__explorer=/var/lib/cdist/conf/explorer', '__object_fq=__file/etc/cdist-configured/.cdist', '__target_host=ikq04.ethz.ch', '__object_id=etc/cdist-configured', '__type_explorer=/var/lib/cdist/conf/type/__file/explorer', '__object=/var/lib/cdist/object/__file/etc/cdist-configured/.cdist', '/bin/sh', '-e', '/var/lib/cdist/conf/type/__file/explorer/.exists.swp']' returned non-zero exit status 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./bin/cdist", line 161, in <module>
commandline()
File "./bin/cdist", line 103, in commandline
args.func(args)
File "./bin/cdist", line 106, in config
configinstall(args, mode=cdist.config.Config)
File "./bin/cdist", line 133, in configinstall
c.deploy_and_cleanup()
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/config_install.py", line 71, in deploy_and_cleanup
self.deploy_to()
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/config_install.py", line 65, in deploy_to
self.stage_prepare()
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/config_install.py", line 94, in stage_prepare
self.object_prepare(cdist_object)
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/config_install.py", line 122, in object_prepare
self.run_type_explorers(cdist_object)
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/config_install.py", line 115, in run_type_explorers
output = self.explorer.run_type_explorer(explorer, cdist_object)
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/core/explorer.py", line 135, in run_type_explorer
return self.remote.run_script(script, env=env, return_output=True)
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/exec/remote.py", line 151, in run_script
script_content = self.run(["cat", script], return_output=True)
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/exec/remote.py", line 97, in run
return self.run_command(cmd, env=env, return_output=return_output)
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/exec/remote.py", line 117, in run_command
return subprocess.check_output(command).decode()
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb6 in position 17: invalid start byte

View file

@ -0,0 +1,143 @@
1)
[0:19] brief:~% ./p/cdist/bin/cdist config -v localhost
INFO: localhost: Running global explorers
INFO: localhost: Running initial manifest /home/users/nico/oeffentlich/rechner/projekte/cdist/conf/manifest
^Chandling in config
Traceback (most recent call last):
File "/usr/lib/python3.2/functools.py", line 176, in wrapper
result = cache[key]
KeyError: (<class 'str'>, '[ \\f\\t]*(\\\\\\r?\\n[ \\f\\t]*)*(#[^\\r\\n]*)?((([0-9]+[jJ]|(([0-9]+\\.[0-9]*|\\.[0-9]+)([eE][-+]?[0-9]+)?|[0-9]+[eE][-+]?[0-9]+)[jJ])|(([0-9]+\\.[0-9]*|\\.[0-9]+)([eE][-+]?[0-9]+)?|[0-9]+[eE][-+]?[0-9]+)|(0[xX][0-9a-fA-F]+|0[bB][01]+|0[oO][0-7]+|(?:0+|[1-9][0-9]*)))|((\\*\\*=?|>>=?|<<=?|!=|//=?|->|[+\\-*/%&|^=<>]=?|~)|[][(){}]|(\\r?\\n|\\.\\.\\.|[:;.,@]))|([bB]?[rR]?\'[^\\n\'\\\\]*(?:\\\\.[^\\n\'\\\\]*)*\'|[bB]?[rR]?"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*")|\\w+)', 32)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.2/site.py", line 58, in <module>
import traceback
File "/usr/lib/python3.2/traceback.py", line 3, in <module>
import linecache
File "/usr/lib/python3.2/linecache.py", line 10, in <module>
import tokenize
File "/usr/lib/python3.2/tokenize.py", line 118, in <module>
_compile, (Token, PseudoToken, Single3, Double3))
File "/usr/lib/python3.2/tokenize.py", line 115, in _compile
return re.compile(expr, re.UNICODE)
File "/usr/lib/python3.2/re.py", line 206, in compile
return _compile(pattern, flags)
File "/usr/lib/python3.2/re.py", line 255, in _compile
return _compile_typed(type(pattern), pattern, flags)
File "/usr/lib/python3.2/functools.py", line 180, in wrapper
result = user_function(*args, **kwds)
File "/usr/lib/python3.2/re.py", line 267, in _compile_typed
return sre_compile.compile(pattern, flags)
File "/usr/lib/python3.2/sre_compile.py", line 495, in compile
code = _code(p, flags)
File "/usr/lib/python3.2/sre_compile.py", line 477, in _code
_compile_info(code, p, flags)
File "/usr/lib/python3.2/sre_compile.py", line 366, in _compile_info
[0:19] brief:~% lo, hi = pattern.getwidth()
File "/usr/lib/python3.2/sre_parse.py", line 163, in getwidth
i, j = av[1].getwidth()
File "/usr/lib/python3.2/sre_parse.py", line 153, in getwidth
l, h = av.getwidth()
File "/usr/lib/python3.2/sre_parse.py", line 163, in getwidth
i, j = av[1].getwidth()
File "/usr/lib/python3.2/sre_parse.py", line 153, in getwidth
l, h = av.getwidth()
File "/usr/lib/python3.2/sre_parse.py", line 163, in getwidth
i, j = av[1].getwidth()
File "/usr/lib/python3.2/sre_parse.py", line 153, in getwidth
l, h = av.getwidth()
File "/usr/lib/python3.2/sre_parse.py", line 163, in getwidth
i, j = av[1].getwidth()
File "/usr/lib/python3.2/sre_parse.py", line 153, in getwidth
l, h = av.getwidth()
File "/usr/lib/python3.2/sre_parse.py", line 163, in getwidth
i, j = av[1].getwidth()
File "/usr/lib/python3.2/sre_parse.py", line 148, in getwidth
for op, av in self.data:
KeyboardInterrupt
2)
[0:19] brief:~% ./p/cdist/bin/cdist config -v localhost
INFO: localhost: Running global explorers
INFO: localhost: Running initial manifest /home/users/nico/oeffentlich/rechner/projekte/cdist/conf/manifest
^CFatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File "/usr/lib/python3.2/io.py", line 60, in <module>
handling in config
import _io
File "/usr/lib/python3.2/os.py", line 26, in <module>
[0:19] brief:~% import sys, errno
KeyboardInterrupt
/home/users/nico/oeffentlich/rechner/projekte/cdist/conf/manifest/init: line 6: 8370 Aborted __directory /tmp/foo/bar --parents yes --owner nico --group postdrop --recursive yes
[0:19] brief:~%
3)
[1:12] brief:cdist% ./bin/cdist config -vp -c ~/p/cdist-nutzung ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch
INFO: ikq06.ethz.ch: Running global explorers
INFO: ikq05.ethz.ch: Running global explorers
INFO: ikq07.ethz.ch: Running global explorers
INFO: ikq07.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest
INFO: ikq06.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest
INFO: ikq05.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest
INFO: ikq07.ethz.ch: Running object manifests and type explorers
INFO: ikq07.ethz.ch: Running manifest and explorers for __ethz_collectd/singleton
INFO: ikq05.ethz.ch: Running object manifests and type explorers
INFO: ikq05.ethz.ch: Running manifest and explorers for __ethz_collectd/singleton
^Ccatch, ikq05.ethz.ch
catch, ikq07.ethz.ch
[1:12] brief:cdist% ./bin/cdist config -vp -c ~/p/cdist-nutzung ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch
INFO: ikq05.ethz.ch: Running global explorers
INFO: ikq06.ethz.ch: Running global explorers
INFO: ikq07.ethz.ch: Running global explorers
INFO: ikq05.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest
INFO: ikq06.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest
INFO: ikq07.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest
^CTraceback (most recent call last):
File "/usr/lib/python3.2/site.py", line 529, in <module>
catch, ikq05.ethz.ch
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File "/usr/lib/python3.2/io.py", line 60, in <module>
catch, ikq07.ethz.ch
main()
File "/usr/lib/python3.2/site.py", line 517, in main
catch, ikq06.ethz.ch
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python3.2/site.py", line 263, in addusersitepackages
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File "/usr/lib/python3.2/io.py", line 60, in <module>
user_site = getusersitepackages()
File "/usr/lib/python3.2/site.py", line 238, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib/python3.2/site.py", line 228, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib/python3.2/sysconfig.py", line 577, in get_config_var
return get_config_vars().get(name)
File "/usr/lib/python3.2/sysconfig.py", line 474, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib/python3.2/sysconfig.py", line 344, in _init_posix
parse_config_h(f, vars)
File "/usr/lib/python3.2/sysconfig.py", line 386, in parse_config_h
line = fp.readline()
File "/usr/lib/python3.2/codecs.py", line 302, in decode
self.buffer = data[consumed:]
KeyboardInterrupt
import _io
File "/usr/lib/python3.2/os.py", line 49, in <module>
import posixpath as path
File "/usr/lib/python3.2/posixpath.py", line 11, in <module>
import _io
File "/usr/lib/python3.2/os.py", line 44, in <module>
""" from posix import *
KeyboardInterrupt
/home/users/nico/p/cdist-nutzung/conf/manifest/init: line 10: 19830 Aborted __ethz_systems_root_via_ssh $ik --state present
KeyboardInterrupt
[1:12] brief:cdist% /home/users/nico/p/cdist-nutzung/conf/manifest/init: line 10: 19829 Aborted __ethz_systems_root_via_ssh $ik --state present

View file

@ -0,0 +1,8 @@
require="__broken_type/foo" breaks too late
- always catch OSError/IOError: (check all occurences)
- type __director does not exist, abort in emulator
- if called type is not existing
- if required type is not existing
- type constructor fails if type does not exist
- test type emulator with non existent types -> should raise NoSuchTypeError

View file

@ -0,0 +1,28 @@
[...]
INFO: sgv-sysadmin-01: Running gencode and code for __director/home/services/nfs
Traceback (most recent call last):
File "./bin/cdist", line 211, in <module>
commandline()
File "./bin/cdist", line 110, in commandline
args.func(args)
File "./bin/cdist", line 113, in config
configinstall(args, mode=cdist.config.Config)
File "./bin/cdist", line 131, in configinstall
if not configinstall_onehost(host, args, mode, parallel=False):
File "./bin/cdist", line 177, in configinstall_onehost
c.deploy_and_cleanup()
File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/config_install.py", line 71, in deploy_and_cleanup
self.deploy_to()
File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/config_install.py", line 66, in deploy_to
self.stage_run()
File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/config_install.py", line 164, in stage_run
self.object_run(cdist_object)
File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/config_install.py", line 143, in object_run
self.object_run(required_object)
File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/config_install.py", line 135, in object_run
cdist_object.ran = True
File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/util/fsproperty.py", line 237, in __set__
open(path, "w").close()
IOError: [Errno 2] No such file or directory: '/home/users/nico/.tmp/tmp2gau4p/out/object/__director/home/services/nfs/.cdist/ran'
[10:43] brief:cdist-nutzung%

View file

@ -0,0 +1,9 @@
- create new branch
- entry point = conf/manifest/init
- make man for reference
- doc: change to version directory
- add sudo example
- ports are configured in ~/.ssh/config
- cdist daustrap $rechner
- alles gut mit enimal passwort eingeben

View file

@ -0,0 +1,52 @@
Any: [supported everywhere [tm]]
Python 3.2.2 (via source)
=> solution for distros with python < 3.2
Arch: [supported]
python 3.2.2-2
CentOS: [no python 3]
Python 2.6.6
Debian: [supported in testing]
Package python3
squeeze (stable) (python): interactive high-level object-oriented language (default python3 version) 3.1.3-12: all
wheezy (testing) (python): interactive high-level object-oriented language (default python3 version) 3.2.2~rc1-2: all
sid (unstable) (python): interactive high-level object-oriented language (default python3 version) 3.2.2~rc1-2: all
Fedora: [supported since 2011-05-24]
14: python3-3.1.2-14.fc14
15: python3-3.2-1.fc15
16: python3-3.2.1-1.fc16
17: python3-3.2.2-8.fc17
FreeBSD:
python32 - 3.2.2
Gentoo:
python 3.2.2
NetBSD:
python 3.1.4
OpenBSD:
2.7.1 on -current
2.5 & 3.2 maintained in ports
OpenSuse [supported since 2011-11]
11.4: python3-3.1.3-3.3.x86_64.rpm
12.1: python3-3.2.1-5.1.3.x86_64.rpm
Redhat 6: [no python 3]
See Centos 6
Slackware: [no python 3]
python-2.6.6-i486-1.txz
Ubuntu: [>= natty, supported since 2011-04]
Package python3
lucid (python): An interactive high-level object-oriented language (default python3 version) 3.1.2-0ubuntu1: all
maverick (python): interactive high-level object-oriented language (default python3 version) 3.1.3-3ubuntu5~really3.1.2: all
natty (python): interactive high-level object-oriented language (default python3 version) 3.2-1ubuntu1: all
oneiric (python): interactive high-level object-oriented language (default python3 version) 3.2.2-0ubuntu2: all
precise (python): interactive high-level object-oriented language (default python3 version) 3.2.2-0ubuntu2: all

View file

@ -0,0 +1 @@
https://news.ycombinator.com/item?id=3422678

View file

@ -0,0 +1,2 @@
http://haarts.tumblr.com/post/16015091140/cdist-the-setup
http://d.hatena.ne.jp/kinneko/20120111/p26

View file

@ -0,0 +1,36 @@
If a type explorer depends on a command that will be generated by another type,
the operation fails, as can be seen below.
This may be a corner case, but is hapenning with __package_pip and
__python_virtualenv.
[19:10] brief:cdist% ./bin/cdist config -v loch
INFO: loch: Running global explorers
INFO: loch: Running initial manifest /home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/manifest
INFO: loch: Running object manifests and type explorers
INFO: loch: Running manifest and explorers for __git/root/shinken
INFO: loch: Running manifest and explorers for __package_pip/pyro
/var/lib/cdist/conf/type/__package_pip/explorer/state: line 38: /root/shinken_virtualenv/bin/pip: No such file or directory
INFO: loch: Running manifest and explorers for __python_virtualenv/root/shinken_virtualenv
INFO: loch: Running manifest and explorers for __directory/pyro
INFO: loch: Running manifest and explorers for __directory/root/shinken
INFO: loch: Running manifest and explorers for __directory/root/shinken_virtualenv
INFO: loch: Running manifest and explorers for __package/git
INFO: loch: Running manifest and explorers for __package/python-virtualenv
INFO: loch: Running manifest and explorers for __package_pacman/git
INFO: loch: Running manifest and explorers for __package_pacman/python-virtualenv
INFO: loch: Generating and executing code
INFO: loch: Generating and executing code for __package_pacman/git
INFO: loch: Generating and executing code for __package/git
INFO: loch: Generating and executing code for __directory/root/shinken
INFO: loch: Generating and executing code for __git/root/shinken
fatal: write error: No space left on device
fatal: index-pack failed
ERROR: loch: Code that raised the error:
git clone --quiet "git://github.com/naparuba/shinken.git" "/root/shinken"
ERROR: Remote script execution failed: ssh -o User=root -q loch /bin/sh -e /var/lib/cdist/object/__git/root/shinken/.cdist/code-remote
WARNING: Failed to deploy to the following hosts: loch
INFO: Total processing time for 1 host(s): 340.62370681762695
[19:17] brief:cdist% ./bin/cdist config -v loch

View file

@ -0,0 +1,18 @@
__typename /foo/bar # possible, usual use case
require="__a//b" __typename /foo/bar # possible and happens often for __a/$id in loops
__typename /foo/bar/ # trailing slash will be stripped, can be documented
__typename /foo//bar//baz # // will be converted to / implicitly through fs; error prone; disallow
require="__a//b//c" __typename # // will be converted to / implicitly through fs; error prone; disallow
Solution:
1) allow require __a//b: type __a, object id /b
=> strip first slash of object id, as we do in non-dep-mode
2) allow _one_ trailing /: __type /foo/bar/ and require="__foo/abc/"
=> strip one leading slash of object id
3) disallow // within object id
4) disallow starting or ending / after 1) and 2)

View file

@ -0,0 +1,23 @@
possible dependencies:
- unix pattern __foo/*
- object: __foo//bar, __foo/bar
- singleton with object_id: __foo/singleton
- singleton without object_id: __foo/
solving dependencies:
solve_dep(object, run_list):
- list = [me]
- if status == IN_DEPENDENCY:
fail: circular dependency
- status = IN_DEPENDENCY
- create_list_of_deps(object)
- try pattern expansion
- for each dependency:
if object does not exist:
fail
else:
list.append(solve_dep(object, run_list)):
- status == IN_LIST
- return [me, dependencies [, dependencies of dependencies]]

View file

@ -0,0 +1,132 @@
- parameter/setting default from manifest
==> BRANCH[feature_default_parameters],
==> PERSON[Steven or Nico]
==> PROPOSAL(1)
- current bug
- proposal 1: parameter/default/$name (for optional ones)
- new way
- catches --state absent|present
- needs changes of types
- also possible for explorer
- support for it in core?
- handling of ${o} $o "$o" ?
- handling which variables?
- introduction of "templating language"
- aka macros
- possible problems:
- inconsistency
- redoing shell functionality
- raising expectations for more templating from users
- possible benefit
- no need for eval
- once in core, not everytime in type
- OTOH: one extra word.
- a=$(cat $__object/parameter/name) vs. $(eval $(cat $__object/parameter/name))
- only possible for static defaults
- --name overrides name not possible vs. object_id
- Is this the only case????
- if yes: don't care.
- possible solution:
- echo '/$__object_id' > typename/parameter/default/name
- eval $(cat $__object/parameter/name)
- probably allows code injection
- is possible anyway???
- $(cat /etc/shadow)
- other eval side effects???
- none: go for it
- some: have headache
- many: don't do
- proposal 2: 2 dbs (user input vs. stuff changable by type)
- explicit 2nd db [parameter_user and parameter/]
- not very clean (both agreed)
- proposal 3: parameter are read-only
- breaks current types (in core probably elsewhere)
- can't enforce, but user is on his own => breaks, her problem
+ clean seperation between core and type (nico)
- parameter belongs to type not core (steven)
- proposal 4: core ignores changes in parameter/* of object
- implicit 2nd db [see automagic below]
- steven+++
- does not work with divergent emulator not being in core
- because emulators primary db __is__ fs.
1 manifest:
__foo bar == emulator
echo present > $__global/object/__foo/bar/parameter/state
# fails
__foo bar == emulator
! automagic / filesystem
! fsproperty:
- kill, write explicitly to disk
==> BRANCH[cleanup_fsproperty]
==> PERSON[Steven]
==> PROPOSAL(just cleanup)
- implicit/automatic writes/read to fs
- explicit interfaces are better then implicit
- same problems as in cdist 1.x to 2.x move! (environment!)
- format on disk should not change/dictate code flow
- degrade python to shell (nico++! steven--)
- user should not care about python, ruby, .net or ASM implementation (steven++ nico++)
? proposal 1: diverge emulator / core
- emulator verifies input
- emulator writes to fs
- core reads/syncs from/to fs before passing control to user
? proposal 2: emulator is dumb and passes data to core
- core creates objects
- no fs involved
- core reads/syncs from/to fs before passing control to user
- passing:
- full objects via pickle
- parameters only
- how???
- unix socket?
- not everywhere possible?
- tcp / ip
- not everywhere possible
- chroot / local only
- rfc 1149
- not everywhere possible
- missing avian carriers
- 0mq
- not everywhere possible
- not installed
- shm (ipcs and friends)
- not everywhere possible
- no /dev/shm, different libraries? cleanups needed...
- what speaks against FS?
- emulator_input/.../
- nico: to fancy probably
! boolean implementation
==> BRANCH[feature_boolean_parameter]
==> PERSON[Steven]
- nico:
- parameters/boolean: document
- argparse changes (consider parameters/boolean)
- create
- can be implemented with changes in emulator
- use store_true, del if false => never seen by core
- INDEPENDENT INDEPENDT OF FS.PROPERTIES!!111111!
- emulator:
- how much integrated into core
- also: using CdistObject????
- dependency on filesystem: good (nico) | bad (steven)
- singleton / support without object_id
- not discussed
- __apt_ppa:
==> BRANCH[bugfix_do_not_change_state_in_manifest]
==> PERSON[Nico]
- logging divergent between emulator / core
- no problem (nico)
- may be helpful (steven)

View file

@ -0,0 +1,48 @@
Somewhere there is still a race condition:
INFO: monitoring03: Running manifest and explorers for __file/etc/yum.repos.d/epel.repo
^C^CTraceback (most recent call last):
File "./bin/cdist", line 204, in <module>
import logging
File "/usr/lib/python3.2/logging/__init__.py", line 27, in <module>
from string import Template
File "/usr/lib/python3.2/string.py", line 178, in <module>
class Formatter:
File "/usr/lib/python3.2/string.py", line 179, in Formatter
def format(self, format_string, *args, **kwargs):
KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./bin/cdist", line 232, in <module>
sys.exit(0)
NameError: name 'sys' is not defined
^C^CFatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File "/usr/lib/python3.2/encodings/latin_1.py", line 8, in <module>
"""
KeyboardInterrupt
^C% [12:19] brief:cdist%
--------------------------------------------------------------------------------
[13:50] brief:cdist% ./bin/cdist config -vp monitoring02
INFO: monitoring02: Running global explorers
INFO: monitoring02: Running initial manifest /home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/manifest
INFO: monitoring02: Running object manifests and type explorers
INFO: monitoring02: Running manifest and explorers for __localch_shinken/singleton
^CTraceback (most recent call last):
File "/usr/lib/python3.2/site.py", line 58, in <module>
import traceback
File "/usr/lib/python3.2/traceback.py", line 3, in <module>
import linecache
File "/usr/lib/python3.2/linecache.py", line 10, in <module>
import tokenize
File "/usr/lib/python3.2/tokenize.py", line 49, in <module>
class TokenInfo(collections.namedtuple('TokenInfo', 'type string start end line')):
File "/usr/lib/python3.2/collections.py", line 363, in namedtuple
exec(class_definition, namespace)
File "<string>", line 1, in <module>
KeyboardInterrupt

View file

@ -0,0 +1,8 @@
require="__package/pkg-config" \
__package libxml2 --version "2.7.8_1" --state installed --pkgsite http://192.168.196.70
Kein
INFO: www: Generating and executing code for __package_pkg_freebsd/libxml2
für
__package/libxml2

View file

@ -0,0 +1,26 @@
- errors do not contain host
- it's not logged which hosts failed!
INFO: monitoring02: Running manifest and explorers for __directory/opt/local.ch/sys/shinken/host.d
INFO: monitoring03: Running manifest and explorers for __file/usr/sbin/iptables-rebuild
INFO: monitoring03: Running manifest and explorers for __git/opt/local.ch/sys/shinken/shinken
INFO: monitoring02: Running manifest and explorers for __file/etc/iptables.d/005_start
INFO: monitoring03: Running manifest and explorers for __localch_rsyncd/singleton
ERROR: Object __localch_iptables/xensnmp already exists with conflicting parameters:
/home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/manifest/init: {'rule': '-A RH-Firewall-1-INPUT -p tcp --dport 161 -j ACCEPT'}
/home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/type/__localch_rsyncd/manifest: {'rule': '-A RH-Firewall-1-INPUT -p tcp --dport 873 -j ACCEPT'}
ERROR: Command failed: /bin/sh -e /home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/type/__localch_rsyncd/manifest
INFO: monitoring02: Running manifest and explorers for __file/etc/iptables.d/500_xensnmp
INFO: monitoring02: Running manifest and explorers for __file/etc/iptables.d/995_end
INFO: monitoring02: Running manifest and explorers for __file/etc/rsyncd.conf
INFO: monitoring02: Running manifest and explorers for __file/etc/yum.repos.d/epel.repo
INFO: monitoring02: Running manifest and explorers for __file/etc/yum.repos.d/rpmforge.repo
INFO: monitoring02: Running manifest and explorers for __file/usr/sbin/iptables-rebuild
INFO: monitoring02: Running manifest and explorers for __git/opt/local.ch/sys/shinken/shinken
INFO: monitoring02: Running manifest and explorers for __localch_rsyncd/singleton
ERROR: Object __localch_iptables/xensnmp already exists with conflicting parameters:
/home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/manifest/init: {'rule': '-A RH-Firewall-1-INPUT -p tcp --dport 161 -j ACCEPT'}
/home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/type/__localch_rsyncd/manifest: {'rule': '-A RH-Firewall-1-INPUT -p tcp --dport 873 -j ACCEPT'}
ERROR: Command failed: /bin/sh -e /home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/type/__localch_rsyncd/manifest
INFO: Total processing time for 2 host(s): 14.245397090911865
[16:53] brief:cdist%

View file

@ -0,0 +1,27 @@
# From curl http://armstrong.cc/~steven/tmp/makedirs.py:
#!/usr/bin/env python2
import os
def makedirs(path, mode=0o777, exist_ok=False):
try:
os.makedirs(path, mode=mode, exist_ok=exist_ok)
except TypeError:
try:
os.makedirs(path, mode=mode)
except OSError as e:
if exist_ok and e.errno == 17: # File exists
pass
else:
raise
makedirs('/tmp/python/makedirs')
try:
makedirs('/tmp/python/makedirs')
except OSError as e:
print(e)
makedirs('/tmp/python/makedirs', exist_ok=True)

View file

@ -0,0 +1,177 @@
Here are some "ifconfig -a" outputs that help for the explorer/ifaces parser.
The current regexp is 's/^(.*)(:[[:space:]]*flags=|Link encap).*/\1/p'
You should get the interface list when you run:
ifconfig -a | sed -n -r 's/^(.*)(:[[:space:]]*flags=|Link encap).*/\1/p'
If you don't maybe try to replace the sed -r option by -E (works on Darwin).
If you still don't get any output, the regexp might be wrong.
On Archlinux:
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436 metric 1
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 300081 bytes 49637437 (47.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 300081 bytes 49637437 (47.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
inet 192.168.1.38 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::ba8d:12ff:fe15:fdfa prefixlen 64 scopeid 0x20<link>
ether b8:8d:12:15:fd:fa txqueuelen 1000 (Ethernet)
RX packets 421381 bytes 442228597 (421.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 319266 bytes 41111233 (39.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
On Debian Linux:
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
eth0 Link encap:Ethernet HWaddr 00:16:17:55:2d:00
inet addr:172.16.5.2 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::216:17ff:fe55:2d00/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2854022168 errors:5 dropped:0 overruns:0 frame:4
TX packets:2200088072 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2708386800354 (2.4 TiB) TX bytes:531552070314 (495.0 GiB)
Base address:0x3000 Memory:d0120000-d0140000
eth0:1 Link encap:Ethernet HWaddr 00:16:17:55:2d:00
inet addr:172.16.5.1 Bcast:172.16.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Base address:0x3000 Memory:d0120000-d0140000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:36487087 errors:0 dropped:0 overruns:0 frame:0
TX packets:36487087 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3388870184 (3.1 GiB) TX bytes:3388870184 (3.1 GiB)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
tap0 Link encap:Ethernet HWaddr 16:db:17:fb:a1:4a
inet addr:10.254.0.1 Bcast:10.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::14db:17ff:fefb:a14a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)
bond0 Link encap:Ethernet HWaddr 00:13:72:3c:bf:57
inet6 addr: fe80::213:72ff:fe3c:bf57/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:6930494799 errors:0 dropped:38584515 overruns:0 frame:17
TX packets:1678579772 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10006832472618 (9.1 TiB) TX bytes:168031719693 (156.4 GiB)
bond0.123 Link encap:Ethernet HWaddr 00:13:72:3c:bf:57
inet addr:10.73.38.250 Bcast:10.73.38.255 Mask:255.255.255.0
inet6 addr: fe80::213:72ff:fe3c:bf57/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12382478 errors:0 dropped:5777 overruns:0 frame:0
TX packets:564 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:586071334 (558.9 MiB) TX bytes:64180 (62.6 KiB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:172.31.255.9 P-t-P:172.31.255.10 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:9655 errors:0 dropped:0 overruns:0 frame:0
TX packets:15118 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1760236 (1.6 MiB) TX bytes:14929984 (14.2 MiB)
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
On OpenBSD:
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33160
priority: 0
groups: lo
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff000000
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:50:56:b3:00:15
priority: 0
groups: egress
media: Ethernet autoselect (1000baseT full-duplex,master)
status: active
inet6 XXXX::XXX:XXXX:XXXX:XX%em0 prefixlen 64 scopeid 0x1
inet6 XXXX:XXX:XXX:XX::XXX prefixlen 64
inet XXX.XXX.XXX.XXX netmask 0xffffffc0 broadcast XXX.XXX.XXX.XXX
enc0: flags=0<>
priority: 0
groups: enc
status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33160
priority: 0
groups: pflog
tun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
priority: 0
groups: tun
status: active
inet 172.31.255.13 --> 172.31.255.14 netmask 0xffffffff
tun2: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1500
priority: 0
groups: tun
status: down
inet 172.31.253.1 --> 172.31.253.2 netmask 0xffffffff
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
priority: 0
groups: tun
status: active
inet 172.31.254.1 --> 172.31.254.2 netmask 0xffffffff
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
On Darwin:
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 34:15:9e:2e:8b:aa
inet6 fe80::3615:9eff:fe2e:8baa%en0 prefixlen 64 scopeid 0x4
inet 192.168.1.102 netmask 0xffffff00 broadcast 192.168.1.255
media: autoselect (100baseTX <full-duplex,flow-control>)
status: active
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 7c:6d:62:a3:6f:57
inet6 fe80::7e6d:62ff:fea3:6f57%en1 prefixlen 64 scopeid 0x5
inet 192.168.2.105 netmask 0xffffff00 broadcast 192.168.2.255
media: autoselect
status: active
fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078
lladdr 34:15:9e:ff:fe:2e:8b:aa
media: autoselect <full-duplex>
status: inactive
tun0: flags=8851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 172.31.255.29 --> 172.31.255.30 netmask 0xffffffff
open (pid 24727)
tun1: flags=8851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 172.31.254.25 --> 172.31.254.26 netmask 0xffffffff
open (pid 24757)
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

View file

@ -0,0 +1,10 @@
If root's shell is csh or other non-sh compatible, we have problems.
See https://github.com/telmich/cdist/issues/54.
Stuff to try out:
- "-o SendEnv name" [may break remote exec/copy]
- cat * | /bin/sh -s could also work, needs testing though
Somebody who is affected should give this a try, especially the 2nd
variant.

View file

@ -0,0 +1,134 @@
{{db-spam}}
{{Infobox software
|name = cdist
|logo =
|screenshot =
|caption =
|collapsible =
|author = Nico Schottelius, Steven Armstrong
|developer =
|released = 2010
|latest release version = 2.0.13
|latest release date = 05-Jun-2012
|frequently updated =
|programming language = [[Python_(programming_language)|Python]], [[Bourne shell]]
|operating system = [[GNU/Linux]], [[Unix-like]]
|platform =
|size =
|language =
|status =
|genre = [[Configuration management]]
|license = [[GPLv3]].
|website = http://www.nico.schottelius.org/software/cdist/
}}
'''cdist''' is a configuration management system, which adheres to the [[KISS_principle]]. It is being used in small up to enterprise grade environments.
cdist is an alternative to other configuration management systems [[CFEngine]], [[Bcfg2]], [[Chef (software)|Chef]] and [[Puppet (software)|Puppet]].
cdist development started in 2010 at [[ETH Zurich]] and is actively being developed by a lot of [[FOSS]] contributors
and maintained by the two main developers Nico Schottelius and
Steven Armstrong. cdist is being watched on github by more than 100 people and has more than 30 forks.<ref>cdist development at https://github.com/telmich/cdist</ref>
The major part of the discussion about cdist happens on the mailinglist<ref>cdist mailinglist http://l.schottelius.org/mailman/listinfo/cdist</ref>
and on the IRC channel #cstar in the [[Freenode]] network. cdist is being used at various companies in Switzerland (for instance at [[ETH Zurich]]), the USA, Germany and France.
Its core is written in [[Python (programming language)|Python]] and the types are
written in [[Bourne Shell]]. Cdist is released under the [[GNU General Public License|GPL]].
cdist has been a no. 1 topic on [[Hacker News]] for some time.<ref>cdist on [[Hacker News]] https://news.ycombinator.com/item?id=3422678</ref>
== Architecture ==
cdist is split into two components:
* The core
* The configuration
=== Core ===
The core of cdist is implemented in Python 3 and provides the executables to configure target hosts. The core operates in a push model: It connects
from the source host '''to''' the target hosts and configures the machines. For communication and file transfer [[SSH]] is being used.
To allow parallel configuration of hosts, the core supports a parallel mode in which it creates a child process for every connection.
This model allows cdist to scale horizontally with the available computing resources: If at a certain limit is reached and the capacity of the
available CPUs has been used, adding another CPU or distributing cdist to multiple hosts allows to configure more hosts in parallel.
=== Configuration ===
The configuration is written in [[Bourne Shell]] and consists of
* The initial manifest (which defines which host is assigned which types)
* Global Explorers (to gain information about the target system)
* Types (which provide all functionality and consist of a manifest, type explorers and gencode scripts)
Although all of these are written in Shell script, the order of execution in the manifests does not matter: cdist employs a idempotent
configuration.
=== Comparison ===
In comparison to most other configuration management software, cdist does not have any requirements on the target host besides SSH and a bourne shell.
It requires Python 3.2 on the source host, though.<ref>Why cdist requires Python 3.2 on the source host - http://www.nico.schottelius.org/blog/cdist-python-3.2-requirement/</ref>
cdist operates in push based approach, in which a server pushes configurations to the client and the clients do not poll for updates.
== Configuration DSL ==
All user configurable parts are contained in manifests or gencode-scripts, which are shell scripts.
Shell scripts were chosen, because Unix System Administrators are usually profound in reading
and writing shell scripts.
cdist reads its configuration from the initial manifest ('''conf/manifest/init'''), in which hosts are mapped to
types:
<pre>
case "$__target_host" in
myhostname)
__package zsh --state present
__addifnosuchline /tmp/cdist-welcome --line "Welcome to cdist"
;;
esac
</pre>
When using the types in cdist, they are called like normal programs in manifests and can make use of
advanced parameter parsing as well as reading from stdin:
<pre>
# Provide a default file, but let the user change it
__file /home/frodo/.bashrc --source "/etc/skel/.bashrc" \
--state exists \
--owner frodo --mode 0600
# Take file content from stdin
__file /tmp/whatever --owner root --group root --mode 644 --source - << DONE
Here goes the content for /tmp/whatever
DONE
</pre>
Dependencies are expressed by setting up the '''require''' environment variable:
<pre>
__directory /tmp/foobar
require="__directory//tmp/foobar" __file /tmp/foobar/baz
</pre>
Access to paths and files within types is given by environment variables like $__object.
== See also ==
{{Portal|Free software}}
* [[Comparison of open source configuration management software]]
== References ==
{{reflist}}
== External links ==
* [http://www.nico.schottelius.org/software/cdist/ cdist Website]
* [https://github.com/telmich/cdist Github home]
* [http://l.schottelius.org/mailman/listinfo/cdist cdist mailinglist]
* [https://freecode.com/projects/cdist cdist on freecode]
[[Category:Configuration management]]
[[Category:Free software programmed in Python]]
[[Category:2010 software]]
[[Category:Linux configuration utilities]]
[[Category:Mac OS X]]
[[Category:Linux package management-related software]]
[[Category:Unix package management-related software]]

View file

@ -0,0 +1,4 @@
Known bug rediscovered:
Explorer for __start_on_boot mysql runs before __package mysql was finished.
Requires two runs to actually finish the task.

View file

@ -0,0 +1,27 @@
Seen error:
INFO: dns-vm-inx01: Generating and executing code for __package/bind-chroot
INFO: dns-vm-inx01: Generating and executing code for __directory/var/named
INFO: dns-vm-snr01: Running manifest and explorers for __directory/opt/local.ch/sys/icinga/conf.d
INFO: dns-vm-inx02: Running manifest and explorers for __directory/opt/local.ch/sys
mkdir: cannot create directory `/var/named': File exists
ERROR: Command failed: ssh -o User=root -q dns-vm-inx01 umask 077; /bin/sh -e /var/lib/cdist/object/__directory/var/named/.cdist/code-remote
INFO: dns-vm-snr01: Running manifest and explorers for __directory/opt/local.ch/web
INFO: dns-vm-inx02: Running manifest and explorers for __directory/opt/local.ch/sys/bin
INFO: dns-vm-snr02: Running manifest and explorers for __directory/opt/local.ch/web
Problem source:
__directory/var/named explorer detects that the directory is missing
__package/named gencode-remote installs package, which creates directory
__directory/var/named gencode-remote outputs mkdir
Solutions:
- don't use __directory, because __package does already the job (clean solution)
- re-run explorer before gencode-* stage
- gencode-remote would have caught that
Not sure yet - although the latter feature has been requested, the first
solution looks better (more clean) to this problem.

1
docs/dev/logs/README Normal file
View file

@ -0,0 +1 @@
Logfiles of discussions

8
docs/dev/logs/linklist Normal file
View file

@ -0,0 +1,8 @@
http://groups.google.com/group/puppet-users/browse_thread/thread/83801a03c0fea665
http://lists.debian.org/debian-user/2011/04/msg00818.html
http://sans.ethz.ch/projects/puppet/
http://www.nico.schottelius.org/eth/puppet/
http://www.reddit.com/r/linux/comments/gvi29/
http://www.reddit.com/r/programming/comments/gvhqo/cdist_a_zero_dependency_shell_based_configuration/
http://news.ycombinator.com/item?id=2478427
http://www.kerunix.com/content/cdist

2
docs/dev/logs/times Normal file
View file

@ -0,0 +1,2 @@
# version comment sourcehost seconds hostlist
1.6.2-24-gac157aa donotcreateemptycode kr 17 kr

72
docs/dev/releasechecklist Executable file
View file

@ -0,0 +1,72 @@
#!/bin/sh
# Nico Schottelius
files="doc/changelog lib/cdist/__init__.py"
# Stuff to take care of when doing a release
echo "Preparing next release"
# Ensure documentation builds cleanly
echo "Testing documentation..."
./build clean && ./build man || exit 1
# get version
changelog_version=$(grep '^[[:digit:]]' doc/changelog | head -n1 | sed 's/:.*//')
#git_version=$(git describe)
lib_version=$(grep "^ VERSION" lib/cdist/__init__.py | sed -e 's/.*= //' -e 's/"//g')
# get date
date_today="$(date +%Y-%m-%d)"
date_changelog=$(grep '^[[:digit:]]' doc/changelog | head -n1 | sed 's/.*: //')
echo "Ensure you fixed/prepared version files: $files"
echo "changelog: $changelog_version"
#echo "git: $git_version"
echo "lib: $lib_version"
if [ "$date_today" != "$date_changelog" ]; then
echo "Messed up date, not releasing:"
echo "Changelog: $date_changelog"
exit 1
fi
if [ "$lib_version" != "$changelog_version" ]; then
echo "Messed up versions, not releasing"
exit 1
else
echo "Versions are sane, continuing"
fi
echo "Press enter to continue"
read wait
version=$lib_version
# get target branch
branch=${version%\.*}
# add tag
printf "Enter tag description for %s> " "$version"
read tagmessage
git tag "$version" -m "$tagmessage"
# Import into current version branch
printf "Press enter to git merge into branch \"$branch\" > "
read prompt
git checkout $branch
git merge master
git checkout master
# Publish manpages and sourcecode
printf "Press enter to publish doc/ and code/ > "
read prompt
./build web
./build pub
cat << notes
To be done manually...
- freecode release
- blog entry
- linkedin entry
- mailinglist update
notes

View file

@ -0,0 +1,25 @@
#!/bin/sh
#
# 2010-2011 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/>.
#
#
# Generate documentation of exported variables
#
cat bin/* | awk '/^export/ { print $2 }'

28
docs/dev/sync-to-testhost Executable file
View file

@ -0,0 +1,28 @@
#!/bin/sh
#
# 2011 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/>.
#
#
# Sync repo to testhosts
#
dirs="cdist cdist-nutzung"
for dir in $dirs; do
rsync -av --delete /home/users/nico/p/$dir/ root@rnic01:$dir
done

1
docs/dev/todo/3.0 Normal file
View file

@ -0,0 +1 @@
- remove __self and all references to it

53
docs/dev/todo/TAKEME Normal file
View file

@ -0,0 +1,53 @@
UNASSIGNED TODOS
----------------
The following list of todos has not been assigned to any developer.
Feel free to pick one!
CORE
----
- support default parameter
- document and add paremeters for remote-copy and remote-exec!
- remove hack, make a feature of it
- remove var=foo calls on remote side. Use -o SendEnv (yeah, see ssh_config(5))
TESTS
-----
- multiple defines of object:
- fail if different parameters
- succeed if same parameters
- verify that all env variables in doc/man/cdist-reference.text.sh
exist in the right stages
- test DependencyResolver
USER INTERFACE
--------------
- How to cleanly implement "restart service if config file changed"
-> document
- Cache
- add example how to use
- export variable $__cache
-> for current host
-> add function to cdist-config, import from cdist-cache
- Define / document "this is what should be on host X"
and have it parsable by different (shinken) tool
-> given after manifest run already!
- use absent/present for state by default?
- buggy output with packages that don't exist in archlinux and fedora:
python3 vs. python
TYPES
------
- Add testing framework (proposed by Evax Software)
- __user
add option to include --create-home
- Merge __addifnosuchline and __removeline into __line + --state present|absent
- __cron: Support --file to be used instead of user cron (probably direct support
of /etc/cron.d)
- Support uci from openwrt?
- http://wiki.openwrt.org/doc/uci

Some files were not shown because too many files have changed in this diff Show more