Skip to content

man-hep-tier2/puppet-afs

 
 

Repository files navigation

afs

Build Status

Table of Contents

  1. Overview - What is the AFS module?
  2. Module Description - What does the module do?
  3. Setup - The basics of getting started with AFS
  4. Usage - The classes and their parameters available for configuration
  5. Limitations - OS compatibility, etc.
  6. Development
  7. Contact
  8. License

Overview

The AFS module allows you to manage OpenAFS with Puppet.

Module Description

OpenAFS is an open source implementation of the Andrew distributed file system (AFS). The afs module allows you to manage OpenAFS packages, configuration and services on Scientific Linux, Ubuntu and Debian.

Currently only a client installation of OpenAFS is supported.

Setup

What AFS affects:

  • Configuration files
  • Packages, services and configuration for the OpenAFS client
  • /etc/openafs-client/cacheinfo on Debian and Ubuntu

Beginning with AFS

To install the OpenAFS client with the default parameters:

include afs::client

The defaults are determined by your operating system. These are working quite well for Scientific Linux, for Debian and Ubuntu you should consider setting explicit options.

To configure the OpenAFS client, declare the afs::client class:

class {'afs::client':
  cell       => 'desy.de',
  cache_dir  => '/var/cache/afs',
  cache_size => '100000',
}

Alternatively, you can use Hiera and Automatic Parameter Lookup:

afs::client::cell: 'desy.de'
afs::client::cache_dir: '/var/cache/afs'
afs::client::cache_size: '100000'

The above examples will configure the client to use a specific cache directory and size and will belong to the cell desy.de.

Usage

Classes

Class: afs

Wrapper class around afs::client, it only declars the afs::client class.

Class: afs::client

The AFS module's primary class for managing the OpenAFS client.

Parameters within afs::client:

cell

AFS cell the client should belong to. Defaults to example.org

afs_mount_point

Mountpoint for AFS. Defaults to /afs

cache_dir

Cache directory for the AFS client. Should be a dedicated partition. Defaults to /var/cache/afs for Scientific Linux and /var/cache/openafs for Debian/Ubuntu.

cache_size

Cache size for the AFS client. Should be 85% of cache_dir, if used on a dedicated partition. Defaults to AUTOMATIC for Scientific Linux, the init value determines the actual cache size and sets the appropiate value.

For Debian/Ubuntu, this defaults to $::afs_cache_size fact.

sysname

Configure the AFS sysname for @sys variable in AFS pathnames. Supports an array of sysname.

options

Configure the AFS client daemon options. Supports an array of settings.

Defaults to (space-character), the afsd itself will choose the appropiate options.

manage_service

Enable or disable service management.

Defaults to true.

config_path

The configuration path for the client configuration files. Defaults to /usr/vice/etc for Scientific Linux and /etc/openafs-client for Debian/Ubuntu.

package_name

Name of the client OpenAFS client package. Defaults to openafs-client for Scientifc Linux and Debian/Ubuntu.

krb5_package_name

Name of the KRB5 package. Defaults to openafs-krb5 for Scientific Linux and Debian/Ubuntu. On Debian/Ubuntu installes additionally libpam-afs-session for PAM support.

service_name

Service name for the OpenAFS client daemon. Defaults to afs for Scientific Linux and openafs-client for Debian/Ubuntu.

service_status

Service status available for the OpenAFS client daemon. Defaults to true for Scientific Linux and false for Debian/Ubuntu.

Facts

Fact: afs_cache_size

This fact calculates the default AFS cache size for the Debian osfamily.

The fact assumes a dedicated cache partition mounted at /var/cache/openafs. If it is not found, it will fall back to a cache size of 100 MB. If the dedicated partition is found, it will return 70% of the available 1K blocks.

This behaviour is inspired by the OpenAFS client init script and a cachesize value of AUTOMATIC, which is used on Scientific Linux.

Facts: kmod

Three facts concerning the kernel module are available:

  • kmod_isloaded_openafs: Boolean tracking if kernel module is loaded
  • kmod_filename_openafs: Returns the filename of the module as returned by the modinfo command. Example: /lib/modules/2.6.32-504.el6.x86_64/extra/openafs.ko
  • kmod_vermagic_openafs: Returns the version magic string as returned by the modinfo command. Example: 2.6.32-504.el6.x86_64 SMP mod_unload modversions

Limitations

The module has only been tested on Scientific Linux 6, Ubuntu 12.04 LTS, Ubuntu 14.04 LTS and Debian 7. Currently, only a client installation of OpenAFS is supported.

The afs_cache_size fact uses a hard coded partition, which is /var/cache/openafs. The fact does not work, if it is used with the afs::client::cache_dir parameter.

Development

Please create issues and pull-requests at our project site puppet-afs.

Contact

DESY IT Puppet Administrators - it-puppet-admin@desy.de

Copyright and License

Copyright (C) 2014 Deutsches Elektronen-Synchrotron DESY

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Puppet module for managing OpenAFS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 44.5%
  • Ruby 31.8%
  • Puppet 22.7%
  • Other 1.0%