summaryrefslogtreecommitdiffstats
path: root/README
blob: efaeefd73f69c93102248a8f4f030908ece16325 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Rancid is a "Really Awesome New Cisco confIg Differ" developed to
maintain CVS controlled copies of router configs.

The following is the packing list for Rancid:

README -    This file.
env    -    Enviromental settings needed.
run-me -    Script designed to be run from cron calling control_rancid.
control_rancid -    Builds router list, calls rancid on each router and
                    handles cvs routines.
rancid-fe - chooses between rancid an jrancid
rancid -    Runs commands on router and processes the output - the meat.
jrancid -   Runs commands on juniper routers and processes the output
clogin -    Expect script that logs into routers either interactively,
            runs a set of commands or runs another expect script.
jlogin -    Expect script that logs into juniper routers similarly to
	    clogin.  it is not terribly robust, but mainly used for it's
	    -c and -s options.
.cloginrc - TCL commands to set passwords, usernames etc. used by clogin and
	    jlogin.
par    -    Parallel processing of commands - any commands.

rancid will also need to have the following packages:
cvs	- code revision system available from prep.ai.mit.edu:/pub/gnu
rcs	- code revision system which cvs built on top of.  available from
	  prep.ai.mit.edu:/pub/gnu
gnudiff - gnudiff provides the -u option.  if you do not have gnu's diff,
          you will have to modify control_rancid to use 'diff -c' or some
          such.  see examples.
perl5	- perl version 5 or greater available from www.cpan.org
expect	- 
tcl	- required by expect

Quick Installation Guide (an example):

1) mkdir <basedir>
   All rancid crud will be under this directory.  we chose /home/rancid.

2) mkdir <basedir>/bin

3) Put the contents of rancid/bin in <basedir>/bin.  modify the location of
   perl and expect in each of clogin, par, rancid, rancid-fe, jlogin,
   jrancid and rename if necessary.

4) Modify <basedir>/bin/env.

5) Put .cloginrc in your home directory.

6) Modify .cloginrc.

7) Modify /etc/aliases
   Rancid sends the diffs and other controlling emails to rancid-<GROUP>
   and problems to rancid-admin-<GROUP>, where <GROUP> is the "GROUP" of
   routers.  This way you can seperate your backbone routers from your
   access routers or seperate based upon network etc...  Different router
   uses forced different people being interested in router "groups" -
   thus is setup.  Make sure email to rancid-<GROUP> works.  /etc/aliases
   can be maintainable by Majordomo stuff.
				- OR -
   Modify your home directory's .mailrc.  Control_rancid uses sendmail
   to send diffs.  To use a private .mailrc, control_rancid will have to
   be modified to use ucbmail or, better yet, something else which allow
   the Precedence header to be set.  Pick your poison.

   The Precedence header set to bulk or junk *hopefully* avoids
   auto-responders and vacation type mail filters.

8) Modify run-me &/ do-diffs.
   Set path to env.

9) Modify create_cvs.
    Set path to env.

10) Run create_cvs.
    This creates all of the CVS necessary directories and all of the
    config directories.

11) For each "group", create the router.db file in the group directory.
    The file is of the form "router:mfg:state" where "router" is the name
    of the router, mfg is the manufacturer (cisco|juniper), and "state"
    is either up or down.  Each router listed as "up" will have the
    configuration grabbed.

12) Put run-me/do-diffs in cron to be called however often you want it to run
    for each group (run-me <GROUP>).  eg:

	# run config differ hourly
	1 * * * * <BASEDIR>/bin/do-diffs
	# clean out hourly differ logs
	50 23 * * * /usr/bin/find <BASEDIR>/logs -mtime +2 -exec rm {} \;

13) Send me any bugs, suggestions or updates (rancid@shrubbery.net).

-Hank