forked from ungleich-public/cdist
Merge branch 'master' into 4.0-pre-not-stable
This commit is contained in:
commit
84159d18e0
46 changed files with 672 additions and 74 deletions
|
|
@ -12,8 +12,30 @@ Changelog
|
|||
* Core: Integrate initial preos support
|
||||
|
||||
|
||||
3.0.10:
|
||||
3.1.2:
|
||||
* Type __qemu_img: size is optional, if state is not present
|
||||
* New Type: __dog_vdi
|
||||
|
||||
3.1.1: 2014-03-26
|
||||
* Core: Make __object and __object_id available to code (Daniel Heule)
|
||||
* New explorer: cpu_cores (Daniel Heule/Thomas Oettli)
|
||||
* New explorer: cpu_sockets (Daniel Heule/Thomas Oettli)
|
||||
* New explorer: machine_type (Daniel Heule/Thomas Oettli)
|
||||
* New explorer: memory (Daniel Heule/Thomas Oettli)
|
||||
* Type __jail: Fix parameter names in explorer (Jake Guffey)
|
||||
* Type __line: Ensure permissions are kept (Steven Armstrong)
|
||||
* Type __link: Do not create link in directory, if link exists (Steven Armstrong)
|
||||
* Type __package_pkg_openbsd: Improve error handling (og)
|
||||
|
||||
3.1.0: 2014-03-19
|
||||
* New Type: __rbenv
|
||||
* Type __file: Enhance OpenBSD Support (og)
|
||||
* Type __git: Pass onwer/group/mode values to __directory
|
||||
* Type __iptable_rule: Fix example documentation (Antoine Catton)
|
||||
* Type __key_value: Add messaging support
|
||||
* Type __package_pkg_openbsd: Allow to change PKG_PATH (og)
|
||||
* Type __ssh_authorized_keys: Allow managing existing keys (Steven Armstrong)
|
||||
* Type __user: Enhance OpenBSD Support (og)
|
||||
|
||||
3.0.9: 2014-02-14
|
||||
* Core: Ignore order dependencies if override is set (Daniel Heule)
|
||||
|
|
@ -28,7 +50,6 @@ Changelog
|
|||
* Type __rvm_gemset: Use default parameters for state (Daniel Heule)
|
||||
* Type __rvm_ruby: Use default parameters for state (Daniel Heule)
|
||||
|
||||
|
||||
3.0.8: 2014-02-11
|
||||
* Core: Enhance object id verification (Daniel Heule)
|
||||
* Core: Add unit tests for dependencies based on execution order (Daniel Heule)
|
||||
|
|
|
|||
|
|
@ -4,4 +4,14 @@
|
|||
implemented as a proof of concept at:
|
||||
https://github.com/asteven/cdist/tree/type-namespaces
|
||||
|
||||
|
||||
|
||||
Execute all global explorers only when needed #286
|
||||
|
||||
My intention is to create a brunch of global explorer which are of use in some cases and makes cdist more userfriendly. But now, all global explorers are allways executed, even the return value of the explorers is never used.
|
||||
|
||||
I think a possible approach can be to replace the result files with pipes, and on first read of the pipe, the explorer is executed by the core, all following read calls from the pipe are answered from the core with the result of the first real execute of the explorer.
|
||||
|
||||
So cdist can have an unlimited number of global explorers and only used explorers are executed on the target host, all other explorers laying around are simply ignored.
|
||||
|
||||
Also a possible approach would be to create a new explorer type (dynamic explorers) which are sitting in a different directory to (for example dynexploer) and only this ones are executed with the conditional approach explained above. So the overhead to create pipes and monitor it is only in place on explorers which are not interesting for everyone ...
|
||||
|
|
|
|||
27
docs/dev/logs/2013-01-03.dependency-issue
Normal file
27
docs/dev/logs/2013-01-03.dependency-issue
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
Problem shown by using __rbenv:
|
||||
|
||||
__rbenv/nicotest
|
||||
__git /home/nico/.rbenv
|
||||
__package git
|
||||
__directory /home/nico/.rbenv
|
||||
|
||||
require="__git/home/nico/.rbenv"
|
||||
__git /home/nico/.rbenv/plugins/ruby-build
|
||||
__package git
|
||||
__directory /home/nico/.rbenv/plugins/ruby-build
|
||||
|
||||
|
||||
1) if children do NOT automatically depend on their parents requiremnts
|
||||
|
||||
__directory /home/nico/.rbenv/plugins/ruby-build fails:
|
||||
because __directory /home/nico/.rbenv/plugins is created by
|
||||
__git /home/nico/.rbenv, but __directory /home/nico/.rbenv/plugins/ruby-build
|
||||
does not depend on __git /home/nico/.rbenv
|
||||
|
||||
2) if children DO automatically depend on their parents requiremnts
|
||||
__package git from __git /home/nico/.rbenv/plugins/ruby-build depends on __git /home/nico/.rbenv.
|
||||
|
||||
__git /home/nico/.rbenv depends on __package git (via autorequire)
|
||||
|
||||
=> circular dependency, they depend on each other
|
||||
18
docs/dev/logs/2014-02-18.unauthenticated-packages
Normal file
18
docs/dev/logs/2014-02-18.unauthenticated-packages
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
- we cannot install packages, which are not authenticated:
|
||||
|
||||
INFO: voicerepublic-staging.sky.ungleich.ch: Executing code for __package_apt/deb-multimedia-keyring
|
||||
Reading package lists...
|
||||
Building dependency tree...
|
||||
Reading state information...
|
||||
The following NEW packages will be installed:
|
||||
deb-multimedia-keyring
|
||||
0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.
|
||||
Need to get 14.4 kB of archives.
|
||||
After this operation, 46.1 kB of additional disk space will be used.
|
||||
WARNING: The following packages cannot be authenticated!
|
||||
deb-multimedia-keyring
|
||||
E: There are problems and -y was used without --force-yes
|
||||
ERROR: voicerepublic-staging.sky.ungleich.ch: Command failed: ssh -o User=root -q voicerepublic-staging.sky.ungleich.ch /bin/sh -e /var/lib/cdist/object/__package_apt/deb-multimedia-keyring/.cdist/code-remote
|
||||
INFO: cdist: Total processing time for 1 host(s): 72.07943892478943
|
||||
ERROR: cdist: Failed to configure the following hosts: voicerepublic-staging.sky.ungleich.ch
|
||||
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2010-2013 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
# 2014 Daniel Heule (hda at sfs.biz)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
|
|
@ -209,10 +210,10 @@ __messages_out::
|
|||
Available for: initial manifest, type manifest, type gencode
|
||||
__object::
|
||||
Directory that contains the current object.
|
||||
Available for: type manifest, type explorer, type gencode
|
||||
Available for: type manifest, type explorer, type gencode and code scripts
|
||||
__object_id::
|
||||
The type unique object id.
|
||||
Available for: type manifest, type explorer, type gencode
|
||||
Available for: type manifest, type explorer, type gencode and code scripts
|
||||
Note: The leading and the trailing "/" will always be stripped (caused by
|
||||
the filesystem database and ensured by the core).
|
||||
Note: Double slashes ("//") will not be fixed and result in an error.
|
||||
|
|
|
|||
|
|
@ -252,6 +252,27 @@ echo "touch /etc/cdist-configured"
|
|||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
VARIABLE ACCESS FROM THE GENERATED SCRIPTS
|
||||
------------------------------------------
|
||||
In the generated scripts, you have access to the following cdist variables
|
||||
|
||||
- __object
|
||||
- __object_id
|
||||
|
||||
but only for read operations, means there is no back copy of this
|
||||
files after the script execution.
|
||||
|
||||
So when you generate a script with the following content, it will work:
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
if [ -f "$__object/parameter/name" ]; then
|
||||
name="$(cat "$__object/parameter/name")"
|
||||
else
|
||||
name="$__object_id"
|
||||
fi
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
HINTS FOR TYPEWRITERS
|
||||
----------------------
|
||||
It must be assumed that the target is pretty dumb and thus does not have high
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ To upgrade to the lastet version do
|
|||
|
||||
## General Update Instructions
|
||||
|
||||
### Updating from 3.0 to 3.1
|
||||
|
||||
The type **\_\_ssh_authorized_keys** now also manages existing keys,
|
||||
not only the ones added by cdist.
|
||||
|
||||
### Updating from 2.3 to 3.0
|
||||
|
||||
The **changed** attribute of objects has been removed.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue