2011-03-25 21:34:11 +00:00
|
|
|
cdist-best-practice(7)
|
2011-03-21 13:19:07 +00:00
|
|
|
======================
|
|
|
|
Nico Schottelius <nico-cdist--@--schottelius.org>
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2011-03-25 21:34:11 +00:00
|
|
|
cdist-best-practice - Practices used in real environments
|
2011-03-21 13:19:07 +00:00
|
|
|
|
|
|
|
|
2011-03-21 13:27:23 +00:00
|
|
|
PASSWORDLESS CONNECTIONS
|
|
|
|
------------------------
|
|
|
|
It is recommended to run cdist with public key authentication.
|
|
|
|
This requires a private/public key pair and the entry
|
|
|
|
"PermitRootLogin without-password" in the sshd server.
|
|
|
|
See sshd_config(5) and ssh-keygen(1).
|
|
|
|
|
|
|
|
|
|
|
|
SPEEDING UP SSH CONNECTIONS
|
|
|
|
---------------------------
|
|
|
|
When connecting to a new host, the initial delay with ssh connections
|
|
|
|
is pretty big. You can work around this by
|
|
|
|
"sharing of multiple sessions over a single network connection"
|
|
|
|
(quote from ssh_config(5)). The following code is suitable for
|
|
|
|
inclusion into your ~/.ssh/config:
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
Host *
|
|
|
|
ControlPath ~/.ssh/master-%l-%r@%h:%p
|
|
|
|
ControlMaster auto
|
|
|
|
ControlPersist 10
|
|
|
|
--------------------------------------------------------------------------------
|
2011-03-21 13:19:07 +00:00
|
|
|
|
|
|
|
|
2011-03-21 13:38:53 +00:00
|
|
|
MULTI MASTER OR ENVIRONMENT SETUPS
|
|
|
|
----------------------------------
|
|
|
|
If you plan to distribute cdist among servers or use different
|
|
|
|
environments, you can do so easily with the included version
|
|
|
|
control git. For instance if you plan to use the typical three
|
|
|
|
environments production, integration and development, you can
|
|
|
|
realise this with git branches:
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
# Go to cdist checkout
|
|
|
|
cd /path/to/cdist
|
|
|
|
|
|
|
|
# Create branches
|
|
|
|
git branch development
|
|
|
|
git branch integration
|
|
|
|
git branch production
|
|
|
|
|
|
|
|
# Make use of a branch, for instance production
|
|
|
|
git checkout production
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Similar if you want to have cdist checked out at multiple machines,
|
|
|
|
you can clone it multiple times:
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
machine-a % git clone git://your-git-server/cdist
|
|
|
|
machine-b % git clone git://your-git-server/cdist
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2011-04-01 09:04:31 +00:00
|
|
|
SEPERATING WORK BY GROUPS
|
|
|
|
-------------------------
|
|
|
|
If you are working with different groups on one cdist-configuration,
|
|
|
|
you can delegate to other manifests and have the groups edit only
|
|
|
|
their manifests. You can use the following snippet in
|
|
|
|
**conf/manifests/init**:
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
# Include other groups
|
|
|
|
sh -e "$__manifest/systems"
|
|
|
|
|
|
|
|
sh -e "$__manifest/cbrg"
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2011-03-21 13:38:53 +00:00
|
|
|
|
2011-03-21 13:19:07 +00:00
|
|
|
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).
|