Skip to content

Distcc as a service @ CERN

Distcc as a service for Scientific Linux CERN 6 / CERN CentOS 7


Introduction

distcc is a program to distribute builds of C, C++, Objective C or Objective C++ code across several machines on a network.

distcc should always generate the same results as a local build, is simple to install and use, and is usually much faster than a local compile.

To enable CERN users to manage a distcc cluster, we provide a puppet module that can be used to configure:

  • A distcc 'server'
  • A distcc 'client' (DISTCC_HOSTS automatically configured with 'server' addresses)

The puppet module supports deploying distcc on both SLC6 and CC7, utilising a cern provided distcc package that supports Kerberos authentication.

More information on the puppet module can be found here: it-puppet-module-distcccern

Why self service?

As IT ran a pilot service for many years, it became clear that users have different needs. A cluster tuned with some settings may conflict with other users expectations.

For this reason, we provide a puppet module so that it is possible to tune/configure to your specific needs.

Deployment

Note, this page is not an introduction to Openstack or Puppet at CERN, you should familiase yourself with the following training/documentation if you have not already:

Server

You need to 'include distcccern::server' in your hostgroup definition file.

It may be worth your while to consult the module documentation (it-puppet-module-distcccern) for details on which parameters you might want to customise.

Specifically you might be interested in the configuration option 'additional_compiler_path' which will allow you to augment the list of supported distcc compilers with content from for example AFS.

Note - if you rely on AFS, be sure to 'include afs' in your hostgroup definition file as well.

Client

You need to 'include distcccern::client' in your hostgroup definition file.

It may be worth your while to consult the module documentation (it-puppet-module-distcccern) for details on which parameters you might want to customise.

Specifically you might be interested in the configuration option 'distcc_server_core_multipler' which will allow you to define how many cores are defined in the DISTCC_HOSTS variable or the configuration option 'distcc_server_hostgroup' which will allow you to define how the distcc server list is generated.

Note - if you rely on AFS, be sure to 'include afs' in your hostgroup definition file as well.

Client - Usage

The 'distcccern::client' code will define a $DISTCC_HOSTS variable that contains a listing of your distcc servers. In order for your compiler to utilise this list you may need to change the CC environment variable.

Example:

make -j8 CC=distcc