[OpenAFS] scripts to install openafs

Jeff Blaine jblaine@kickflop.net
Fri, 01 Oct 2010 12:56:24 -0400


Here's what we do, for what it's worth.

It's been working excellent for us so far.  Note that although
we run cfengine on clients ("Managed"), we have to cater to
non-Managed hosts which want a way to get AFS, so using
cfengine to manage our AFS installs/file-copies is not
possible.

We store things in NFS:

                        |-1.4.11---|-32-
                        |          |-64-
                        |
                        |-1.4.12.1-|-32-
|-linux-kernel-modules-|          |-64-
                        |
                        |-1.4.5----|-32-
                        |          |-64-
                        |
                        |-1.4.6----|-32-
                        |          |-64-
                        |
                        |-1.4.7----|-32-
                                   |-64-


                           |-amd64_linux26-|-C-------
|-production-linux-client-|               |-modload-
                           |
                           |-i386_linux26--|-C-------
                                           |-modload-

|-production-solaris-client-|-sun4x_510-|-C-------
                                         |-modload-


Bootstrap via init script which runs before rc3.d/S90afs
grabs what it needs from the NFS area in order to match
our desired OpenAFS client specs.

No more surprises due to kernel updates = no working AFS
at reboot.

cfengine2 runs every 30 minutes via cron in our environment.
When we need to populate our repository of kernel modules
(in order to change OpenAFS revs), we temporarily add a
"build and gather modules" script call to our "30-minute"
cfengine config file.  It builds OpenAFS on all of our
boxes and drops kernel modules into NFS space.

On 10/1/2010 11:39 AM, David Bear wrote:
> It seems that once a year I end up getting a kernel update that breaks
> afs and then I need to install again... but with a fixed kmod -- or
> something else. I know a lot can and should be scripted -- but I've
> never taken the time. So I was hoping someone on the list may have a
> scripted install of afs for a Red Hat system -- actually, I run CentOS
> but they are the same enough that it shouldn't matter. Preferably, the
> script should look at the currently running kernel, then know enough to
> grab the latest stable openafs rpms and install them -- A followup
> script would be nice the would either update the kmod or the dkms afs
> package as well...  Any pointers, code, adivce would be helpful.
>
> --
> David Bear
> College of Public Programs at ASU
> 602-494-0424