29 changed files with 109 additions and 1207 deletions
@ -1,483 +0,0 @@
|
||||
#!/bin/sh |
||||
# |
||||
# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org) |
||||
# 2016 Darko Poljak (darko.poljak at gmail.com) |
||||
# |
||||
# 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/>. |
||||
# |
||||
# |
||||
# This file contains the heavy lifting found usually in the Makefile |
||||
# |
||||
|
||||
# vars for make |
||||
helper=$0 |
||||
|
||||
basedir=${0%/*}/../ |
||||
# run_as is used to check how the script is called (by $0 value) |
||||
# currently supported sufixes for $0 are: |
||||
# .freebsd - run as freebsd |
||||
basename=${0##*/} |
||||
run_as=${basename#*.} |
||||
case "$run_as" in |
||||
freebsd) |
||||
to_a=cdist-configuration-management |
||||
to_d=googlegroups.com |
||||
from_a=darko.poljak |
||||
from_d=gmail.com |
||||
ml_name="Darko Poljak" |
||||
ml_sig_name="Darko" |
||||
|
||||
# vars for make |
||||
WEBDIR=../vcs/www.nico.schottelius.org |
||||
;; |
||||
*) |
||||
to_a=cdist |
||||
to_d=l.schottelius.org |
||||
from_a=nico-cdist |
||||
from_d=schottelius.org |
||||
ml_name="Nico -telmich- Schottelius" |
||||
ml_sig_name="Nico" |
||||
|
||||
# vars for make |
||||
WEBDIR=$$HOME/vcs/www.nico.schottelius.org |
||||
;; |
||||
esac |
||||
|
||||
# Change to checkout directory |
||||
cd "$basedir" |
||||
|
||||
version=$(git describe) |
||||
|
||||
option=$1; shift |
||||
|
||||
case "$option" in |
||||
print-make-vars) |
||||
printf "helper: ${helper}\n" |
||||
printf "WEBDIR: ${WEBDIR}\n" |
||||
;; |
||||
print-runas) |
||||
printf "run_as: $run_as\n" |
||||
;; |
||||
changelog-changes) |
||||
if [ "$#" -eq 1 ]; then |
||||
start=$1 |
||||
else |
||||
start="[[:digit:]]" |
||||
fi |
||||
|
||||
end="[[:digit:]]" |
||||
|
||||
awk -F: "BEGIN { start=0 } |
||||
{ |
||||
if(start == 0) { |
||||
if (\$0 ~ /^$start/) { |
||||
start = 1 |
||||
} |
||||
} else { |
||||
if (\$0 ~ /^$end/) { |
||||
exit |
||||
} else { |
||||
print \$0 |
||||
} |
||||
} |
||||
}" "$basedir/docs/changelog" |
||||
;; |
||||
|
||||
changelog-version) |
||||
# get version from changelog |
||||
grep '^[[:digit:]]' "$basedir/docs/changelog" | head -n1 | sed 's/:.*//' |
||||
;; |
||||
|
||||
check-date) |
||||
# verify date in changelog is today |
||||
date_today="$(date +%Y-%m-%d)" |
||||
date_changelog=$(grep '^[[:digit:]]' "$basedir/docs/changelog" | head -n1 | sed 's/.*: //') |
||||
|
||||
if [ "$date_today" != "$date_changelog" ]; then |
||||
echo "Date in changelog is not today" |
||||
echo "Changelog: $date_changelog" |
||||
exit 1 |
||||
fi |
||||
;; |
||||
|
||||
check-unittest) |
||||
"$0" test |
||||
;; |
||||
|
||||
blog) |
||||
version=$1; shift |
||||
blogfile=$1; shift |
||||
dir=${blogfile%/*} |
||||
file=${blogfile##*/} |
||||
|
||||
|
||||
cat << eof > "$blogfile" |
||||
[[!meta title="Cdist $version released"]] |
||||
|
||||
Here's a short overview about the changes found in version ${version}: |
||||
|
||||
eof |
||||
|
||||
$0 changelog-changes "$version" >> "$blogfile" |
||||
|
||||
cat << eof >> "$blogfile" |
||||
For more information visit the [[cdist homepage|software/cdist]]. |
||||
|
||||
[[!tag cdist config unix]] |
||||
eof |
||||
cd "$dir" |
||||
git add "$file" |
||||
# Allow git commit to fail if there are no changes |
||||
git commit -m "cdist blog update: $version" "$blogfile" || true |
||||
;; |
||||
|
||||
ml-release) |
||||
if [ $# -ne 1 ]; then |
||||
echo "$0 ml-release version" >&2 |
||||
exit 1 |
||||
fi |
||||
|
||||
version=$1; shift |
||||
|
||||
to=${to_a}@${to_d} |
||||
from=${from_a}@${from_d} |
||||
|
||||
( |
||||
cat << eof |
||||
From: ${ml_name} <$from> |
||||
To: cdist mailing list <$to> |
||||
Subject: cdist $version released |
||||
|
||||
Hello .*, |
||||
|
||||
cdist $version has been released with the following changes: |
||||
|
||||
eof |
||||
|
||||
"$0" changelog-changes "$version" |
||||
cat << eof |
||||
|
||||
Cheers, |
||||
|
||||
${ml_sig_name} |
||||
|
||||
-- |
||||
Automatisation at its best level. With cdist. |
||||
eof |
||||
) | /usr/sbin/sendmail -f "$from" "$to" |
||||
;; |
||||
|
||||
release-git-tag) |
||||
target_version=$($0 changelog-version) |
||||
if git rev-parse --verify refs/tags/$target_version 2>/dev/null; then |
||||
echo "Tag for $target_version exists, aborting" |
||||
exit 1 |
||||
fi |
||||
printf "Enter tag description for ${target_version}: " |
||||
read tagmessage |
||||
|
||||
# setup for signed tags: |
||||
# gpg --fulL-gen-key |
||||
# gpg --list-secret-keys --keyid-format LONG |
||||
# git config --local user.signingkey <id> |
||||
# for exporting pub key: |
||||
# gpg --armor --export <id> > pubkey.asc |
||||
# gpg --output pubkey.gpg --export <id> |
||||
# show tag with signature |
||||
# git show <tag> |
||||
# verify tag signature |
||||
# git tag -v <tag> |
||||
# |
||||
# gpg verify signature |
||||
# gpg --verify <asc-file> <file> |
||||
# gpg --no-default-keyring --keyring <pubkey.gpg> --verify <asc-file> <file> |
||||
# Ensure gpg-agent is running. |
||||
export GPG_TTY=$(tty) |
||||
gpg-agent |
||||
|
||||
git tag -s "$target_version" -m "$tagmessage" |
||||
git push --tags |
||||
;; |
||||
|
||||
sign-git-release) |
||||
if [ $# -lt 2 ] |
||||
then |
||||
printf "usage: $0 sign-git-release TAG TOKEN [ARCHIVE]\n" |
||||
printf " if ARCHIVE is not specified then it is created\n" |
||||
exit 1 |
||||
fi |
||||
tag="$1" |
||||
if ! git rev-parse -q --verify "${tag}" >/dev/null 2>&1 |
||||
then |
||||
printf "Tag \"${tag}\" not found.\n" |
||||
exit 1 |
||||
fi |
||||
token="$2" |
||||
if [ $# -gt 2 ] |
||||
then |
||||
archivename="$3" |
||||
else |
||||
archivename="cdist-${tag}.tar" |
||||
git archive --prefix="cdist-${tag}/" -o "${archivename}" "${tag}" \ |
||||
|| exit 1 |
||||
# make sure target version is generated |
||||
"$0" target-version |
||||
tar -x -f "${archivename}" || exit 1 |
||||
cp cdist/version.py "cdist-${tag}/cdist/version.py" || exit 1 |
||||
tar -c -f "${archivename}" "cdist-${tag}/" || exit 1 |
||||
rm -r -f "cdist-${tag}/" |
||||
gzip "${archivename}" || exit 1 |
||||
archivename="${archivename}.gz" |
||||
fi |
||||
gpg --armor --detach-sign "${archivename}" || exit 1 |
||||
|
||||
project="ungleich-public%2Fcdist" |
||||
sed_cmd='s/^.*"markdown":"\([^"]*\)".*$/\1/' |
||||
|
||||
# upload archive |
||||
response_archive=$(curl -f -X POST \ |
||||
--http1.1 \ |
||||
-H "PRIVATE-TOKEN: ${token}" \ |
||||
-F "file=@${archivename}" \ |
||||
"https://code.ungleich.ch/api/v4/projects/${project}/uploads" \ |
||||
| sed "${sed_cmd}") || exit 1 |
||||
|
||||
# upload archive signature |
||||
response_archive_sig=$(curl -f -X POST \ |
||||
--http1.1 \ |
||||
-H "PRIVATE-TOKEN: ${token}" \ |
||||
-F "file=@${archivename}.asc" \ |
||||
"https://code.ungleich.ch/api/v4/projects/${project}/uploads" \ |
||||
| sed "${sed_cmd}") || exit 1 |
||||
|
||||
# make release |
||||
changelog=$("$0" changelog-changes "$1" | sed 's/^[[:space:]]*//') |
||||
release_notes=$( |
||||
printf "Release %s\n\n%s\n\n%s\n\n**Changelog**\n\n%s\n" \ |
||||
"${tag}" "${response_archive}" "${response_archive_sig}" "${changelog}" |
||||
) |
||||
curl -f -X POST \ |
||||
-H "PRIVATE-TOKEN: ${token}" \ |
||||
-F "description=${release_notes}" \ |
||||
"https://code.ungleich.ch/api/v4/projects/${project}/repository/tags/${tag}/release" \ |
||||
|| exit 1 |
||||
|
||||
# remove generated files (archive and asc) |
||||
if [ $# -eq 2 ] |
||||
then |
||||
rm -f "${archivename}" |
||||
fi |
||||
rm -f "${archivename}.asc" |
||||
;; |
||||
|
||||
release) |
||||
set -e |
||||
target_version=$($0 changelog-version) |
||||
target_branch=$($0 version-branch) |
||||
|
||||
echo "Beginning release process for $target_version" |
||||
|
||||
# First check everything is sane |
||||
"$0" check-date |
||||
"$0" check-unittest |
||||
"$0" check-pycodestyle |
||||
"$0" shellcheck |
||||
|
||||
# Generate version file to be included in packaging |
||||
"$0" target-version |
||||
|
||||
# Ensure the git status is clean, else abort |
||||
if ! git diff-index --name-only --exit-code HEAD ; then |
||||
echo "Unclean tree, see files above, aborting" |
||||
exit 1 |
||||
fi |
||||
|
||||
# Ensure we are on the master branch |
||||
masterbranch=yes |
||||
if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then |
||||
echo "Releases are happening from the master branch, aborting" |
||||
|
||||
echo "Enter the magic word to release anyway" |
||||
read magicword |
||||
|
||||
if [ "$magicword" = "iknowwhatido" ]; then |
||||
masterbranch=no |
||||
else |
||||
exit 1 |
||||
fi |
||||
fi |
||||
|
||||
if [ "$masterbranch" = yes ]; then |
||||
# Ensure version branch exists |
||||
if ! git rev-parse --verify refs/heads/$target_branch 2>/dev/null; then |
||||
git branch "$target_branch" |
||||
fi |
||||
|
||||
# Merge master branch into version branch |
||||
git checkout "$target_branch" |
||||
git merge master |
||||
fi |
||||
|
||||
# Verify that after the merge everything works |
||||
"$0" check-date |
||||
"$0" check-unittest |
||||
|
||||
# Generate documentation (man and html) |
||||
# First, clean old generated docs |
||||
make helper=${helper} WEBDIR=${WEBDIR} docs-clean |
||||
make helper=${helper} WEBDIR=${WEBDIR} docs |
||||
|
||||
# Generate speeches (indirect check if they build) |
||||
make helper=${helper} WEBDIR=${WEBDIR} speeches |
||||
|
||||
############################################################# |
||||
# Everything green, let's do the release |
||||
|
||||
# Tag the current commit |
||||
"$0" release-git-tag |
||||
|
||||
# Also merge back the version branch |
||||
if [ "$masterbranch" = yes ]; then |
||||
git checkout master |
||||
git merge "$target_branch" |
||||
fi |
||||
|
||||
# Publish git changes |
||||
case "$run_as" in |
||||
freebsd) |
||||
# if we are not Nico :) then just push, no mirror |
||||
git push |
||||
# push also new branch and set up tracking |
||||
git push -u origin "${target_branch}" |
||||
;; |
||||
*) |
||||
make helper=${helper} WEBDIR=${WEBDIR} pub |
||||
;; |
||||
esac |
||||
|
||||
# Ensure that pypi release has the right version |
||||
"$0" version |
||||
|
||||
# Create and publish package for pypi |
||||
make helper=${helper} WEBDIR=${WEBDIR} pypi-release |
||||
|
||||
# publish man, speeches, website |
||||
if [ "$masterbranch" = yes ]; then |
||||
make helper=${helper} WEBDIR=${WEBDIR} web-release-all |
||||
else |
||||
make helper=${helper} WEBDIR=${WEBDIR} web-release-all-no-latest |
||||
fi |
||||
|
||||
case "$run_as" in |
||||
freebsd) |
||||
;; |
||||
*) |
||||
# Archlinux release is based on pypi |
||||
make archlinux-release |
||||
;; |
||||
esac |
||||
|
||||
# sign git tag |
||||
printf "Enter upstream repository authentication token: " |
||||
read token |
||||
"$0" sign-git-release "${target_version}" "${token}" |
||||
|
||||
# Announce change on ML |
||||
make helper=${helper} WEBDIR=${WEBDIR} ml-release |
||||
;; |
||||
|
||||
test) |
||||
export PYTHONPATH="$(pwd -P)" |
||||
|
||||
if [ $# -lt 1 ]; then |
||||
python3 -m cdist.test |
||||
else |
||||
python3 -m unittest "$@" |
||||
fi |
||||
;; |
||||
|
||||
test-remote) |
||||
export PYTHONPATH="$(pwd -P)" |
||||
python3 -m cdist.test.exec.remote |
||||
;; |
||||
|
||||
pycodestyle|pep8) |
||||
pycodestyle "${basedir}" "${basedir}/scripts/cdist" | less |
||||
;; |
||||
|
||||
check-pycodestyle) |
||||
"$0" pycodestyle |
||||
printf "\\nPlease review pycodestyle report.\\n" |
||||
while true |
||||
do |
||||
echo "Continue (yes/no)?" |
||||
any= |
||||
read any |
||||
case "$any" in |
||||
yes) |
||||
break |
||||
;; |
||||
no) |
||||
exit 1 |
||||
;; |
||||
*) |
||||
echo "Please answer with 'yes' or 'no' explicitly." |
||||
;; |
||||
esac |
||||
done |
||||
;; |
||||
|
||||
shellcheck) |
||||
make helper=${helper} WEBDIR=${WEBDIR} shellcheck |
||||
printf "\\nPlease review shellcheck report.\\n" |
||||
while true |
||||
do |
||||
echo "Continue (yes/no)?" |
||||
any= |
||||
read any |
||||
case "$any" in |
||||
yes) |
||||
break |
||||
;; |
||||
no) |
||||
exit 1 |
||||
;; |
||||
*) |
||||
echo "Please answer with 'yes' or 'no' explicitly." |
||||
;; |
||||
esac |
||||
done |
||||
;; |
||||
|
||||
version-branch) |
||||
"$0" changelog-version | cut -d. -f '1,2' |
||||
;; |
||||
|
||||
version) |
||||
echo "VERSION = \"$(git describe)\"" > cdist/version.py |
||||
;; |
||||
|
||||
target-version) |
||||
target_version=$($0 changelog-version) |
||||
echo "VERSION = \"${target_version}\"" > cdist/version.py |
||||
;; |
||||
|
||||
*) |
||||
echo "Unknown helper target $@ - aborting" |
||||
exit 1 |
||||
;; |
||||
|
||||
esac |
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@ -1,15 +0,0 @@
|
||||
cdist - usable configuration management |
||||
======================================= |
||||
|
||||
.. image:: cdist-logo.png |
||||
:alt: cdist-logo |
||||
|
||||
cdist is a usable configuration management system. |
||||
It adheres to the KISS principle and |
||||
is being used in small up to enterprise grade environments. |
||||
cdist is an alternative to other configuration management systems like |
||||
|
||||
* `bcfg2 <http://trac.mcs.anl.gov/projects/bcfg2>`_ |
||||
* `chef <http://wiki.opscode.com/display/chef/>`_ |
||||
* `cfengine <http://www.cfengine.org/>`_ |
||||
* `puppet <http://www.puppetlabs.com/>`_. |
@ -1,16 +1,19 @@
|
||||
Supported Operating Systems |
||||
Supported operating systems |
||||
=========================== |
||||
|
||||
cdist was tested or is know to run on at least |
||||
|
||||
* `Archlinux <http://www.archlinux.org/>`_ |
||||
* `Debian <http://www.debian.org/>`_ |
||||
* `CentOS <http://www.centos.org/>`_ |
||||
* `Fedora <http://fedoraproject.org/>`_ |
||||
* `Alpine Linux <https://alpinelinux.org>`_ |
||||
* `Archlinux <http://www.archlinux.org>`_ |
||||
* `CentOS <http://www.centos.org>`_ |
||||
* `Debian <http://www.debian.org>`_ |
||||
* `Devuan <https://devuan.org>`_ |
||||
* `Fedora <http://fedoraproject.org>`_ |
||||
* `FreeBSD <http://www.freebsd.org>`_ |
||||
* `Gentoo <http://www.gentoo.org/>`_ |
||||
* `Mac OS X <http://www.apple.com/macosx/>`_ |
||||
* `Gentoo <http://www.gentoo.org>`_ |
||||
* `Mac OS X <http://www.apple.com/macosx>`_ |
||||
* `NetBSD <https://www.netbsd.org>`_ |
||||
* `OpenBSD <http://www.openbsd.org>`_ |
||||
* `Redhat <http://www.redhat.com/>`_ |
||||
* `Ubuntu <http://www.ubuntu.com/>`_ |
||||
* `XenServer <http://www.citrix.com/xenserver/>`_ |
||||
* `Redhat <http://www.redhat.com>`_ |
||||
* `Ubuntu <http://www.ubuntu.com>`_ |
||||
* `XenServer <http://www.citrix.com/xenserver>`_ |
||||
|
@ -1,5 +1,5 @@
|
||||
How to update cdist |
||||
=================== |
||||
How to upgrade cdist |
||||
==================== |
||||
|
||||
Update the git installation |
||||
--------------------------- |
@ -1,21 +0,0 @@
|
||||
[[!meta title="cdist - usable configuration management"]] |
||||
|
||||
 |
