Difference between revisions of "Rancid"
From HackerNet
Helikopter (talk | contribs) m (→CVS) |
Helikopter (talk | contribs) |
||
Line 19: | Line 19: | ||
Filer | Filer | ||
− | |||
/etc/rancid/ # Config file | /etc/rancid/ # Config file | ||
− | /var/rancid/[gruppnamn]/router.db # Add devices | + | /var/lib/rancid/ # Most other files |
+ | /var/lib/rancid/[gruppnamn]/router.db # Add devices | ||
+ | |||
+ | sudo chown -R rancid:rancid /var/lib/rancid | ||
+ | su - rancid | ||
+ | '''Add devices'''<br/> | ||
+ | nano /var/lib/rancid/switches/router.db | ||
+ | 192.168.0.100:cisco:up | ||
+ | sw01.local:cisco:up | ||
+ | 10.0.0.10:hp:up | ||
===CVS=== | ===CVS=== |
Revision as of 21:06, 17 June 2015
Really Awesome New Cisco confIg Differ är ett verktyg för versionshantering av konfigurationsfiler på nätverksutrustning. Programvaran är skapad av Shrubbery Networks.
Rancid kan användas för följande:
- Backing and storing configuration files
- Configuration comparison
- Configuration version archival
Rancid kan hjälpa till i arbetet med följande frågor:
- How do you know when a change occurs?
- What do you do when a change occurs?
- Can you correlate network events with changes?
- Do you enforce a baseline or set configuration standard?
Installation
sudo apt-get install rancid sudo nano /etc/rancid/rancid.conf # list of rancid groups LIST_OF_GROUPS="routers switches"
Filer
/etc/rancid/ # Config file /var/lib/rancid/ # Most other files /var/lib/rancid/[gruppnamn]/router.db # Add devices
sudo chown -R rancid:rancid /var/lib/rancid su - rancid
Add devices
nano /var/lib/rancid/switches/router.db 192.168.0.100:cisco:up sw01.local:cisco:up 10.0.0.10:hp:up
CVS
Lagra i CVS repo. Går även att köra med subversion.
su – rancid /var/lib/rancid/bin/rancid-cvs
Schemaläggning
su - rancid crontab -e 0 * * * * /opt/rancid/bin/rancid-run 0 1 * * * find /opt/rancid/var/logs -type f -mtime +30 -exec rm {} \; # Slang gamla loggar
CVSWeb
sudo apt-get install cvsweb sudo cp /etc/cvsweb/cvsweb.conf /etc/cvsweb/cvsweb.conf.ORIGINAL sudo nano /etc/cvsweb/cvsweb.conf @CVSrepositories = ( 'Rancid' => ['Rancid Repository', '/usr/local/rancid/var/CVS'], );
ln -s /usr/share/cvsweb /var/www/cvsweb
You need to restart your server, before you can see the repository. Access CVSweb
http://server_url/cgi-bin/cvsweb
Mailnotifiering
Dokumentation
http://www.routereflector.com/2013/09/configuration-versioning-using-rancid/ https://networklore.com/rancid-getting-started/ http://www.itnotes.eu/?p=365 http://www.richardyau.com/?p=11