Agenda: exercises-rancid-2.txt

File exercises-rancid-2.txt, 2.1 KB (added by nocadmin, 9 years ago)

Rancid Exercies Part II

Line 
1Advanced Registry Operations Curriculum
2
3Using Rancid - Part II
4
50.      Become the RANCID user
6
7        - Make sure you are the root user first. If not, then do:
8       
9        $ su -
10       
11        - To become the RANCID user do:
12
13        # su -s /bin/bash rancid
14
151. Note the IP addresses for the routers
16
17        10.10.10.21 for group 1 or 10.10.10.22 for group 2
18
192. Update /var/lib/rancid/.cloginrc
20
21        Change the file to look like this:
22
23        $ vi /var/lib/rancid/.cloginrc
24
25        add user 10.10.10.* tldadmin
26        add password 10.10.10.* tldadmin tldadmin
27
28        (This tells RANCID that all hosts called "tldadmin.*" use the
29        same password and user -- no need to add every router by hand!)
30
313. Update the router.db
32
33    $ vi /var/lib/rancid/all/router.db
34
35        Add our other classroom router to the file. You should end up with:
36
37        10.10.10.21:cisco:up
38        10.10.10.22:cisco:up
39
40        (Note that "cisco" means this is Cisco equipment -- it tells Rancid
41        that we are expecting to talk to a Cisco device here.  You can also
42        talk to Juniper, HP, ...)
43
444. Run rancid again:
45
46        $ /usr/lib/rancid/bin/rancid-run
47
48        (Should take a few seconds)
49
505. Check out the logs:
51
52        $ cd /var/lib/rancid/logs
53        $ ls -l
54
55        ... View the contents of the file:
56
57        $ more all.*
58
596. Look at the configs
60
61        $ cd /var/lib/rancid/all/configs
62        $ more 10.10.10.*
63
64        - If all went well, you can see the configs of ALL routers
65
667. Change the configuration on the router (change the description on
67    an interface, for example)
68
698. Run rancid again
70
71        $ /usr/lib/rancid/bin/rancid-run
72
739. Play with clogin:
74
75
76        $  /usr/lib/rancid/bin/clogin -c "show clock" 10.10.10.21 10.10.10.22
77
78- What do you notice ?
79
80
8110. Add the RANCID CVS repository in to CVSweb
82
83        - Exit from the RANCID user:
84
85        $ exit
86       
87        - Edit the file /etc/cvsweb/cvsweb.conf:
88
89        # vi /etc/cvsweb/cvsweb.conf
90
91        - Either above or below the line:
92
93'nagios3' => ['AROC Nagios', '/home/tldadmin/cvs'],
94
95        add a new line that reads:
96
97'rancid'   => ['Rancid Repository', '/var/lib/rancid/CVS'],
98
99        - Save and exit
100
101        - Open a web browser to the link:
102
103        http://localhost/cgi-bin/cvsweb/
104
105          and select between the RANCID and the AROC Nagios3 configuration files CVS
106          repositories in the CVS Root drop-down list.