README 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. $OpenBSD: README,v 1.3 2016/11/23 12:27:47 sthen Exp $
  2. +-----------------------------------------------------------------------
  3. | Running ${FULLPKGNAME} on OpenBSD
  4. +-----------------------------------------------------------------------
  5. On OpenBSD, RANCID lives and works in ${LOCALSTATEDIR}, with user id _rancid.
  6. Quick Installation Guide (an example):
  7. 1) Modify ${SYSCONFDIR}/rancid/rancid.conf. The variable LIST_OF_GROUPS is
  8. a space delimited list of router "groups".
  9. e.g.:
  10. LIST_OF_GROUPS="backbone aggregation switches"
  11. 2) Create ${LOCALSTATEDIR}/.cloginrc, with read/write permissions only for
  12. the _rancid user, e.g. 0600 or 0640.
  13. Review ${TRUEPREFIX}/share/examples/rancid/cloginrc.sample for examples
  14. and a good starting point. See also cloginrc(5).
  15. Test to make sure that you can login to every router.
  16. 3) Set up mail aliases, by modifing /etc/mail/aliases. Rancid
  17. sends the diffs and other administrative emails to rancid-<GROUP> and
  18. problems to rancid-admin-<GROUP>, where <GROUP> is the "GROUP" of
  19. routers. This way you can separate your backbone routers from your
  20. access routers or separate based upon network.
  21. 4) Initialize RANCID CVS repository with `rancid-cvs' as the _rancid
  22. user. This creates all of the necessary directories and config files
  23. for each of the groups in LIST_OF_GROUPS and imports them into CVS.
  24. This will also need to be run each time a new group is added. Do not
  25. create the directories or CVS repository manually, allow rancid-cvs
  26. do it. See also rancid-cvs(1).
  27. 5) For each "group", modify the router.db file in the group directory.
  28. The file is of the form "router;mfg;state", where "router" is
  29. the name (we use FQDN) of the router, mfg is the manufacturer from
  30. the set of (cat5|cisco|juniper), and "state" is either up or down.
  31. Each router listed as "up" will have the configuration grabbed.
  32. Note: manufacturer cat5 is intended only for cisco catalyst switches
  33. running catalyst (not IOS) code. See also router.db(5).
  34. 6) For first-time users or new installations, run `rancid-run' (with no
  35. arguments) as the user _rancid and check the resulting log file(s)
  36. (in ${LOCALSTATEDIR}/logs/*) for errors. Repeat until there are no
  37. errors.
  38. 7) Put `rancid-run' in _rancid's crontab to be called however often you
  39. want it to run for each group (rancid-run [<GROUP>]). If you run it
  40. less often than once/hour, check the setting of OLDTIME in
  41. ${SYSCONFDIR}/rancid/rancid.conf.
  42. Example:
  43. # run config differ hourly
  44. 1 * * * * ${TRUEPREFIX}/bin/rancid-run
  45. # clean out config differ logs
  46. 50 23 * * * /usr/bin/find ${LOCALSTATEDIR}/logs -type f -mtime +2 -exec rm {} \;