commit
abaa79e19a
@ -1,35 +0,0 @@ |
||||
#!/bin/sh |
||||
# |
||||
# 2011 Steven Armstrong (steven-cdist at armstrong.cc) |
||||
# |
||||
# 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/>. |
||||
# |
||||
|
||||
# BIG FAT FIXME: there must be a better way to do this! |
||||
tmpdir=$(mktemp -d) |
||||
cleanup() { |
||||
rm -rf "$tmpdir" |
||||
} |
||||
trap cleanup EXIT |
||||
|
||||
should="$tmpdir/should" |
||||
is="$tmpdir/is" |
||||
|
||||
find "$__global/object/__apt_ppa" -path "*.cdist/parameter/state" | xargs cat > "$should" |
||||
find "$__global/object/__apt_ppa" -path "*.cdist/explorer/state" | xargs cat > "$is" |
||||
|
||||
diff -ru "$is" "$should" || echo apt-get update |
||||
|
@ -1,44 +0,0 @@ |
||||
cdist-type__apt_update_index(7) |
||||
========================== |
||||
Steven Armstrong <steven-cdist--@--armstrong.cc> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-type__apt_update_index - resynchronize the apt package index |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
This cdist type allows you to resynchronize the package index files from their |
||||
sources. In other words, it runs `apt-get update`. |
||||
|
||||
FIXME: currently hard coded to work together with the __apt_ppa type |
||||
|
||||
|
||||
REQUIRED PARAMETERS |
||||
------------------- |
||||
None. |
||||
|
||||
OPTIONAL PARAMETERS |
||||
------------------- |
||||
None. |
||||
|
||||
|
||||
EXAMPLES |
||||
-------- |
||||
|
||||
-------------------------------------------------------------------------------- |
||||
__apt_update_index |
||||
-------------------------------------------------------------------------------- |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist-type(7) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Steven Armstrong. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,12 @@ |
||||
The following list of todos has not been assigned to any developer. |
||||
|
||||
Feel free to pick one: |
||||
|
||||
Types to be written/extended: |
||||
- __ssh-keys (host/user) |
||||
- Think about __service - necessary? |
||||
- __file_edit |
||||
- regexp replace (can probably cover all?) |
||||
-> aka sed. |
||||
- __cron |
||||
|
@ -1,3 +1,23 @@ |
||||
Document redefine behaviour |
||||
release cdist 1.4.0 |
||||
perhaps include __self |
||||
Core: |
||||
- support $__self = relative_type/object_id |
||||
- cache |
||||
|
||||
Cache: |
||||
Assume you want to configure stuff one host ("monitor node"), |
||||
depending on the configuration of other hosts ("cluster nodes"). |
||||
|
||||
For instance, the monitor host would like to know, |
||||
which hosts are configured with the provider |
||||
"apache" and option --start true. |
||||
|
||||
This requires the monitor node to be able to |
||||
query all other configured nodes. It can't |
||||
ask for all hosts, because cdist does not |
||||
know which hosts are configured or may exist. |
||||
|
||||
Example implementation |
||||
|
||||
If cdist keeps ("caches") the configuration of every |
||||
node it configures, each new node can query the |
||||
cache for existing nodes that acquired the given |
||||
configuration. |
||||
|
@ -1,35 +0,0 @@ |
||||
Core: |
||||
- allow redefine object, if everything same |
||||
- support $__self = relative_type/object_id |
||||
- .cdist |
||||
- cache |
||||
- display changes if object cannot be merged to user |
||||
|
||||
Cache: |
||||
Assume you want to configure stuff one host ("monitor node"), |
||||
depending on the configuration of other hosts ("cluster nodes"). |
||||
|
||||
For instance, the monitor host would like to know, |
||||
which hosts are configured with the provider |
||||
"apache" and option --start true. |
||||
|
||||
This requires the monitor node to be able to |
||||
query all other configured nodes. It can't |
||||
ask for all hosts, because cdist does not |
||||
know which hosts are configured or may exist. |
||||
|
||||
Example implementation |
||||
|
||||
If cdist keeps ("caches") the configuration of every |
||||
node it configures, each new node can query the |
||||
cache for existing nodes that acquired the given |
||||
configuration. |
||||
|
||||
Types to be written/extended: |
||||
- __ssh-keys (host/user) |
||||
- __service |
||||
- __file_edit |
||||
- regexp replace (can probably cover all?) |
||||
-> aka sed. |
||||
- __cron |
||||
|
@ -0,0 +1,73 @@ |
||||
cdist-hacker(7) |
||||
=============== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-hacker - How to get (stuff) into cdist |
||||
|
||||
|
||||
WELCOME |
||||
------- |
||||
Welcome dear hacker! I invite you to a tour of pointers to |
||||
get into the usable configuration mangament system, cdist. |
||||
|
||||
The first thing to know is probably that cdist is brought to |
||||
you by people who care about how code looks like and who think |
||||
twice before merging or implementing a feature: Less features |
||||
with good usability are far better than the opposite. |
||||
|
||||
|
||||
UNDERSTANDING CDIST INTERNALS |
||||
----------------------------- |
||||
IF you are interested in how cdist internally works, you can open |
||||
bin/cdist-config and bin/cdist-deploy-to in your favorite editor and |
||||
read the scripts bin/cdist-deploy-to calls. The magnificent HACKERS_README |
||||
may be of great help as well. |
||||
|
||||
|
||||
CODING CONVENTIONS (CORE) |
||||
------------------------- |
||||
- All variables exported by cdist are prefixed with a double underscore (__) |
||||
- All cdist-internal variables are prefixed with __cdist_ and are generally not exported. |
||||
|
||||
|
||||
HOW TO SUBMIT STUFF FOR INCLUSION INTO UPSTREAM CDIST |
||||
----------------------------------------------------- |
||||
If you did some cool changes to cdist, which you value as a benefit for |
||||
everybody using cdist, you're welcome to propose inclusion into upstream. |
||||
|
||||
There are though some requirements to ensure your changes don't break others |
||||
work nor kill the authors brain: |
||||
|
||||
- Code submission must be done via git |
||||
- Code to be included should be branched of the upstream "master" branch |
||||
- Exception: Bugfixes to a version branch |
||||
- Code submissions must be in your master branch |
||||
- Exception: If you only want a comment on your code, but not an inclusion. |
||||
- Do not add conf/manifest/init - This file should only be touched in your |
||||
private branch! |
||||
|
||||
As soon as your work meets these requirements, you can contact me |
||||
(IRC, Mailinglist, Phone, RFC 1149) and I'll check your code before |
||||
including it. |
||||
|
||||
|
||||
HOW TO SUBMIT A NEW TYPE |
||||
------------------------ |
||||
Submitting a type works as described above, with the additional requirement |
||||
that a corresponding manpage named man.text in asciidoc format with |
||||
the manpage-name "cdist-type__NAME" is included in the type directory |
||||
AND asciidoc is able to compile it. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
Loading…
Reference in new issue