|
Sidai team: the `*-config' packagesThe Sidai team supplies a set of *-config (``star config'') packages, which provide a way to set up a whole slew of basic Unix configuration files (typically in /etc) across all the hosts of a site.An example might be: setting up /etc/inetd.conf (for every host of every platform type at your site). The first section works through a single example. Then we have an ``index'' of all the files/things that you can set with these packages. Finally, descriptions of the details of individual packages. Example: syslog-configThe Sidai syslog-config package sets up syslog for your site. The Sidai Way involves two things:
OK, to make this work, Sidai provides two things:
So, a site that wants to do things the Sidai Way need only specify the following (this is team glasli1's package/syslog-config.xml): <package name="syslog-config" xml-version="1"> <status>revealed</status> <prototypes> <prototype team="sidai" name="syslog-config"/> <prototype team="." name="ALL"/> </prototypes> <src-linkfarm> <param name="PKG_TEAM">sidai</param> </src-linkfarm> <compile> <param name="CENTRAL_SYSLOG_HOSTNAME">slimy</param> <!-- where our syslog.conf says that things are to be put: --> <param name="SYSLOG_DIR">/var/log</param> </compile> <reveal> <!-- where our syslog.conf says that things are to be put: --> <param name="SYSLOG_DIR">/var/log</param> <param name="SYSLOG_FILES">messages mail.log</param> </reveal> </package>Commentary:
Index of files/stuff managed by *-configToDoGeneral commentsThese ARK packages emphatically do not represent all the sensible things you might want to do with the Unix configuration files in question.Our approach is: (a) the basic thing on offer is how we Sidai people do that particular thing, e.g. what we put in /etc/shells; plus (b) a small number of options that you can use. For example, we might include a ``don't use TCP wrappers'' option for /etc/inetd.conf... (even if it is a lousy idea). If you violently disagree with the Sidai approach, you should be able to use this stuff to invent your own ARK packages to do what you want. You should also bear in mind that the Sidai Way is to separate a package from its configuration. Take the `sudo' program for example: We would expect you to have a `sudo' package (say, sudo--1.6.5p2), and its job is to install the binaries and man pages. This task should be very, very standard across ARK sites. We then expect you to have a separate sudo-config package, which is your site-specific configuration. In sudo's case, that's just some way of setting up your 'sudoers' file. The general *-config patternHere's the general ``shape'' of all of these *-config Sidai package things:
The apache-config packageToDoThe automount-maps packageUsing the automounter as part of file-sharing with NFS is a normal thing to do. You need to create the `maps', and then get them to where they need to be.The Sidai solution comes from its automount-maps proto-package; the real package (also called automount-maps) distributed by the `verilab2' (ditto `glasli1') team is a live working example. Creating the maps: Automount maps can come from *.tmpl files (see automount-maps/*.tmpl from `glasli1', for example) or can be generated from `dchunks' info, or both. 'Glasli1' does both. Maps for `users' (we have that instead of `home') and `local' come from .tmpl files; maps for `d' and `workspace' are generated from dchunks' info. The Sidai `configure' method (by default) groks the dchunks stuff, to produce a 'super-tmpl' file, automount-maps.tmpl. The ensuing `compile' method produces per-host automount maps, either from the generated automount-maps.tmpl file, or from the hand-written *.tmpl files. Something you might have reason to do (but we don't): If you don't use dchunks but do have ARK `user' objects (i.e. <team>/user/*.xml), you could arrange to generate your `home' automount map from, say, <home-disk> fields. All you would do is have a auto_home.tmpl file that looked something like (NB: untested, illustrative only):
<%
ret['destname'] = 'etc/auto_home'
%>
# `fixed' entries for 'root' etc would probably go here...
<%
# generate /home entries for normal users:
import ark.user
options = '-rw,intr,noquota,nosuid'
for user in ark.user.ArkUsersMgr().unpackSpecs(['ALL']):
home_disk = user.home_disk(ARK_HOST_CTXT=thishost)
print '%s %s %s' % (user.idString,options,home_disk)
%>
Distributing the maps -- non-NIS: We don't
do NIS at `glasli', so we need to get the
auto_<map> files into /etc on each
host. We use Sidai's `diffing
deploy', our standard approach this kind of thing.
Distributing the maps -- NIS: (We may be talking nonsense here...) Instead of <hosts-supported> being ALL, you'd set it to something like (e.g.) sparc-solaris7-nis-server, and then still do a diffing deploy to get the bits there. Other packages (nis-server-config? nis-client-config?) would then be tickled (ypmake on the server, for instance) to make the right thing appear on all clients. Re-building the maps after changes: When we make changes to the maps, we run sidai/package-utils/ark-invasive automount-mapsto re-do things. All kinda low-tech, but does what we want. (If anyone wants to do something with automount maps that is slightly different from what we've described, please get in touch.) The etc-exports packageToDoThe findutils-config packageA lovely-but-underused part of the GNU `findutils' package is locate, or ``fast find''. The idea is:
Setting up all of this is the job of Sidai's findutils-config package. In the standard ARK ``site-at-a-time'' way, we want locate to report for all of the filespace across the site. What about system partitions, e.g. /usr? If we do locate grep, do we want to see /usr/bin/grep listed just once, or once per system partition (i.e. per host)? We assume the former (``just once''). However, we also provide a script locate-all which really will list them all (assumed to be mostly for sysadmin use). So: when you run locate on a host, you get (the databases for) one set of system stuff [that of the host you're on] and all of the NFS-available stuff. Our implementation relies on the Sidai `dchunks' stuff. You specify proto-dchunks that characterize the ``systems'' partitions and the ``NFS'' partitions. The databases should be built as an ordinary user (probably nobody), so that filenames that other people don't want disclosed will not be put in the databases. If you run it as `root', there will be no secrets. The flexlm-config packageFlexLM is a very commonly used license server. We would recommend installing a nice fresh modern version straight from Globetrotter.The Sidai flexlm-config package is basically about setting up a combined license file (i.e. all the licenses you have from different vendors). It does little more than copy it into place. Don't store your license file in a public CVS repository, or distribute it. Do as `glasli1' does, and have it under a glasli1-private team. Finally, you will also need ``vendor daemons'', which do the vendor-specific magic associated with particular licenses. Your ARK packages that manage those vendor tools should do something about the vendor daemons, too. Your flexlm-config package should therefore have <constraint>s on those vendor packages... The host-trust-config packageThe host-trust-config package is about Berkeley-oid trust between/by hosts at your site; to wit, /etc/hosts.equiv, root's .rhosts file, and (just to be weird, if you want) the .amandahosts file [the exact same idea as .rhosts, except only for Amanda, the backups manager].The Sidai Way herein is:
The hpux-rc.d-config packageOn HP-UX, you adjust boot-time (startup) behavior by setting parameters in /etc/rc.config.d/.This Sidai package gives you a way to set some of these parameters in a site-at-a-time way. The most common reason to do this tweaking is to turn stuff off. Note: there are some /etc/rc.config.d files that are the province of other packages, notably: (a) those that set per-host networking things -- net-config. This package probably does not do what you want, yet! It's pretty easy to check out painlessly, however. Give it a status of built, then run ark package compile on it. You can now diff what it generated for your HP-UX host(s), and see how close you are to what you want. If you've tweaked it up to be what you want, then change the status (to revealed, presumably), and carry on. It is well worth keeping a copy for posterity of the diffs between what-HP-provided-initially and what-you-changed-it-to. ToDo: more. The net-config packageThis package does pretty obvious things to set up the following network-related configuration files:/etc/defaultrouter /etc/hostname.hme0 # or le0, or ... /etc/hosts /etc/netmasks /etc/networks /etc/nodename /etc/nsswitch.conf /etc/protocols /etc/resolv.conf /etc/rpc /etc/services /etc/nsswitch.conf: files for everything. We'd be happy to support other common, sane choices... /etc/hosts: Records all your local hosts in there, and perhaps a few others that you specify. (NB: nsswitch.conf says hosts: files dns) The templates for /etc/rpc and /etc/services let your ARK packages supply `fragments' to add, notably <rpc-numbers-database-fragment>s and <etc-services-fragment>s. The net-services-config packageThe net-services-config package is intended to configure and control the services that your site's hosts provide on their network ports.Those services can be classified as static (started at boot time, with an init.d script) or dynamic (started by `inetd' or `xinetd'). Currently, this package only does the `(x)inetd' side, namely setting up /etc/inetd.conf (or /etc/xinetd.conf). The Sidai net-services-config/inetd.conf.tmpl template picks up per-package and per-host <inetd-conf-fragments (or <xinetd-conf-fragments). The openssh-config packageToDoThe root-acct-config packageToDoThe sendmail-config packageThe Sidai sendmail-config package assumes a hub-and-clients sendmail setup, possibly without the hub (i.e. your ARK ``site'' is just some small piece of a larger organization, which provides the mail hub for you).You must supply a clients.mc Sendmail m4-ish input thingy, and a comparable thing for your mail hub, if you have one. For both clients and hub, you can also supply a list of ARK template (*.tmpl) files to be splatted accordingly. Examples might be: aliases files, default-domains, genericstable, and so on. The shells-config packageThis package sets up global shell-ish files, notably /etc/shells, and then things like /etc/PATH and /etc/MANPATH (those last two may only be HP-UXish).The sudo-config packageThis package is concerned with creating your sudoers file and getting it into place.We advise keeping the original for your sudoers.tmpl in some ``more secure'' place. Don't include it in the bits on your public CVS repository or which you give out to your ARK friends. The sys-cron-config packageThe sys-cron-config package is concerned with:
On the crontabs front, individual ARK things (typically: packages or hosts) can specify a <sys-crontab-fragments> table. At the moment, an entry for any key other than root will cause a Python exception, but that could change :-) Note: we have one or two ARK packages which exist only to supply a <sys-crontab-fragments> table. An example is glasli1's time-config package; its main is to provide: <sys-crontab-fragments> <constraint><host-spec>sidai:sparc-solaris</host-spec></constraint> <table><entry name="root"><string><![CDATA[ 2,22,42 * * * * /usr/sbin/ntpdate -s timehost ]]></string></entry></table> </sys-crontab-fragments> The syslog-config packageThis package sets up a central-logging-style syslog service; it is described in some detail as our example.The tcp-wrappers-config packageThis package sets up your TCP-wrapper hosts.allow and hosts.deny files.We advise keeping the original for your hosts.{allow,deny}.tmpl files in some ``more secure'' place. Don't include it in the bits on your public CVS repository or which you give out to your ARK friends. The time-config packageThis package is concerned with NTP/xntpd matters. We use it simply to set up /etc/ntp.keys.We advise keeping the original for your ntp.keys.tmpl file in some ``more secure'' place. Don't include it in the bits on your public CVS repository or which you give out to your ARK friends. |