||||
|
||||
cdist is a usable configuration management system. |
||||
It adheres to the KISS principle and |
||||
is being used in small up to enterprise grade environments. |
||||
cdist is an alternative to other configuration management systems like |
||||
[bcfg2](http://bcfg2.org/), |
||||
[chef](https://www.chef.sh/), |
||||
[cfengine](https://cfengine.com/) |
||||
and [puppet](https://puppet.com/). |
||||
|
||||
* [[Why should I use cdist?|why]] |
||||
* [[Documentation|documentation]] |
||||
* [[Supported Operating Systems|os]] |
||||
* [[Installation|install]] |
||||
* [[Update|update]] |
||||
* [[Support|support]] |
||||
|
||||
[[!tag cdist unix]] |
Before Width: | Height: | Size: 1.5 KiB |
@ -1,12 +0,0 @@
|
||||
[[!meta title="Documentation"]] |
||||
|
||||
You can browse the |
||||
[latest version of the documentation](/software/cdist/man/latest) or |
||||
have a look at [all versions](/software/cdist/man). |
||||
|
||||
You can also view [speeches about cdist](/software/cdist/speeches). |
||||
|
||||
Checking out beta? Find the docs here: |
||||
[beta documentation](/software/cdist/man/beta). |
||||
|
||||
[[!tag cdist unix]] |
@ -1,26 +0,0 @@
|
||||
But cdist ticks differently, here is the feature set that makes it unique: |
||||
|
||||
[[!table data=""" |
||||
Keywords | Description |
||||
Simplicity | There is only one type to extend cdist called ***type*** |
||||
Design | Type and core cleanly separated |
||||
Design | Sticks completly to the KISS (keep it simple and stupid) paradigma |
||||
Design | Meaningful error messages - do not lose time debugging error messages |
||||
Design | Consistency in behaviour, naming and documentation |
||||
Design | No surprise factor: Only do what is obviously clear, no magic |
||||
Design | Define target state, do not focus on methods or scripts |
||||
Design | Push architecture: Instantly apply your changes |
||||
Small core | cdist's core is very small - less code, less bugs |
||||
Fast development | Focus on straightforwardness of type creation is a main development objective |
||||
Fast development | Batteries included: A lot of requirements can be solved using standard types |
||||
Modern Programming Language | cdist is written in Python |
||||
Requirements, Scalability | No central server needed, cdist operates in push mode and can be run from any computer |
||||
Requirements, Scalability, Upgrade | cdist only needs to be updated on the master, not on the target hosts |
||||
Requirements, Security | Uses well-know [SSH](http://www.openssh.com/) as transport protocol |
||||
Requirements, Simplicity | Requires only shell and SSH server on the target |
||||
UNIX | Reuse of existing tools like cat, find, mv, ... |
||||
UNIX, familar environment, documentation | Is available as manpages and HTML |
||||
UNIX, simplicity, familar environment | cdist is configured in POSIX shell |
||||
"""]] |
||||
|
||||
[[!tag cdist unix]] |
@ -1,103 +0,0 @@
|
||||
[[!meta title="How to install cdist"]] |
||||
[[!toc levels=3]] |
||||
|
||||
## Requirements |
||||
|
||||
### Source Host |
||||
|
||||
This is the machine you use to configure the target hosts. |
||||
|
||||
* /bin/sh: A posix like shell (for instance bash, dash, zsh) |
||||
* Python >= 3.2 |
||||
* SSH client |
||||
* Asciidoc and xsltproc (for building the manpages) |
||||
|
||||
### Target Hosts |
||||
|
||||
* /bin/sh: A posix like shell (for instance bash, dash, zsh) |
||||
* SSH server |
||||
|
||||
## Install cdist |
||||
|
||||
You can install cdist either from git or as a python package. |
||||
|
||||
### From git |
||||
|
||||
Cloning cdist from git gives you the advantage of having |
||||
a version control in place for development of your own stuff |
||||
immediately. |
||||
|
||||
To install cdist, execute the following commands: |
||||
|
||||
git clone https://github.com/ungleich/cdist.git |
||||
cd cdist |
||||
export PATH=$PATH:$(pwd -P)/bin |
||||
|
||||
From version 4.2.0 cdist tags and github releases are signed. |
||||
You can get GPG public key used for signing [here](/software/cdist/pgp-key-EFD2AE4EC36B6901.asc). |
||||
|
||||
#### Available versions in git |
||||
|
||||
* The active development takes place in the **master** branch |
||||
* The current stable version can be found in the **2.0** branch |
||||
* The upcoming stable version can be found in the **2.1** branch |
||||
|
||||
Other branches may be available for features or bugfixes, but they |
||||
may vanish at any point. To select a specific branch use |
||||
|
||||
# Generic code |
||||
git checkout -b <localbranchname> origin/<branchname> |
||||
|
||||
So for instance if you want to use and stay with version 2.0, you can use |
||||
|
||||
git checkout -b 2.0 origin/2.0 |
||||
|
||||
#### Git Mirrors |
||||
|
||||
If the main site is down, you can acquire cdist from one of the following sites: |
||||
|
||||
* git://github.com/telmich/cdist.git ([github](https://github.com/telmich/cdist)) |
||||
* git://git.code.sf.net/p/cdist/code ([sourceforge](https://sourceforge.net/p/cdist/code)) |
||||
|
||||
#### Building and using documentation (man and html) |
||||
|
||||
If you want to build and use the documentation, run: |
||||
|
||||
make docs |
||||
|
||||
Documentation comes in two formats, man pages and full HTML |
||||
documentation. Documentation is built into distribution's |
||||
docs/dist directory. man pages are in docs/dist/man and |
||||
HTML documentation in docs/dist/html. |
||||
|
||||
If you want to use man pages, run: |
||||
|
||||
export MANPATH=$MANPATH:$(pwd -P)/docs/dist/man |
||||
|
||||
Or you can move manpages from docs/dist/man directory to some |
||||
other directory and add it to MANPATH. |
||||
|
||||
Full HTML documentation can be accessed at docs/dist/html/index.html. |
||||
|
||||
You can also build manpages for types in your ~/.cdist directory: |
||||
|
||||
make dotman |
||||
|
||||
Built manpages are now in docs/dist/man directory. If you have |
||||
some other custom .cdist directory, e.g. /opt/cdist then use: |
||||
|
||||
DOT_CDIST_PATH=/opt/cdist make dotman |
||||
|
||||
|
||||
### Python Package |
||||
|
||||
Cdist is available as a python package at |
||||
[PyPi](http://pypi.python.org/pypi/cdist/). You can install it using |
||||
|
||||
pip install cdist |
||||
|
||||
## Use cdist |
||||
|
||||
[[Dig into the documentation|documentation]] to get started with cdist! |
||||
|
||||
[[!tag cdist unix]] |
@ -1,18 +0,0 @@
|
||||
[[!meta title="Supported Operating Systems"]] |
||||
|
||||
cdist was tested or is know to run on at least |
||||
|
||||
* [Archlinux](http://www.archlinux.org/) |
||||
* [Debian](http://www.debian.org/) |
||||
* [CentOS](http://www.centos.org/) |
||||
* [Scientific](https://www.scientificlinux.org/) |
||||
* [Fedora](http://fedoraproject.org/) |
||||
* [FreeBSD](http://www.freebsd.org) |
||||
* [Gentoo](http://www.gentoo.org/) |
||||
* [Mac OS X](http://www.apple.com/macosx/) |
||||
* [OpenBSD](http://www.openbsd.org) |
||||
* [Redhat](http://www.redhat.com/) |
||||
* [Ubuntu](http://www.ubuntu.com/) |
||||
* [XenServer](http://www.citrix.com/xenserver/) |
||||
|
||||
[[!tag cdist unix]] |
@ -1,28 +0,0 @@
|
||||
## Support |
||||
|
||||
### IRC |
||||
|
||||
You can join the development ***IRC channel*** |
||||
[#cstar on irc.freenode.net](irc://irc.freenode.org/#cstar). |
||||
|
||||
### Mailing list |
||||
|
||||
Bug reports, questions, patches, etc. should be send to the |
||||
[cdist mailing list](https://groups.google.com/forum/#!forum/cdist-configuration-management). |
||||
|
||||
### Linkedin |
||||
|
||||
If you have an account |
||||
at [Linked in](http://www.linkedin.com/), |
||||
you can join the |
||||
[cdist group](http://www.linkedin.com/groups/cdist-configuration-management-3952797). |
||||
|
||||
### Chat |
||||
Chat with us: [ungleich chat](https://chat.ungleich.ch/channel/cdist). |
||||
|
||||
### Commercial support |
||||
|
||||
You can request commercial support for cdist from |
||||
[my company](http://www.ungleich.ch/english/). |
||||
|
||||
[[!tag cdist unix]] |
@ -1,158 +0,0 @@
|
||||
[[!meta title="How to update cdist"]] |
||||
|
||||
## Update The Git Installation |
||||
|
||||
To upgrade cdist in the current branch use |
||||
|
||||
git pull |
||||
|
||||
# Also update the manpages |
||||
./build man |
||||
export MANPATH=$MANPATH:$(pwd -P)/doc/man |
||||
|
||||
If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. |
||||
The master branch on the other hand is the development branch and may not be |
||||
working, break your setup or eat the tree in your garden. |
||||
|
||||
### Safely upgrading to new versions |
||||
|
||||
To upgrade to **any** further cdist version, you can take the |
||||
following procedure to do a safe upgrade: |
||||
|
||||
# Create new branch to try out the update |
||||
git checkout -b upgrade_cdist |
||||
|
||||
# Get latest cdist version in git database |
||||
git fetch -v |
||||
|
||||
# see what will happen on merge - replace |
||||
# master with the branch you plan to merge |
||||
git diff upgrade_cdist..origin/master |
||||
|
||||
# Merge the new version |
||||
git merge origin/master |
||||
|
||||
Now you can ensure all custom types work with the new version. |
||||
Assume that you need to go back to an older version during |
||||
the migration/update, you can do so as follows: |
||||
|
||||
# commit changes |
||||
git commit -m ... |
||||
|
||||
# go back to original branch |
||||
git checkout master |
||||
|
||||
After that, you can go back and continue the upgrade: |
||||
|
||||
# git checkout upgrade_cdist |
||||
|
||||
|
||||
## Update The Python Package |
||||
|
||||
To upgrade to the lastet version do |
||||
|
||||
pip install --upgrade cdist |
||||
|
||||
## 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. |
||||
Use [messaging](/software/cdist/man/3.0.0/man7/cdist-messaging.html) instead. |
||||
|
||||
### Updating from 2.2 to 2.3 |
||||
|
||||
No incompatibilities. |
||||
|
||||
### Updating from 2.1 to 2.2 |
||||
|
||||
Starting with 2.2, the syntax for requiring a singleton type changed: |
||||
Old format: |
||||
|
||||
require="__singleton_type/singleton" ... |
||||
|
||||
New format: |
||||
|
||||
require="__singleton_type" ... |
||||
|
||||
Internally the "singleton" object id was dropped to make life more easy. |
||||
You can probably fix your configuration by running the following code |
||||
snippet (currently untested, please report back if it works for you): |
||||
|
||||
find ~/.cdist/* -type f -exec sed -i 's,/singleton,,' {} \; |
||||
|
||||
### Updating from 2.0 to 2.1 |
||||
|
||||
Have a look at the update guide for [[2.0 to 2.1|2.0-to-2.1]]. |
||||
|
||||
* Type **\_\_package* and \_\_process** use --state **present** or **absent**. |
||||
The states **removed/installed** and **stopped/running** have been removed. |
||||
Support for the new states is already present in 2.0. |
||||
* Type **\_\_directory**: Parameter --parents and --recursive are now boolean |
||||
The old "yes/no" values need to be removed. |
||||
* Type **\_\_rvm_ruby**: Parameter --default is now boolean |
||||
The old "yes/no" values need to be removed. |
||||
* Type **\_\_rvm_gemset**: Parameter --default is now boolean |
||||
The old "yes/no" values need to be removed. |
||||
* Type **\_\_addifnosuchline** and **\_\_removeline** have been replaced by **\_\_line** |
||||
* The **conf** directory is now located at **cdist/conf**. |
||||
You need to migrate your types, explorers and manifests |
||||
manually to the new location. |
||||
* Replace the variable **\_\_self** by **\_\_object_name** |
||||
Support for the variable **\_\_object_name** is already present in 2.0. |
||||
* The types **\_\_autofs**, **\_\_autofs_map** and **\_\_autofs_reload** have been removed |
||||
(no maintainer, no users) |
||||
* Type **\_\_user**: Parameter --groups removed (use the new \_\_user_groups type) |
||||
* Type **\_\_ssh_authorized_key** has been replaced by more flexible type |
||||
**\_\_ssh_authorized_keys** |
||||
|
||||
### Updating from 1.7 to 2.0 |
||||
|
||||
* Ensure python (>= 3.2) is installed on the source host |
||||
* Use "cdist config host" instead of "cdist-deploy-to host" |
||||
* Use "cdist config -p host1 host2" instead of "cdist-mass-deploy" |
||||
* Use "cdist banner" for fun |
||||
* Use **\_\_object_name** instead of **\_\_self** in manifests |
||||
|
||||
### Updating from 1.6 to 1.7 |
||||
|
||||
* If you used the global explorer **hardware_type**, you need to change |
||||
your code to use **machine** instead. |
||||
|
||||
### Updating from 1.5 to 1.6 |
||||
|
||||
* If you used **\_\_package_apt --preseed**, you need to use the new |
||||
type **\_\_debconf_set_selections** instead. |
||||
* The **\_\_package** types accepted either --state deinstalled or |
||||
--state uninstaaled. Starting with 1.6, it was made consistently |
||||
to --state removed. |
||||
|
||||
### Updating from 1.3 to 1.5 |
||||
|
||||
No incompatibilities. |
||||
|
||||
### Updating from 1.2 to 1.3 |
||||
|
||||
Rename **gencode** of every type to **gencode-remote**. |
||||
|
||||
### Updating from 1.1 to 1.2 |
||||
|
||||
No incompatibilities. |
||||
|
||||
### Updating from 1.0 to 1.1 |
||||
|
||||
In 1.1 the type **\_\_file** was split into **\_\_directory**, **\_\_file** and |
||||
**\_\_link**. The parameter **--type** was removed from **\_\_file**. Thus you |
||||
need to replace **\_\_file** calls in your manifests: |
||||
|
||||
* Remove --type from all \_\_file calls |
||||
* If type was symlink, use \_\_link and --type symbolic |
||||
* If type was directory, use \_\_directory |
||||
|
||||
|
||||
[[!tag cdist unix]] |
@ -1,118 +0,0 @@
|
||||
[[!meta title="Update Guide for 2.0 to 2.1"]] |
||||
|
||||
## Introduction |
||||
|
||||
When changing your installation from 2.0 to 2.1, there are |
||||
a lot of changes coming up. 2.1 is mainly a cleanup release, |
||||
which removes long time deprecated behaviour, but also makes |
||||
a lot of things more consistent and allows you to split off your types, |
||||
explorers and manifest to custom directories. |
||||
|
||||
This document will guide you to a successful update. |
||||
|
||||
## Preparation |
||||
|
||||
As for every software and system you use in production, you should first of |
||||
all make a backup of your data. To prevent any breakage, it is |
||||
recommended to create a new git branch to do the update on: |
||||
|
||||
% git checkout -b update_to_2.1 |
||||
|
||||
This also ensure that whenever you need to do a change in your |
||||
2.0 based tree, you can simply go back to that branch, apply the change |
||||
and configure your systems - independently of your update progress! |
||||
|
||||
Next fetch the latest upstream changes, I assume that |
||||
origin refers to one of the upstream mirrors (change origin if you use |
||||
another remote name for upstream cdist): |
||||
|
||||
% git fetch -v origin |
||||
|
||||
## Merge the changes |
||||
|
||||
Now try to merge upstream into the new branch. |
||||
|
||||
% git merge origin/2.1 |
||||
|
||||
Fix any conflicts that may have been occurred due to local changes |
||||
and then **git add** and *git commit** those changes. This should seldom |
||||
occur and if, it's mostly for people hacking on the cdist core. |
||||
|
||||
## Move "conf" directory |
||||
|
||||
One of the biggest changes in cdist 2.1 is that you can have multiple |
||||
**conf** directories: Indeed, the new default behaviour of cdist is to |
||||
search for conf directories |
||||
|
||||
* below the python module (cdist/conf in the source tree or in the installed location) |
||||
* at ~/.cdist/ (on conf suffix there) |
||||
|
||||
So you can now choose, where to store your types. |
||||
|
||||
### Integrate your conf/ back into the tree |
||||
|
||||
If you choose to store your types together with the upstream types, |
||||
you can just move all your stuff below **cdist/conf**: |
||||
|
||||
% git mv conf/type/* cdist/conf/type |
||||
% git mv conf/manifest/* cdist/conf/manifest |
||||
% git mv conf/explorer/* cdist/conf/explorer |
||||
% git commit -m "Re-Integrate my conf directory into cdist 2.1 tree" |
||||
|
||||
### Move your conf/ directory to ~/.cdist |
||||
|
||||
If you want to store your site specific |
||||
configuration outside of the cdist tree, you |
||||
can move your conf/ directory to your homedirectory ($HOME) under ~/.cdist: |
||||
|
||||
% mv conf ~/.cdist |
||||
% git rm -r conf |
||||
% git commit -m "Move my conf directory to ~/.cdist" |
||||
|
||||
It it still recommended to use a version control system like git in it: |
||||
|
||||
% cd ~/.cdist |
||||
% git init |
||||
% git add . |
||||
% git commit -m "Create new git repository containing my cdist configuration" |
||||
|
||||
## Test the migration |
||||
|
||||
Some of the types shipped with upstream were changed, so you may want to test |
||||
the result by running cdist on one of your staging target hosts: |
||||
|