[rancid] Re: Newbie:Using cfg files instead real connection to equipment
John Jetmore
jj33 at pobox.com
Mon Jul 19 16:38:06 UTC 2010
On Mon, Jul 19, 2010 at 9:37 AM, <vmut at cable.net.co> wrote:
> Newbie:Using cfg files instead real connection to equipment
>
> I want to use RANCID with Juniper (J and M series) and cisco routers (several models) but the administration wants to minimize the amount of people connected to the real equipment, so there are a daily cfg files are located in a share directory and the idea is using them instead a direct connection to the boxes, is it that possible?
>
> Base on the cvs philosophy I think the files could be used for populating the repository but I cannot be able to find out if RANCID allows that.
>
> What steps do I need to follow?
You need to be aware that rancid stores more than just the config. It
stores vlan info, hardware inventory, and more. Your admin probably
isn;t storing nearly as much info.
That said, a while ago I wrote a plugin called "filerancid" that does
more or less what you want. It's tuned to my environment but
editable. I have defined a directory ~rancid/custom/ to hold stuff
for this plugin. The logic then goes like this:
For device = $device
if there exists an executable named ~rancid/custom/bin/hosts/$device
execute ~rancid/custom/bin/hosts/$device
process ~rancid/custom/files/$device as the "new" device config
after this rancid's normal cvs checkin and alert stuff takes over
The idea is that you can store device configs in
~rancid/custom/files/$device via an external process or, by naming it
in the bin/hosts dir the same as the device name, cause the plugin
itself to execute a script to update the file.
I used this as a "rapid adoption" method for several device types
while working out how to get them to work more formally (for instance,
dell power connect switches). The only thing I use it for now is some
old Cisco 3005 VPN Concentrators that I don't care about enough to get
a better system.
I've attached a copy of filerancid if you're interested. There are
two lines with the path /home/rancid/rancid in them. Both of these
would need to be edited with the correct path to whereever you put
your "custom" directory.
In addition, you need to add the following to rancid-fe:
'file' => 'filerancid',
Then in your router.db file the device type would be "file".
Hope that helps some.
--John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filerancid
Type: application/octet-stream
Size: 3889 bytes
Desc: not available
Url : http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20100719/f744a6bb/attachment.obj
More information about the Rancid-discuss
mailing list