Discussion:
[rancid] Newbie:Using cfg files instead real connection to equipment
v***@cable.net.co
2010-07-19 13:37:26 UTC
Permalink
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?

Thank you in advance,

vmut
john heasley
2010-07-19 16:10:41 UTC
Permalink
Post by v***@cable.net.co
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.
not really. why not reverse it; remove some folks' access and let them
access the rancid repository via cvsweb instead.
Post by v***@cable.net.co
What steps do I need to follow?
Thank you in advance,
vmut
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
John Jetmore
2010-07-19 16:38:06 UTC
Permalink
Post by v***@cable.net.co
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

Loading...